stage4/generate_cc/search_type_code.c
changeset 38 6cce7d14647e
parent 35 9f3d6c089533
child 40 873a5b60a7ea
equal deleted inserted replaced
37:4d54ce47ee12 38:6cce7d14647e
   523         
   523         
   524     }/*function_real_to_string*/
   524     }/*function_real_to_string*/
   525     break;
   525     break;
   526 
   526 
   527 /****
   527 /****
   528  *REAL_TO_WSTRING
   528  *REAL_TO_DATE
   529  */
   529  */
   530     case function_real_to_wstring :
   530     case function_real_to_date :
   531     {
   531     {
   532         symbol_c *last_type_symbol = NULL;
   532         symbol_c *last_type_symbol = NULL;
   533 
   533 
   534         {
   534         {
   535             identifier_c param_name("IN");
   535             identifier_c param_name("IN");
   543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   544             
   544             
   545             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   545             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   546             {
   546             {
   547         
   547         
   548                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
   548                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   549                 return return_type_symbol;
   549                 return return_type_symbol;
   550                 
   550                 
   551             }
   551             }
   552             
   552             
   553             ERROR;
   553             ERROR;
   554         }
   554         }
   555         
   555         
   556     }/*function_real_to_wstring*/
   556     }/*function_real_to_date*/
   557     break;
   557     break;
   558 
   558 
   559 /****
   559 /****
   560  *REAL_TO_DATE
   560  *REAL_TO_TOD
   561  */
   561  */
   562     case function_real_to_date :
   562     case function_real_to_tod :
   563     {
   563     {
   564         symbol_c *last_type_symbol = NULL;
   564         symbol_c *last_type_symbol = NULL;
   565 
   565 
   566         {
   566         {
   567             identifier_c param_name("IN");
   567             identifier_c param_name("IN");
   575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   576             
   576             
   577             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   577             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
   578             {
   578             {
   579         
   579         
       
   580                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   581                 return return_type_symbol;
       
   582                 
       
   583             }
       
   584             
       
   585             ERROR;
       
   586         }
       
   587         
       
   588     }/*function_real_to_tod*/
       
   589     break;
       
   590 
       
   591 /****
       
   592  *REAL_TO_DT
       
   593  */
       
   594     case function_real_to_dt :
       
   595     {
       
   596         symbol_c *last_type_symbol = NULL;
       
   597 
       
   598         {
       
   599             identifier_c param_name("IN");
       
   600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   602             
       
   603             /* Get the value from a foo(<param_value>) style call */
       
   604             if (IN_param_value == NULL)
       
   605               IN_param_value = function_call_param_iterator.next();
       
   606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   608             
       
   609             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
   610             {
       
   611         
       
   612                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   613                 return return_type_symbol;
       
   614                 
       
   615             }
       
   616             
       
   617             ERROR;
       
   618         }
       
   619         
       
   620     }/*function_real_to_dt*/
       
   621     break;
       
   622 
       
   623 /****
       
   624  *LREAL_TO_REAL
       
   625  */
       
   626     case function_lreal_to_real :
       
   627     {
       
   628         symbol_c *last_type_symbol = NULL;
       
   629 
       
   630         {
       
   631             identifier_c param_name("IN");
       
   632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   634             
       
   635             /* Get the value from a foo(<param_value>) style call */
       
   636             if (IN_param_value == NULL)
       
   637               IN_param_value = function_call_param_iterator.next();
       
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   640             
       
   641             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   642             {
       
   643         
       
   644                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   645                 return return_type_symbol;
       
   646                 
       
   647             }
       
   648             
       
   649             ERROR;
       
   650         }
       
   651         
       
   652     }/*function_lreal_to_real*/
       
   653     break;
       
   654 
       
   655 /****
       
   656  *LREAL_TO_SINT
       
   657  */
       
   658     case function_lreal_to_sint :
       
   659     {
       
   660         symbol_c *last_type_symbol = NULL;
       
   661 
       
   662         {
       
   663             identifier_c param_name("IN");
       
   664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   666             
       
   667             /* Get the value from a foo(<param_value>) style call */
       
   668             if (IN_param_value == NULL)
       
   669               IN_param_value = function_call_param_iterator.next();
       
   670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   672             
       
   673             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   674             {
       
   675         
       
   676                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
   677                 return return_type_symbol;
       
   678                 
       
   679             }
       
   680             
       
   681             ERROR;
       
   682         }
       
   683         
       
   684     }/*function_lreal_to_sint*/
       
   685     break;
       
   686 
       
   687 /****
       
   688  *LREAL_TO_INT
       
   689  */
       
   690     case function_lreal_to_int :
       
   691     {
       
   692         symbol_c *last_type_symbol = NULL;
       
   693 
       
   694         {
       
   695             identifier_c param_name("IN");
       
   696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   698             
       
   699             /* Get the value from a foo(<param_value>) style call */
       
   700             if (IN_param_value == NULL)
       
   701               IN_param_value = function_call_param_iterator.next();
       
   702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   704             
       
   705             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   706             {
       
   707         
       
   708                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   709                 return return_type_symbol;
       
   710                 
       
   711             }
       
   712             
       
   713             ERROR;
       
   714         }
       
   715         
       
   716     }/*function_lreal_to_int*/
       
   717     break;
       
   718 
       
   719 /****
       
   720  *LREAL_TO_DINT
       
   721  */
       
   722     case function_lreal_to_dint :
       
   723     {
       
   724         symbol_c *last_type_symbol = NULL;
       
   725 
       
   726         {
       
   727             identifier_c param_name("IN");
       
   728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   730             
       
   731             /* Get the value from a foo(<param_value>) style call */
       
   732             if (IN_param_value == NULL)
       
   733               IN_param_value = function_call_param_iterator.next();
       
   734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   736             
       
   737             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   738             {
       
   739         
       
   740                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   741                 return return_type_symbol;
       
   742                 
       
   743             }
       
   744             
       
   745             ERROR;
       
   746         }
       
   747         
       
   748     }/*function_lreal_to_dint*/
       
   749     break;
       
   750 
       
   751 /****
       
   752  *LREAL_TO_LINT
       
   753  */
       
   754     case function_lreal_to_lint :
       
   755     {
       
   756         symbol_c *last_type_symbol = NULL;
       
   757 
       
   758         {
       
   759             identifier_c param_name("IN");
       
   760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   762             
       
   763             /* Get the value from a foo(<param_value>) style call */
       
   764             if (IN_param_value == NULL)
       
   765               IN_param_value = function_call_param_iterator.next();
       
   766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   768             
       
   769             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   770             {
       
   771         
       
   772                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   773                 return return_type_symbol;
       
   774                 
       
   775             }
       
   776             
       
   777             ERROR;
       
   778         }
       
   779         
       
   780     }/*function_lreal_to_lint*/
       
   781     break;
       
   782 
       
   783 /****
       
   784  *LREAL_TO_USINT
       
   785  */
       
   786     case function_lreal_to_usint :
       
   787     {
       
   788         symbol_c *last_type_symbol = NULL;
       
   789 
       
   790         {
       
   791             identifier_c param_name("IN");
       
   792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   794             
       
   795             /* Get the value from a foo(<param_value>) style call */
       
   796             if (IN_param_value == NULL)
       
   797               IN_param_value = function_call_param_iterator.next();
       
   798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   800             
       
   801             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   802             {
       
   803         
       
   804                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   805                 return return_type_symbol;
       
   806                 
       
   807             }
       
   808             
       
   809             ERROR;
       
   810         }
       
   811         
       
   812     }/*function_lreal_to_usint*/
       
   813     break;
       
   814 
       
   815 /****
       
   816  *LREAL_TO_UINT
       
   817  */
       
   818     case function_lreal_to_uint :
       
   819     {
       
   820         symbol_c *last_type_symbol = NULL;
       
   821 
       
   822         {
       
   823             identifier_c param_name("IN");
       
   824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   826             
       
   827             /* Get the value from a foo(<param_value>) style call */
       
   828             if (IN_param_value == NULL)
       
   829               IN_param_value = function_call_param_iterator.next();
       
   830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   832             
       
   833             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   834             {
       
   835         
       
   836                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   837                 return return_type_symbol;
       
   838                 
       
   839             }
       
   840             
       
   841             ERROR;
       
   842         }
       
   843         
       
   844     }/*function_lreal_to_uint*/
       
   845     break;
       
   846 
       
   847 /****
       
   848  *LREAL_TO_UDINT
       
   849  */
       
   850     case function_lreal_to_udint :
       
   851     {
       
   852         symbol_c *last_type_symbol = NULL;
       
   853 
       
   854         {
       
   855             identifier_c param_name("IN");
       
   856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   858             
       
   859             /* Get the value from a foo(<param_value>) style call */
       
   860             if (IN_param_value == NULL)
       
   861               IN_param_value = function_call_param_iterator.next();
       
   862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   864             
       
   865             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   866             {
       
   867         
       
   868                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   869                 return return_type_symbol;
       
   870                 
       
   871             }
       
   872             
       
   873             ERROR;
       
   874         }
       
   875         
       
   876     }/*function_lreal_to_udint*/
       
   877     break;
       
   878 
       
   879 /****
       
   880  *LREAL_TO_ULINT
       
   881  */
       
   882     case function_lreal_to_ulint :
       
   883     {
       
   884         symbol_c *last_type_symbol = NULL;
       
   885 
       
   886         {
       
   887             identifier_c param_name("IN");
       
   888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   890             
       
   891             /* Get the value from a foo(<param_value>) style call */
       
   892             if (IN_param_value == NULL)
       
   893               IN_param_value = function_call_param_iterator.next();
       
   894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   896             
       
   897             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   898             {
       
   899         
       
   900                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   901                 return return_type_symbol;
       
   902                 
       
   903             }
       
   904             
       
   905             ERROR;
       
   906         }
       
   907         
       
   908     }/*function_lreal_to_ulint*/
       
   909     break;
       
   910 
       
   911 /****
       
   912  *LREAL_TO_TIME
       
   913  */
       
   914     case function_lreal_to_time :
       
   915     {
       
   916         symbol_c *last_type_symbol = NULL;
       
   917 
       
   918         {
       
   919             identifier_c param_name("IN");
       
   920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   922             
       
   923             /* Get the value from a foo(<param_value>) style call */
       
   924             if (IN_param_value == NULL)
       
   925               IN_param_value = function_call_param_iterator.next();
       
   926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   928             
       
   929             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   930             {
       
   931         
       
   932                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   933                 return return_type_symbol;
       
   934                 
       
   935             }
       
   936             
       
   937             ERROR;
       
   938         }
       
   939         
       
   940     }/*function_lreal_to_time*/
       
   941     break;
       
   942 
       
   943 /****
       
   944  *LREAL_TO_BOOL
       
   945  */
       
   946     case function_lreal_to_bool :
       
   947     {
       
   948         symbol_c *last_type_symbol = NULL;
       
   949 
       
   950         {
       
   951             identifier_c param_name("IN");
       
   952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   954             
       
   955             /* Get the value from a foo(<param_value>) style call */
       
   956             if (IN_param_value == NULL)
       
   957               IN_param_value = function_call_param_iterator.next();
       
   958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   960             
       
   961             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   962             {
       
   963         
       
   964                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   965                 return return_type_symbol;
       
   966                 
       
   967             }
       
   968             
       
   969             ERROR;
       
   970         }
       
   971         
       
   972     }/*function_lreal_to_bool*/
       
   973     break;
       
   974 
       
   975 /****
       
   976  *LREAL_TO_BYTE
       
   977  */
       
   978     case function_lreal_to_byte :
       
   979     {
       
   980         symbol_c *last_type_symbol = NULL;
       
   981 
       
   982         {
       
   983             identifier_c param_name("IN");
       
   984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   986             
       
   987             /* Get the value from a foo(<param_value>) style call */
       
   988             if (IN_param_value == NULL)
       
   989               IN_param_value = function_call_param_iterator.next();
       
   990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   992             
       
   993             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
   994             {
       
   995         
       
   996                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   997                 return return_type_symbol;
       
   998                 
       
   999             }
       
  1000             
       
  1001             ERROR;
       
  1002         }
       
  1003         
       
  1004     }/*function_lreal_to_byte*/
       
  1005     break;
       
  1006 
       
  1007 /****
       
  1008  *LREAL_TO_WORD
       
  1009  */
       
  1010     case function_lreal_to_word :
       
  1011     {
       
  1012         symbol_c *last_type_symbol = NULL;
       
  1013 
       
  1014         {
       
  1015             identifier_c param_name("IN");
       
  1016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1018             
       
  1019             /* Get the value from a foo(<param_value>) style call */
       
  1020             if (IN_param_value == NULL)
       
  1021               IN_param_value = function_call_param_iterator.next();
       
  1022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1024             
       
  1025             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1026             {
       
  1027         
       
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1029                 return return_type_symbol;
       
  1030                 
       
  1031             }
       
  1032             
       
  1033             ERROR;
       
  1034         }
       
  1035         
       
  1036     }/*function_lreal_to_word*/
       
  1037     break;
       
  1038 
       
  1039 /****
       
  1040  *LREAL_TO_DWORD
       
  1041  */
       
  1042     case function_lreal_to_dword :
       
  1043     {
       
  1044         symbol_c *last_type_symbol = NULL;
       
  1045 
       
  1046         {
       
  1047             identifier_c param_name("IN");
       
  1048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1050             
       
  1051             /* Get the value from a foo(<param_value>) style call */
       
  1052             if (IN_param_value == NULL)
       
  1053               IN_param_value = function_call_param_iterator.next();
       
  1054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1056             
       
  1057             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1058             {
       
  1059         
       
  1060                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1061                 return return_type_symbol;
       
  1062                 
       
  1063             }
       
  1064             
       
  1065             ERROR;
       
  1066         }
       
  1067         
       
  1068     }/*function_lreal_to_dword*/
       
  1069     break;
       
  1070 
       
  1071 /****
       
  1072  *LREAL_TO_LWORD
       
  1073  */
       
  1074     case function_lreal_to_lword :
       
  1075     {
       
  1076         symbol_c *last_type_symbol = NULL;
       
  1077 
       
  1078         {
       
  1079             identifier_c param_name("IN");
       
  1080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1082             
       
  1083             /* Get the value from a foo(<param_value>) style call */
       
  1084             if (IN_param_value == NULL)
       
  1085               IN_param_value = function_call_param_iterator.next();
       
  1086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1088             
       
  1089             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1090             {
       
  1091         
       
  1092                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1093                 return return_type_symbol;
       
  1094                 
       
  1095             }
       
  1096             
       
  1097             ERROR;
       
  1098         }
       
  1099         
       
  1100     }/*function_lreal_to_lword*/
       
  1101     break;
       
  1102 
       
  1103 /****
       
  1104  *LREAL_TO_STRING
       
  1105  */
       
  1106     case function_lreal_to_string :
       
  1107     {
       
  1108         symbol_c *last_type_symbol = NULL;
       
  1109 
       
  1110         {
       
  1111             identifier_c param_name("IN");
       
  1112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1114             
       
  1115             /* Get the value from a foo(<param_value>) style call */
       
  1116             if (IN_param_value == NULL)
       
  1117               IN_param_value = function_call_param_iterator.next();
       
  1118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1120             
       
  1121             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1122             {
       
  1123         
       
  1124                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1125                 return return_type_symbol;
       
  1126                 
       
  1127             }
       
  1128             
       
  1129             ERROR;
       
  1130         }
       
  1131         
       
  1132     }/*function_lreal_to_string*/
       
  1133     break;
       
  1134 
       
  1135 /****
       
  1136  *LREAL_TO_DATE
       
  1137  */
       
  1138     case function_lreal_to_date :
       
  1139     {
       
  1140         symbol_c *last_type_symbol = NULL;
       
  1141 
       
  1142         {
       
  1143             identifier_c param_name("IN");
       
  1144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1146             
       
  1147             /* Get the value from a foo(<param_value>) style call */
       
  1148             if (IN_param_value == NULL)
       
  1149               IN_param_value = function_call_param_iterator.next();
       
  1150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1152             
       
  1153             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1154             {
       
  1155         
   580                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1156                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   581                 return return_type_symbol;
  1157                 return return_type_symbol;
   582                 
  1158                 
   583             }
  1159             }
   584             
  1160             
   585             ERROR;
  1161             ERROR;
   586         }
  1162         }
   587         
  1163         
   588     }/*function_real_to_date*/
  1164     }/*function_lreal_to_date*/
   589     break;
  1165     break;
   590 
  1166 
   591 /****
  1167 /****
   592  *REAL_TO_TOD
  1168  *LREAL_TO_TOD
   593  */
  1169  */
   594     case function_real_to_tod :
  1170     case function_lreal_to_tod :
   595     {
  1171     {
   596         symbol_c *last_type_symbol = NULL;
  1172         symbol_c *last_type_symbol = NULL;
   597 
  1173 
   598         {
  1174         {
   599             identifier_c param_name("IN");
  1175             identifier_c param_name("IN");
   600             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1176             /* Get the value from a foo(<param_name> = <param_value>) style call */
   601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   602             
  1178             
   603             /* Get the value from a foo(<param_value>) style call */
  1179             /* Get the value from a foo(<param_value>) style call */
   604             if (IN_param_value == NULL)
  1180             if (IN_param_value == NULL)
   605               IN_param_value = function_call_param_iterator.next();
  1181               IN_param_value = function_call_param_iterator.next();
   606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   608             
  1184             
   609             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1185             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   610             {
  1186             {
   611         
  1187         
   612                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   613                 return return_type_symbol;
  1189                 return return_type_symbol;
   614                 
  1190                 
   615             }
  1191             }
   616             
  1192             
   617             ERROR;
  1193             ERROR;
   618         }
  1194         }
   619         
  1195         
   620     }/*function_real_to_tod*/
  1196     }/*function_lreal_to_tod*/
   621     break;
  1197     break;
   622 
  1198 
   623 /****
  1199 /****
   624  *REAL_TO_DT
  1200  *LREAL_TO_DT
   625  */
  1201  */
   626     case function_real_to_dt :
  1202     case function_lreal_to_dt :
   627     {
  1203     {
   628         symbol_c *last_type_symbol = NULL;
  1204         symbol_c *last_type_symbol = NULL;
   629 
  1205 
   630         {
  1206         {
   631             identifier_c param_name("IN");
  1207             identifier_c param_name("IN");
   632             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1208             /* 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);
  1209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   634             
  1210             
   635             /* Get the value from a foo(<param_value>) style call */
  1211             /* Get the value from a foo(<param_value>) style call */
   636             if (IN_param_value == NULL)
  1212             if (IN_param_value == NULL)
   637               IN_param_value = function_call_param_iterator.next();
  1213               IN_param_value = function_call_param_iterator.next();
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1214             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 ;
  1215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   640             
  1216             
   641             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  1217             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
   642             {
  1218             {
   643         
  1219         
   644                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1220                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   645                 return return_type_symbol;
  1221                 return return_type_symbol;
   646                 
  1222                 
   647             }
  1223             }
   648             
  1224             
   649             ERROR;
  1225             ERROR;
   650         }
  1226         }
   651         
  1227         
   652     }/*function_real_to_dt*/
  1228     }/*function_lreal_to_dt*/
   653     break;
  1229     break;
   654 
  1230 
   655 /****
  1231 /****
   656  *LREAL_TO_REAL
  1232  *SINT_TO_REAL
   657  */
  1233  */
   658     case function_lreal_to_real :
  1234     case function_sint_to_real :
   659     {
  1235     {
   660         symbol_c *last_type_symbol = NULL;
  1236         symbol_c *last_type_symbol = NULL;
   661 
  1237 
   662         {
  1238         {
   663             identifier_c param_name("IN");
  1239             identifier_c param_name("IN");
   664             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1240             /* Get the value from a foo(<param_name> = <param_value>) style call */
   665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   666             
  1242             
   667             /* Get the value from a foo(<param_value>) style call */
  1243             /* Get the value from a foo(<param_value>) style call */
   668             if (IN_param_value == NULL)
  1244             if (IN_param_value == NULL)
   669               IN_param_value = function_call_param_iterator.next();
  1245               IN_param_value = function_call_param_iterator.next();
   670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   672             
  1248             
   673             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  1249             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   674             {
  1250             {
   675         
  1251         
   676                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1252                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   677                 return return_type_symbol;
  1253                 return return_type_symbol;
   678                 
  1254                 
   679             }
  1255             }
   680             
  1256             
   681             ERROR;
  1257             ERROR;
   682         }
  1258         }
   683         
  1259         
   684     }/*function_lreal_to_real*/
  1260     }/*function_sint_to_real*/
   685     break;
  1261     break;
   686 
  1262 
   687 /****
  1263 /****
   688  *LREAL_TO_SINT
  1264  *SINT_TO_LREAL
   689  */
  1265  */
   690     case function_lreal_to_sint :
  1266     case function_sint_to_lreal :
   691     {
  1267     {
   692         symbol_c *last_type_symbol = NULL;
  1268         symbol_c *last_type_symbol = NULL;
   693 
  1269 
   694         {
  1270         {
   695             identifier_c param_name("IN");
  1271             identifier_c param_name("IN");
   696             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1272             /* Get the value from a foo(<param_name> = <param_value>) style call */
   697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   698             
  1274             
   699             /* Get the value from a foo(<param_value>) style call */
  1275             /* Get the value from a foo(<param_value>) style call */
   700             if (IN_param_value == NULL)
  1276             if (IN_param_value == NULL)
   701               IN_param_value = function_call_param_iterator.next();
  1277               IN_param_value = function_call_param_iterator.next();
   702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   704             
  1280             
   705             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  1281             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1282             {
       
  1283         
       
  1284                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1285                 return return_type_symbol;
       
  1286                 
       
  1287             }
       
  1288             
       
  1289             ERROR;
       
  1290         }
       
  1291         
       
  1292     }/*function_sint_to_lreal*/
       
  1293     break;
       
  1294 
       
  1295 /****
       
  1296  *SINT_TO_INT
       
  1297  */
       
  1298     case function_sint_to_int :
       
  1299     {
       
  1300         symbol_c *last_type_symbol = NULL;
       
  1301 
       
  1302         {
       
  1303             identifier_c param_name("IN");
       
  1304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1306             
       
  1307             /* Get the value from a foo(<param_value>) style call */
       
  1308             if (IN_param_value == NULL)
       
  1309               IN_param_value = function_call_param_iterator.next();
       
  1310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1312             
       
  1313             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1314             {
       
  1315         
       
  1316                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1317                 return return_type_symbol;
       
  1318                 
       
  1319             }
       
  1320             
       
  1321             ERROR;
       
  1322         }
       
  1323         
       
  1324     }/*function_sint_to_int*/
       
  1325     break;
       
  1326 
       
  1327 /****
       
  1328  *SINT_TO_DINT
       
  1329  */
       
  1330     case function_sint_to_dint :
       
  1331     {
       
  1332         symbol_c *last_type_symbol = NULL;
       
  1333 
       
  1334         {
       
  1335             identifier_c param_name("IN");
       
  1336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1338             
       
  1339             /* Get the value from a foo(<param_value>) style call */
       
  1340             if (IN_param_value == NULL)
       
  1341               IN_param_value = function_call_param_iterator.next();
       
  1342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1344             
       
  1345             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1346             {
       
  1347         
       
  1348                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1349                 return return_type_symbol;
       
  1350                 
       
  1351             }
       
  1352             
       
  1353             ERROR;
       
  1354         }
       
  1355         
       
  1356     }/*function_sint_to_dint*/
       
  1357     break;
       
  1358 
       
  1359 /****
       
  1360  *SINT_TO_LINT
       
  1361  */
       
  1362     case function_sint_to_lint :
       
  1363     {
       
  1364         symbol_c *last_type_symbol = NULL;
       
  1365 
       
  1366         {
       
  1367             identifier_c param_name("IN");
       
  1368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1370             
       
  1371             /* Get the value from a foo(<param_value>) style call */
       
  1372             if (IN_param_value == NULL)
       
  1373               IN_param_value = function_call_param_iterator.next();
       
  1374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1376             
       
  1377             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1378             {
       
  1379         
       
  1380                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1381                 return return_type_symbol;
       
  1382                 
       
  1383             }
       
  1384             
       
  1385             ERROR;
       
  1386         }
       
  1387         
       
  1388     }/*function_sint_to_lint*/
       
  1389     break;
       
  1390 
       
  1391 /****
       
  1392  *SINT_TO_USINT
       
  1393  */
       
  1394     case function_sint_to_usint :
       
  1395     {
       
  1396         symbol_c *last_type_symbol = NULL;
       
  1397 
       
  1398         {
       
  1399             identifier_c param_name("IN");
       
  1400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1402             
       
  1403             /* Get the value from a foo(<param_value>) style call */
       
  1404             if (IN_param_value == NULL)
       
  1405               IN_param_value = function_call_param_iterator.next();
       
  1406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1408             
       
  1409             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1410             {
       
  1411         
       
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1413                 return return_type_symbol;
       
  1414                 
       
  1415             }
       
  1416             
       
  1417             ERROR;
       
  1418         }
       
  1419         
       
  1420     }/*function_sint_to_usint*/
       
  1421     break;
       
  1422 
       
  1423 /****
       
  1424  *SINT_TO_UINT
       
  1425  */
       
  1426     case function_sint_to_uint :
       
  1427     {
       
  1428         symbol_c *last_type_symbol = NULL;
       
  1429 
       
  1430         {
       
  1431             identifier_c param_name("IN");
       
  1432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1434             
       
  1435             /* Get the value from a foo(<param_value>) style call */
       
  1436             if (IN_param_value == NULL)
       
  1437               IN_param_value = function_call_param_iterator.next();
       
  1438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1440             
       
  1441             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1442             {
       
  1443         
       
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1445                 return return_type_symbol;
       
  1446                 
       
  1447             }
       
  1448             
       
  1449             ERROR;
       
  1450         }
       
  1451         
       
  1452     }/*function_sint_to_uint*/
       
  1453     break;
       
  1454 
       
  1455 /****
       
  1456  *SINT_TO_UDINT
       
  1457  */
       
  1458     case function_sint_to_udint :
       
  1459     {
       
  1460         symbol_c *last_type_symbol = NULL;
       
  1461 
       
  1462         {
       
  1463             identifier_c param_name("IN");
       
  1464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1466             
       
  1467             /* Get the value from a foo(<param_value>) style call */
       
  1468             if (IN_param_value == NULL)
       
  1469               IN_param_value = function_call_param_iterator.next();
       
  1470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1472             
       
  1473             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1474             {
       
  1475         
       
  1476                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1477                 return return_type_symbol;
       
  1478                 
       
  1479             }
       
  1480             
       
  1481             ERROR;
       
  1482         }
       
  1483         
       
  1484     }/*function_sint_to_udint*/
       
  1485     break;
       
  1486 
       
  1487 /****
       
  1488  *SINT_TO_ULINT
       
  1489  */
       
  1490     case function_sint_to_ulint :
       
  1491     {
       
  1492         symbol_c *last_type_symbol = NULL;
       
  1493 
       
  1494         {
       
  1495             identifier_c param_name("IN");
       
  1496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1498             
       
  1499             /* Get the value from a foo(<param_value>) style call */
       
  1500             if (IN_param_value == NULL)
       
  1501               IN_param_value = function_call_param_iterator.next();
       
  1502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1504             
       
  1505             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1506             {
       
  1507         
       
  1508                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1509                 return return_type_symbol;
       
  1510                 
       
  1511             }
       
  1512             
       
  1513             ERROR;
       
  1514         }
       
  1515         
       
  1516     }/*function_sint_to_ulint*/
       
  1517     break;
       
  1518 
       
  1519 /****
       
  1520  *SINT_TO_TIME
       
  1521  */
       
  1522     case function_sint_to_time :
       
  1523     {
       
  1524         symbol_c *last_type_symbol = NULL;
       
  1525 
       
  1526         {
       
  1527             identifier_c param_name("IN");
       
  1528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1530             
       
  1531             /* Get the value from a foo(<param_value>) style call */
       
  1532             if (IN_param_value == NULL)
       
  1533               IN_param_value = function_call_param_iterator.next();
       
  1534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1536             
       
  1537             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1538             {
       
  1539         
       
  1540                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1541                 return return_type_symbol;
       
  1542                 
       
  1543             }
       
  1544             
       
  1545             ERROR;
       
  1546         }
       
  1547         
       
  1548     }/*function_sint_to_time*/
       
  1549     break;
       
  1550 
       
  1551 /****
       
  1552  *SINT_TO_BOOL
       
  1553  */
       
  1554     case function_sint_to_bool :
       
  1555     {
       
  1556         symbol_c *last_type_symbol = NULL;
       
  1557 
       
  1558         {
       
  1559             identifier_c param_name("IN");
       
  1560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1562             
       
  1563             /* Get the value from a foo(<param_value>) style call */
       
  1564             if (IN_param_value == NULL)
       
  1565               IN_param_value = function_call_param_iterator.next();
       
  1566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1568             
       
  1569             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1570             {
       
  1571         
       
  1572                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1573                 return return_type_symbol;
       
  1574                 
       
  1575             }
       
  1576             
       
  1577             ERROR;
       
  1578         }
       
  1579         
       
  1580     }/*function_sint_to_bool*/
       
  1581     break;
       
  1582 
       
  1583 /****
       
  1584  *SINT_TO_BYTE
       
  1585  */
       
  1586     case function_sint_to_byte :
       
  1587     {
       
  1588         symbol_c *last_type_symbol = NULL;
       
  1589 
       
  1590         {
       
  1591             identifier_c param_name("IN");
       
  1592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1594             
       
  1595             /* Get the value from a foo(<param_value>) style call */
       
  1596             if (IN_param_value == NULL)
       
  1597               IN_param_value = function_call_param_iterator.next();
       
  1598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1600             
       
  1601             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1602             {
       
  1603         
       
  1604                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1605                 return return_type_symbol;
       
  1606                 
       
  1607             }
       
  1608             
       
  1609             ERROR;
       
  1610         }
       
  1611         
       
  1612     }/*function_sint_to_byte*/
       
  1613     break;
       
  1614 
       
  1615 /****
       
  1616  *SINT_TO_WORD
       
  1617  */
       
  1618     case function_sint_to_word :
       
  1619     {
       
  1620         symbol_c *last_type_symbol = NULL;
       
  1621 
       
  1622         {
       
  1623             identifier_c param_name("IN");
       
  1624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1626             
       
  1627             /* Get the value from a foo(<param_value>) style call */
       
  1628             if (IN_param_value == NULL)
       
  1629               IN_param_value = function_call_param_iterator.next();
       
  1630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1632             
       
  1633             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1634             {
       
  1635         
       
  1636                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1637                 return return_type_symbol;
       
  1638                 
       
  1639             }
       
  1640             
       
  1641             ERROR;
       
  1642         }
       
  1643         
       
  1644     }/*function_sint_to_word*/
       
  1645     break;
       
  1646 
       
  1647 /****
       
  1648  *SINT_TO_DWORD
       
  1649  */
       
  1650     case function_sint_to_dword :
       
  1651     {
       
  1652         symbol_c *last_type_symbol = NULL;
       
  1653 
       
  1654         {
       
  1655             identifier_c param_name("IN");
       
  1656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1658             
       
  1659             /* Get the value from a foo(<param_value>) style call */
       
  1660             if (IN_param_value == NULL)
       
  1661               IN_param_value = function_call_param_iterator.next();
       
  1662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1664             
       
  1665             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1666             {
       
  1667         
       
  1668                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1669                 return return_type_symbol;
       
  1670                 
       
  1671             }
       
  1672             
       
  1673             ERROR;
       
  1674         }
       
  1675         
       
  1676     }/*function_sint_to_dword*/
       
  1677     break;
       
  1678 
       
  1679 /****
       
  1680  *SINT_TO_LWORD
       
  1681  */
       
  1682     case function_sint_to_lword :
       
  1683     {
       
  1684         symbol_c *last_type_symbol = NULL;
       
  1685 
       
  1686         {
       
  1687             identifier_c param_name("IN");
       
  1688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1690             
       
  1691             /* Get the value from a foo(<param_value>) style call */
       
  1692             if (IN_param_value == NULL)
       
  1693               IN_param_value = function_call_param_iterator.next();
       
  1694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1696             
       
  1697             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1698             {
       
  1699         
       
  1700                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1701                 return return_type_symbol;
       
  1702                 
       
  1703             }
       
  1704             
       
  1705             ERROR;
       
  1706         }
       
  1707         
       
  1708     }/*function_sint_to_lword*/
       
  1709     break;
       
  1710 
       
  1711 /****
       
  1712  *SINT_TO_STRING
       
  1713  */
       
  1714     case function_sint_to_string :
       
  1715     {
       
  1716         symbol_c *last_type_symbol = NULL;
       
  1717 
       
  1718         {
       
  1719             identifier_c param_name("IN");
       
  1720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1722             
       
  1723             /* Get the value from a foo(<param_value>) style call */
       
  1724             if (IN_param_value == NULL)
       
  1725               IN_param_value = function_call_param_iterator.next();
       
  1726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1728             
       
  1729             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1730             {
       
  1731         
       
  1732                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1733                 return return_type_symbol;
       
  1734                 
       
  1735             }
       
  1736             
       
  1737             ERROR;
       
  1738         }
       
  1739         
       
  1740     }/*function_sint_to_string*/
       
  1741     break;
       
  1742 
       
  1743 /****
       
  1744  *SINT_TO_DATE
       
  1745  */
       
  1746     case function_sint_to_date :
       
  1747     {
       
  1748         symbol_c *last_type_symbol = NULL;
       
  1749 
       
  1750         {
       
  1751             identifier_c param_name("IN");
       
  1752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1754             
       
  1755             /* Get the value from a foo(<param_value>) style call */
       
  1756             if (IN_param_value == NULL)
       
  1757               IN_param_value = function_call_param_iterator.next();
       
  1758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1760             
       
  1761             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1762             {
       
  1763         
       
  1764                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1765                 return return_type_symbol;
       
  1766                 
       
  1767             }
       
  1768             
       
  1769             ERROR;
       
  1770         }
       
  1771         
       
  1772     }/*function_sint_to_date*/
       
  1773     break;
       
  1774 
       
  1775 /****
       
  1776  *SINT_TO_TOD
       
  1777  */
       
  1778     case function_sint_to_tod :
       
  1779     {
       
  1780         symbol_c *last_type_symbol = NULL;
       
  1781 
       
  1782         {
       
  1783             identifier_c param_name("IN");
       
  1784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1786             
       
  1787             /* Get the value from a foo(<param_value>) style call */
       
  1788             if (IN_param_value == NULL)
       
  1789               IN_param_value = function_call_param_iterator.next();
       
  1790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1792             
       
  1793             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1794             {
       
  1795         
       
  1796                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1797                 return return_type_symbol;
       
  1798                 
       
  1799             }
       
  1800             
       
  1801             ERROR;
       
  1802         }
       
  1803         
       
  1804     }/*function_sint_to_tod*/
       
  1805     break;
       
  1806 
       
  1807 /****
       
  1808  *SINT_TO_DT
       
  1809  */
       
  1810     case function_sint_to_dt :
       
  1811     {
       
  1812         symbol_c *last_type_symbol = NULL;
       
  1813 
       
  1814         {
       
  1815             identifier_c param_name("IN");
       
  1816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1818             
       
  1819             /* Get the value from a foo(<param_value>) style call */
       
  1820             if (IN_param_value == NULL)
       
  1821               IN_param_value = function_call_param_iterator.next();
       
  1822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1824             
       
  1825             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1826             {
       
  1827         
       
  1828                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1829                 return return_type_symbol;
       
  1830                 
       
  1831             }
       
  1832             
       
  1833             ERROR;
       
  1834         }
       
  1835         
       
  1836     }/*function_sint_to_dt*/
       
  1837     break;
       
  1838 
       
  1839 /****
       
  1840  *INT_TO_REAL
       
  1841  */
       
  1842     case function_int_to_real :
       
  1843     {
       
  1844         symbol_c *last_type_symbol = NULL;
       
  1845 
       
  1846         {
       
  1847             identifier_c param_name("IN");
       
  1848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1850             
       
  1851             /* Get the value from a foo(<param_value>) style call */
       
  1852             if (IN_param_value == NULL)
       
  1853               IN_param_value = function_call_param_iterator.next();
       
  1854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1856             
       
  1857             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1858             {
       
  1859         
       
  1860                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1861                 return return_type_symbol;
       
  1862                 
       
  1863             }
       
  1864             
       
  1865             ERROR;
       
  1866         }
       
  1867         
       
  1868     }/*function_int_to_real*/
       
  1869     break;
       
  1870 
       
  1871 /****
       
  1872  *INT_TO_LREAL
       
  1873  */
       
  1874     case function_int_to_lreal :
       
  1875     {
       
  1876         symbol_c *last_type_symbol = NULL;
       
  1877 
       
  1878         {
       
  1879             identifier_c param_name("IN");
       
  1880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1882             
       
  1883             /* Get the value from a foo(<param_value>) style call */
       
  1884             if (IN_param_value == NULL)
       
  1885               IN_param_value = function_call_param_iterator.next();
       
  1886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1888             
       
  1889             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1890             {
       
  1891         
       
  1892                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1893                 return return_type_symbol;
       
  1894                 
       
  1895             }
       
  1896             
       
  1897             ERROR;
       
  1898         }
       
  1899         
       
  1900     }/*function_int_to_lreal*/
       
  1901     break;
       
  1902 
       
  1903 /****
       
  1904  *INT_TO_SINT
       
  1905  */
       
  1906     case function_int_to_sint :
       
  1907     {
       
  1908         symbol_c *last_type_symbol = NULL;
       
  1909 
       
  1910         {
       
  1911             identifier_c param_name("IN");
       
  1912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1914             
       
  1915             /* Get the value from a foo(<param_value>) style call */
       
  1916             if (IN_param_value == NULL)
       
  1917               IN_param_value = function_call_param_iterator.next();
       
  1918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1920             
       
  1921             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
   706             {
  1922             {
   707         
  1923         
   708                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1924                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
   709                 return return_type_symbol;
  1925                 return return_type_symbol;
   710                 
  1926                 
   711             }
  1927             }
   712             
  1928             
   713             ERROR;
  1929             ERROR;
   714         }
  1930         }
   715         
  1931         
   716     }/*function_lreal_to_sint*/
  1932     }/*function_int_to_sint*/
   717     break;
  1933     break;
   718 
  1934 
   719 /****
  1935 /****
   720  *LREAL_TO_INT
  1936  *INT_TO_DINT
   721  */
  1937  */
   722     case function_lreal_to_int :
  1938     case function_int_to_dint :
   723     {
  1939     {
   724         symbol_c *last_type_symbol = NULL;
  1940         symbol_c *last_type_symbol = NULL;
   725 
  1941 
   726         {
  1942         {
   727             identifier_c param_name("IN");
  1943             identifier_c param_name("IN");
   728             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1944             /* Get the value from a foo(<param_name> = <param_value>) style call */
   729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   730             
  1946             
   731             /* Get the value from a foo(<param_value>) style call */
  1947             /* Get the value from a foo(<param_value>) style call */
   732             if (IN_param_value == NULL)
  1948             if (IN_param_value == NULL)
   733               IN_param_value = function_call_param_iterator.next();
  1949               IN_param_value = function_call_param_iterator.next();
   734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   736             
  1952             
   737             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  1953             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1954             {
       
  1955         
       
  1956                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1957                 return return_type_symbol;
       
  1958                 
       
  1959             }
       
  1960             
       
  1961             ERROR;
       
  1962         }
       
  1963         
       
  1964     }/*function_int_to_dint*/
       
  1965     break;
       
  1966 
       
  1967 /****
       
  1968  *INT_TO_LINT
       
  1969  */
       
  1970     case function_int_to_lint :
       
  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::lint_type_name;
       
  1989                 return return_type_symbol;
       
  1990                 
       
  1991             }
       
  1992             
       
  1993             ERROR;
       
  1994         }
       
  1995         
       
  1996     }/*function_int_to_lint*/
       
  1997     break;
       
  1998 
       
  1999 /****
       
  2000  *INT_TO_USINT
       
  2001  */
       
  2002     case function_int_to_usint :
       
  2003     {
       
  2004         symbol_c *last_type_symbol = NULL;
       
  2005 
       
  2006         {
       
  2007             identifier_c param_name("IN");
       
  2008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2010             
       
  2011             /* Get the value from a foo(<param_value>) style call */
       
  2012             if (IN_param_value == NULL)
       
  2013               IN_param_value = function_call_param_iterator.next();
       
  2014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2016             
       
  2017             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2018             {
       
  2019         
       
  2020                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2021                 return return_type_symbol;
       
  2022                 
       
  2023             }
       
  2024             
       
  2025             ERROR;
       
  2026         }
       
  2027         
       
  2028     }/*function_int_to_usint*/
       
  2029     break;
       
  2030 
       
  2031 /****
       
  2032  *INT_TO_UINT
       
  2033  */
       
  2034     case function_int_to_uint :
       
  2035     {
       
  2036         symbol_c *last_type_symbol = NULL;
       
  2037 
       
  2038         {
       
  2039             identifier_c param_name("IN");
       
  2040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2042             
       
  2043             /* Get the value from a foo(<param_value>) style call */
       
  2044             if (IN_param_value == NULL)
       
  2045               IN_param_value = function_call_param_iterator.next();
       
  2046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2048             
       
  2049             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2050             {
       
  2051         
       
  2052                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2053                 return return_type_symbol;
       
  2054                 
       
  2055             }
       
  2056             
       
  2057             ERROR;
       
  2058         }
       
  2059         
       
  2060     }/*function_int_to_uint*/
       
  2061     break;
       
  2062 
       
  2063 /****
       
  2064  *INT_TO_UDINT
       
  2065  */
       
  2066     case function_int_to_udint :
       
  2067     {
       
  2068         symbol_c *last_type_symbol = NULL;
       
  2069 
       
  2070         {
       
  2071             identifier_c param_name("IN");
       
  2072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2074             
       
  2075             /* Get the value from a foo(<param_value>) style call */
       
  2076             if (IN_param_value == NULL)
       
  2077               IN_param_value = function_call_param_iterator.next();
       
  2078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2080             
       
  2081             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2082             {
       
  2083         
       
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2085                 return return_type_symbol;
       
  2086                 
       
  2087             }
       
  2088             
       
  2089             ERROR;
       
  2090         }
       
  2091         
       
  2092     }/*function_int_to_udint*/
       
  2093     break;
       
  2094 
       
  2095 /****
       
  2096  *INT_TO_ULINT
       
  2097  */
       
  2098     case function_int_to_ulint :
       
  2099     {
       
  2100         symbol_c *last_type_symbol = NULL;
       
  2101 
       
  2102         {
       
  2103             identifier_c param_name("IN");
       
  2104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2106             
       
  2107             /* Get the value from a foo(<param_value>) style call */
       
  2108             if (IN_param_value == NULL)
       
  2109               IN_param_value = function_call_param_iterator.next();
       
  2110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2112             
       
  2113             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2114             {
       
  2115         
       
  2116                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2117                 return return_type_symbol;
       
  2118                 
       
  2119             }
       
  2120             
       
  2121             ERROR;
       
  2122         }
       
  2123         
       
  2124     }/*function_int_to_ulint*/
       
  2125     break;
       
  2126 
       
  2127 /****
       
  2128  *INT_TO_TIME
       
  2129  */
       
  2130     case function_int_to_time :
       
  2131     {
       
  2132         symbol_c *last_type_symbol = NULL;
       
  2133 
       
  2134         {
       
  2135             identifier_c param_name("IN");
       
  2136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2138             
       
  2139             /* Get the value from a foo(<param_value>) style call */
       
  2140             if (IN_param_value == NULL)
       
  2141               IN_param_value = function_call_param_iterator.next();
       
  2142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2144             
       
  2145             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2146             {
       
  2147         
       
  2148                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2149                 return return_type_symbol;
       
  2150                 
       
  2151             }
       
  2152             
       
  2153             ERROR;
       
  2154         }
       
  2155         
       
  2156     }/*function_int_to_time*/
       
  2157     break;
       
  2158 
       
  2159 /****
       
  2160  *INT_TO_BOOL
       
  2161  */
       
  2162     case function_int_to_bool :
       
  2163     {
       
  2164         symbol_c *last_type_symbol = NULL;
       
  2165 
       
  2166         {
       
  2167             identifier_c param_name("IN");
       
  2168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2170             
       
  2171             /* Get the value from a foo(<param_value>) style call */
       
  2172             if (IN_param_value == NULL)
       
  2173               IN_param_value = function_call_param_iterator.next();
       
  2174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2176             
       
  2177             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2178             {
       
  2179         
       
  2180                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2181                 return return_type_symbol;
       
  2182                 
       
  2183             }
       
  2184             
       
  2185             ERROR;
       
  2186         }
       
  2187         
       
  2188     }/*function_int_to_bool*/
       
  2189     break;
       
  2190 
       
  2191 /****
       
  2192  *INT_TO_BYTE
       
  2193  */
       
  2194     case function_int_to_byte :
       
  2195     {
       
  2196         symbol_c *last_type_symbol = NULL;
       
  2197 
       
  2198         {
       
  2199             identifier_c param_name("IN");
       
  2200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2202             
       
  2203             /* Get the value from a foo(<param_value>) style call */
       
  2204             if (IN_param_value == NULL)
       
  2205               IN_param_value = function_call_param_iterator.next();
       
  2206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2208             
       
  2209             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2210             {
       
  2211         
       
  2212                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2213                 return return_type_symbol;
       
  2214                 
       
  2215             }
       
  2216             
       
  2217             ERROR;
       
  2218         }
       
  2219         
       
  2220     }/*function_int_to_byte*/
       
  2221     break;
       
  2222 
       
  2223 /****
       
  2224  *INT_TO_WORD
       
  2225  */
       
  2226     case function_int_to_word :
       
  2227     {
       
  2228         symbol_c *last_type_symbol = NULL;
       
  2229 
       
  2230         {
       
  2231             identifier_c param_name("IN");
       
  2232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2234             
       
  2235             /* Get the value from a foo(<param_value>) style call */
       
  2236             if (IN_param_value == NULL)
       
  2237               IN_param_value = function_call_param_iterator.next();
       
  2238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2240             
       
  2241             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2242             {
       
  2243         
       
  2244                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2245                 return return_type_symbol;
       
  2246                 
       
  2247             }
       
  2248             
       
  2249             ERROR;
       
  2250         }
       
  2251         
       
  2252     }/*function_int_to_word*/
       
  2253     break;
       
  2254 
       
  2255 /****
       
  2256  *INT_TO_DWORD
       
  2257  */
       
  2258     case function_int_to_dword :
       
  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::dword_type_name;
       
  2277                 return return_type_symbol;
       
  2278                 
       
  2279             }
       
  2280             
       
  2281             ERROR;
       
  2282         }
       
  2283         
       
  2284     }/*function_int_to_dword*/
       
  2285     break;
       
  2286 
       
  2287 /****
       
  2288  *INT_TO_LWORD
       
  2289  */
       
  2290     case function_int_to_lword :
       
  2291     {
       
  2292         symbol_c *last_type_symbol = NULL;
       
  2293 
       
  2294         {
       
  2295             identifier_c param_name("IN");
       
  2296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2298             
       
  2299             /* Get the value from a foo(<param_value>) style call */
       
  2300             if (IN_param_value == NULL)
       
  2301               IN_param_value = function_call_param_iterator.next();
       
  2302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2304             
       
  2305             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2306             {
       
  2307         
       
  2308                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2309                 return return_type_symbol;
       
  2310                 
       
  2311             }
       
  2312             
       
  2313             ERROR;
       
  2314         }
       
  2315         
       
  2316     }/*function_int_to_lword*/
       
  2317     break;
       
  2318 
       
  2319 /****
       
  2320  *INT_TO_STRING
       
  2321  */
       
  2322     case function_int_to_string :
       
  2323     {
       
  2324         symbol_c *last_type_symbol = NULL;
       
  2325 
       
  2326         {
       
  2327             identifier_c param_name("IN");
       
  2328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2330             
       
  2331             /* Get the value from a foo(<param_value>) style call */
       
  2332             if (IN_param_value == NULL)
       
  2333               IN_param_value = function_call_param_iterator.next();
       
  2334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2336             
       
  2337             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2338             {
       
  2339         
       
  2340                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2341                 return return_type_symbol;
       
  2342                 
       
  2343             }
       
  2344             
       
  2345             ERROR;
       
  2346         }
       
  2347         
       
  2348     }/*function_int_to_string*/
       
  2349     break;
       
  2350 
       
  2351 /****
       
  2352  *INT_TO_DATE
       
  2353  */
       
  2354     case function_int_to_date :
       
  2355     {
       
  2356         symbol_c *last_type_symbol = NULL;
       
  2357 
       
  2358         {
       
  2359             identifier_c param_name("IN");
       
  2360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2362             
       
  2363             /* Get the value from a foo(<param_value>) style call */
       
  2364             if (IN_param_value == NULL)
       
  2365               IN_param_value = function_call_param_iterator.next();
       
  2366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2368             
       
  2369             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2370             {
       
  2371         
       
  2372                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2373                 return return_type_symbol;
       
  2374                 
       
  2375             }
       
  2376             
       
  2377             ERROR;
       
  2378         }
       
  2379         
       
  2380     }/*function_int_to_date*/
       
  2381     break;
       
  2382 
       
  2383 /****
       
  2384  *INT_TO_TOD
       
  2385  */
       
  2386     case function_int_to_tod :
       
  2387     {
       
  2388         symbol_c *last_type_symbol = NULL;
       
  2389 
       
  2390         {
       
  2391             identifier_c param_name("IN");
       
  2392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2394             
       
  2395             /* Get the value from a foo(<param_value>) style call */
       
  2396             if (IN_param_value == NULL)
       
  2397               IN_param_value = function_call_param_iterator.next();
       
  2398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2400             
       
  2401             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2402             {
       
  2403         
       
  2404                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2405                 return return_type_symbol;
       
  2406                 
       
  2407             }
       
  2408             
       
  2409             ERROR;
       
  2410         }
       
  2411         
       
  2412     }/*function_int_to_tod*/
       
  2413     break;
       
  2414 
       
  2415 /****
       
  2416  *INT_TO_DT
       
  2417  */
       
  2418     case function_int_to_dt :
       
  2419     {
       
  2420         symbol_c *last_type_symbol = NULL;
       
  2421 
       
  2422         {
       
  2423             identifier_c param_name("IN");
       
  2424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2426             
       
  2427             /* Get the value from a foo(<param_value>) style call */
       
  2428             if (IN_param_value == NULL)
       
  2429               IN_param_value = function_call_param_iterator.next();
       
  2430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2432             
       
  2433             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2434             {
       
  2435         
       
  2436                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2437                 return return_type_symbol;
       
  2438                 
       
  2439             }
       
  2440             
       
  2441             ERROR;
       
  2442         }
       
  2443         
       
  2444     }/*function_int_to_dt*/
       
  2445     break;
       
  2446 
       
  2447 /****
       
  2448  *DINT_TO_REAL
       
  2449  */
       
  2450     case function_dint_to_real :
       
  2451     {
       
  2452         symbol_c *last_type_symbol = NULL;
       
  2453 
       
  2454         {
       
  2455             identifier_c param_name("IN");
       
  2456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2458             
       
  2459             /* Get the value from a foo(<param_value>) style call */
       
  2460             if (IN_param_value == NULL)
       
  2461               IN_param_value = function_call_param_iterator.next();
       
  2462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2464             
       
  2465             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2466             {
       
  2467         
       
  2468                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2469                 return return_type_symbol;
       
  2470                 
       
  2471             }
       
  2472             
       
  2473             ERROR;
       
  2474         }
       
  2475         
       
  2476     }/*function_dint_to_real*/
       
  2477     break;
       
  2478 
       
  2479 /****
       
  2480  *DINT_TO_LREAL
       
  2481  */
       
  2482     case function_dint_to_lreal :
       
  2483     {
       
  2484         symbol_c *last_type_symbol = NULL;
       
  2485 
       
  2486         {
       
  2487             identifier_c param_name("IN");
       
  2488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2490             
       
  2491             /* Get the value from a foo(<param_value>) style call */
       
  2492             if (IN_param_value == NULL)
       
  2493               IN_param_value = function_call_param_iterator.next();
       
  2494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2496             
       
  2497             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2498             {
       
  2499         
       
  2500                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2501                 return return_type_symbol;
       
  2502                 
       
  2503             }
       
  2504             
       
  2505             ERROR;
       
  2506         }
       
  2507         
       
  2508     }/*function_dint_to_lreal*/
       
  2509     break;
       
  2510 
       
  2511 /****
       
  2512  *DINT_TO_SINT
       
  2513  */
       
  2514     case function_dint_to_sint :
       
  2515     {
       
  2516         symbol_c *last_type_symbol = NULL;
       
  2517 
       
  2518         {
       
  2519             identifier_c param_name("IN");
       
  2520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2522             
       
  2523             /* Get the value from a foo(<param_value>) style call */
       
  2524             if (IN_param_value == NULL)
       
  2525               IN_param_value = function_call_param_iterator.next();
       
  2526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2528             
       
  2529             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2530             {
       
  2531         
       
  2532                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2533                 return return_type_symbol;
       
  2534                 
       
  2535             }
       
  2536             
       
  2537             ERROR;
       
  2538         }
       
  2539         
       
  2540     }/*function_dint_to_sint*/
       
  2541     break;
       
  2542 
       
  2543 /****
       
  2544  *DINT_TO_INT
       
  2545  */
       
  2546     case function_dint_to_int :
       
  2547     {
       
  2548         symbol_c *last_type_symbol = NULL;
       
  2549 
       
  2550         {
       
  2551             identifier_c param_name("IN");
       
  2552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2554             
       
  2555             /* Get the value from a foo(<param_value>) style call */
       
  2556             if (IN_param_value == NULL)
       
  2557               IN_param_value = function_call_param_iterator.next();
       
  2558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2560             
       
  2561             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
   738             {
  2562             {
   739         
  2563         
   740                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2564                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   741                 return return_type_symbol;
  2565                 return return_type_symbol;
   742                 
  2566                 
   743             }
  2567             }
   744             
  2568             
   745             ERROR;
  2569             ERROR;
   746         }
  2570         }
   747         
  2571         
   748     }/*function_lreal_to_int*/
  2572     }/*function_dint_to_int*/
   749     break;
  2573     break;
   750 
  2574 
   751 /****
  2575 /****
   752  *LREAL_TO_DINT
  2576  *DINT_TO_LINT
   753  */
  2577  */
   754     case function_lreal_to_dint :
  2578     case function_dint_to_lint :
   755     {
  2579     {
   756         symbol_c *last_type_symbol = NULL;
  2580         symbol_c *last_type_symbol = NULL;
   757 
  2581 
   758         {
  2582         {
   759             identifier_c param_name("IN");
  2583             identifier_c param_name("IN");
   760             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2584             /* Get the value from a foo(<param_name> = <param_value>) style call */
   761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   762             
  2586             
   763             /* Get the value from a foo(<param_value>) style call */
  2587             /* Get the value from a foo(<param_value>) style call */
   764             if (IN_param_value == NULL)
  2588             if (IN_param_value == NULL)
   765               IN_param_value = function_call_param_iterator.next();
  2589               IN_param_value = function_call_param_iterator.next();
   766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   768             
  2592             
   769             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  2593             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2594             {
       
  2595         
       
  2596                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2597                 return return_type_symbol;
       
  2598                 
       
  2599             }
       
  2600             
       
  2601             ERROR;
       
  2602         }
       
  2603         
       
  2604     }/*function_dint_to_lint*/
       
  2605     break;
       
  2606 
       
  2607 /****
       
  2608  *DINT_TO_USINT
       
  2609  */
       
  2610     case function_dint_to_usint :
       
  2611     {
       
  2612         symbol_c *last_type_symbol = NULL;
       
  2613 
       
  2614         {
       
  2615             identifier_c param_name("IN");
       
  2616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2618             
       
  2619             /* Get the value from a foo(<param_value>) style call */
       
  2620             if (IN_param_value == NULL)
       
  2621               IN_param_value = function_call_param_iterator.next();
       
  2622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2624             
       
  2625             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2626             {
       
  2627         
       
  2628                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2629                 return return_type_symbol;
       
  2630                 
       
  2631             }
       
  2632             
       
  2633             ERROR;
       
  2634         }
       
  2635         
       
  2636     }/*function_dint_to_usint*/
       
  2637     break;
       
  2638 
       
  2639 /****
       
  2640  *DINT_TO_UINT
       
  2641  */
       
  2642     case function_dint_to_uint :
       
  2643     {
       
  2644         symbol_c *last_type_symbol = NULL;
       
  2645 
       
  2646         {
       
  2647             identifier_c param_name("IN");
       
  2648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2650             
       
  2651             /* Get the value from a foo(<param_value>) style call */
       
  2652             if (IN_param_value == NULL)
       
  2653               IN_param_value = function_call_param_iterator.next();
       
  2654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2656             
       
  2657             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2658             {
       
  2659         
       
  2660                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2661                 return return_type_symbol;
       
  2662                 
       
  2663             }
       
  2664             
       
  2665             ERROR;
       
  2666         }
       
  2667         
       
  2668     }/*function_dint_to_uint*/
       
  2669     break;
       
  2670 
       
  2671 /****
       
  2672  *DINT_TO_UDINT
       
  2673  */
       
  2674     case function_dint_to_udint :
       
  2675     {
       
  2676         symbol_c *last_type_symbol = NULL;
       
  2677 
       
  2678         {
       
  2679             identifier_c param_name("IN");
       
  2680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2682             
       
  2683             /* Get the value from a foo(<param_value>) style call */
       
  2684             if (IN_param_value == NULL)
       
  2685               IN_param_value = function_call_param_iterator.next();
       
  2686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2688             
       
  2689             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2690             {
       
  2691         
       
  2692                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2693                 return return_type_symbol;
       
  2694                 
       
  2695             }
       
  2696             
       
  2697             ERROR;
       
  2698         }
       
  2699         
       
  2700     }/*function_dint_to_udint*/
       
  2701     break;
       
  2702 
       
  2703 /****
       
  2704  *DINT_TO_ULINT
       
  2705  */
       
  2706     case function_dint_to_ulint :
       
  2707     {
       
  2708         symbol_c *last_type_symbol = NULL;
       
  2709 
       
  2710         {
       
  2711             identifier_c param_name("IN");
       
  2712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2714             
       
  2715             /* Get the value from a foo(<param_value>) style call */
       
  2716             if (IN_param_value == NULL)
       
  2717               IN_param_value = function_call_param_iterator.next();
       
  2718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2720             
       
  2721             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2722             {
       
  2723         
       
  2724                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2725                 return return_type_symbol;
       
  2726                 
       
  2727             }
       
  2728             
       
  2729             ERROR;
       
  2730         }
       
  2731         
       
  2732     }/*function_dint_to_ulint*/
       
  2733     break;
       
  2734 
       
  2735 /****
       
  2736  *DINT_TO_TIME
       
  2737  */
       
  2738     case function_dint_to_time :
       
  2739     {
       
  2740         symbol_c *last_type_symbol = NULL;
       
  2741 
       
  2742         {
       
  2743             identifier_c param_name("IN");
       
  2744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2746             
       
  2747             /* Get the value from a foo(<param_value>) style call */
       
  2748             if (IN_param_value == NULL)
       
  2749               IN_param_value = function_call_param_iterator.next();
       
  2750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2752             
       
  2753             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2754             {
       
  2755         
       
  2756                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2757                 return return_type_symbol;
       
  2758                 
       
  2759             }
       
  2760             
       
  2761             ERROR;
       
  2762         }
       
  2763         
       
  2764     }/*function_dint_to_time*/
       
  2765     break;
       
  2766 
       
  2767 /****
       
  2768  *DINT_TO_BOOL
       
  2769  */
       
  2770     case function_dint_to_bool :
       
  2771     {
       
  2772         symbol_c *last_type_symbol = NULL;
       
  2773 
       
  2774         {
       
  2775             identifier_c param_name("IN");
       
  2776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2778             
       
  2779             /* Get the value from a foo(<param_value>) style call */
       
  2780             if (IN_param_value == NULL)
       
  2781               IN_param_value = function_call_param_iterator.next();
       
  2782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2784             
       
  2785             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2786             {
       
  2787         
       
  2788                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2789                 return return_type_symbol;
       
  2790                 
       
  2791             }
       
  2792             
       
  2793             ERROR;
       
  2794         }
       
  2795         
       
  2796     }/*function_dint_to_bool*/
       
  2797     break;
       
  2798 
       
  2799 /****
       
  2800  *DINT_TO_BYTE
       
  2801  */
       
  2802     case function_dint_to_byte :
       
  2803     {
       
  2804         symbol_c *last_type_symbol = NULL;
       
  2805 
       
  2806         {
       
  2807             identifier_c param_name("IN");
       
  2808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2810             
       
  2811             /* Get the value from a foo(<param_value>) style call */
       
  2812             if (IN_param_value == NULL)
       
  2813               IN_param_value = function_call_param_iterator.next();
       
  2814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2816             
       
  2817             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2818             {
       
  2819         
       
  2820                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2821                 return return_type_symbol;
       
  2822                 
       
  2823             }
       
  2824             
       
  2825             ERROR;
       
  2826         }
       
  2827         
       
  2828     }/*function_dint_to_byte*/
       
  2829     break;
       
  2830 
       
  2831 /****
       
  2832  *DINT_TO_WORD
       
  2833  */
       
  2834     case function_dint_to_word :
       
  2835     {
       
  2836         symbol_c *last_type_symbol = NULL;
       
  2837 
       
  2838         {
       
  2839             identifier_c param_name("IN");
       
  2840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2842             
       
  2843             /* Get the value from a foo(<param_value>) style call */
       
  2844             if (IN_param_value == NULL)
       
  2845               IN_param_value = function_call_param_iterator.next();
       
  2846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2848             
       
  2849             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2850             {
       
  2851         
       
  2852                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2853                 return return_type_symbol;
       
  2854                 
       
  2855             }
       
  2856             
       
  2857             ERROR;
       
  2858         }
       
  2859         
       
  2860     }/*function_dint_to_word*/
       
  2861     break;
       
  2862 
       
  2863 /****
       
  2864  *DINT_TO_DWORD
       
  2865  */
       
  2866     case function_dint_to_dword :
       
  2867     {
       
  2868         symbol_c *last_type_symbol = NULL;
       
  2869 
       
  2870         {
       
  2871             identifier_c param_name("IN");
       
  2872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2874             
       
  2875             /* Get the value from a foo(<param_value>) style call */
       
  2876             if (IN_param_value == NULL)
       
  2877               IN_param_value = function_call_param_iterator.next();
       
  2878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2880             
       
  2881             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2882             {
       
  2883         
       
  2884                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2885                 return return_type_symbol;
       
  2886                 
       
  2887             }
       
  2888             
       
  2889             ERROR;
       
  2890         }
       
  2891         
       
  2892     }/*function_dint_to_dword*/
       
  2893     break;
       
  2894 
       
  2895 /****
       
  2896  *DINT_TO_LWORD
       
  2897  */
       
  2898     case function_dint_to_lword :
       
  2899     {
       
  2900         symbol_c *last_type_symbol = NULL;
       
  2901 
       
  2902         {
       
  2903             identifier_c param_name("IN");
       
  2904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2906             
       
  2907             /* Get the value from a foo(<param_value>) style call */
       
  2908             if (IN_param_value == NULL)
       
  2909               IN_param_value = function_call_param_iterator.next();
       
  2910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2912             
       
  2913             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2914             {
       
  2915         
       
  2916                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2917                 return return_type_symbol;
       
  2918                 
       
  2919             }
       
  2920             
       
  2921             ERROR;
       
  2922         }
       
  2923         
       
  2924     }/*function_dint_to_lword*/
       
  2925     break;
       
  2926 
       
  2927 /****
       
  2928  *DINT_TO_STRING
       
  2929  */
       
  2930     case function_dint_to_string :
       
  2931     {
       
  2932         symbol_c *last_type_symbol = NULL;
       
  2933 
       
  2934         {
       
  2935             identifier_c param_name("IN");
       
  2936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2938             
       
  2939             /* Get the value from a foo(<param_value>) style call */
       
  2940             if (IN_param_value == NULL)
       
  2941               IN_param_value = function_call_param_iterator.next();
       
  2942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2944             
       
  2945             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2946             {
       
  2947         
       
  2948                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2949                 return return_type_symbol;
       
  2950                 
       
  2951             }
       
  2952             
       
  2953             ERROR;
       
  2954         }
       
  2955         
       
  2956     }/*function_dint_to_string*/
       
  2957     break;
       
  2958 
       
  2959 /****
       
  2960  *DINT_TO_DATE
       
  2961  */
       
  2962     case function_dint_to_date :
       
  2963     {
       
  2964         symbol_c *last_type_symbol = NULL;
       
  2965 
       
  2966         {
       
  2967             identifier_c param_name("IN");
       
  2968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2970             
       
  2971             /* Get the value from a foo(<param_value>) style call */
       
  2972             if (IN_param_value == NULL)
       
  2973               IN_param_value = function_call_param_iterator.next();
       
  2974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2976             
       
  2977             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2978             {
       
  2979         
       
  2980                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2981                 return return_type_symbol;
       
  2982                 
       
  2983             }
       
  2984             
       
  2985             ERROR;
       
  2986         }
       
  2987         
       
  2988     }/*function_dint_to_date*/
       
  2989     break;
       
  2990 
       
  2991 /****
       
  2992  *DINT_TO_TOD
       
  2993  */
       
  2994     case function_dint_to_tod :
       
  2995     {
       
  2996         symbol_c *last_type_symbol = NULL;
       
  2997 
       
  2998         {
       
  2999             identifier_c param_name("IN");
       
  3000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3002             
       
  3003             /* Get the value from a foo(<param_value>) style call */
       
  3004             if (IN_param_value == NULL)
       
  3005               IN_param_value = function_call_param_iterator.next();
       
  3006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3008             
       
  3009             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3010             {
       
  3011         
       
  3012                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3013                 return return_type_symbol;
       
  3014                 
       
  3015             }
       
  3016             
       
  3017             ERROR;
       
  3018         }
       
  3019         
       
  3020     }/*function_dint_to_tod*/
       
  3021     break;
       
  3022 
       
  3023 /****
       
  3024  *DINT_TO_DT
       
  3025  */
       
  3026     case function_dint_to_dt :
       
  3027     {
       
  3028         symbol_c *last_type_symbol = NULL;
       
  3029 
       
  3030         {
       
  3031             identifier_c param_name("IN");
       
  3032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3034             
       
  3035             /* Get the value from a foo(<param_value>) style call */
       
  3036             if (IN_param_value == NULL)
       
  3037               IN_param_value = function_call_param_iterator.next();
       
  3038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3040             
       
  3041             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3042             {
       
  3043         
       
  3044                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3045                 return return_type_symbol;
       
  3046                 
       
  3047             }
       
  3048             
       
  3049             ERROR;
       
  3050         }
       
  3051         
       
  3052     }/*function_dint_to_dt*/
       
  3053     break;
       
  3054 
       
  3055 /****
       
  3056  *LINT_TO_REAL
       
  3057  */
       
  3058     case function_lint_to_real :
       
  3059     {
       
  3060         symbol_c *last_type_symbol = NULL;
       
  3061 
       
  3062         {
       
  3063             identifier_c param_name("IN");
       
  3064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3066             
       
  3067             /* Get the value from a foo(<param_value>) style call */
       
  3068             if (IN_param_value == NULL)
       
  3069               IN_param_value = function_call_param_iterator.next();
       
  3070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3072             
       
  3073             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3074             {
       
  3075         
       
  3076                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3077                 return return_type_symbol;
       
  3078                 
       
  3079             }
       
  3080             
       
  3081             ERROR;
       
  3082         }
       
  3083         
       
  3084     }/*function_lint_to_real*/
       
  3085     break;
       
  3086 
       
  3087 /****
       
  3088  *LINT_TO_LREAL
       
  3089  */
       
  3090     case function_lint_to_lreal :
       
  3091     {
       
  3092         symbol_c *last_type_symbol = NULL;
       
  3093 
       
  3094         {
       
  3095             identifier_c param_name("IN");
       
  3096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3098             
       
  3099             /* Get the value from a foo(<param_value>) style call */
       
  3100             if (IN_param_value == NULL)
       
  3101               IN_param_value = function_call_param_iterator.next();
       
  3102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3104             
       
  3105             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3106             {
       
  3107         
       
  3108                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3109                 return return_type_symbol;
       
  3110                 
       
  3111             }
       
  3112             
       
  3113             ERROR;
       
  3114         }
       
  3115         
       
  3116     }/*function_lint_to_lreal*/
       
  3117     break;
       
  3118 
       
  3119 /****
       
  3120  *LINT_TO_SINT
       
  3121  */
       
  3122     case function_lint_to_sint :
       
  3123     {
       
  3124         symbol_c *last_type_symbol = NULL;
       
  3125 
       
  3126         {
       
  3127             identifier_c param_name("IN");
       
  3128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3130             
       
  3131             /* Get the value from a foo(<param_value>) style call */
       
  3132             if (IN_param_value == NULL)
       
  3133               IN_param_value = function_call_param_iterator.next();
       
  3134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3136             
       
  3137             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3138             {
       
  3139         
       
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3141                 return return_type_symbol;
       
  3142                 
       
  3143             }
       
  3144             
       
  3145             ERROR;
       
  3146         }
       
  3147         
       
  3148     }/*function_lint_to_sint*/
       
  3149     break;
       
  3150 
       
  3151 /****
       
  3152  *LINT_TO_INT
       
  3153  */
       
  3154     case function_lint_to_int :
       
  3155     {
       
  3156         symbol_c *last_type_symbol = NULL;
       
  3157 
       
  3158         {
       
  3159             identifier_c param_name("IN");
       
  3160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3162             
       
  3163             /* Get the value from a foo(<param_value>) style call */
       
  3164             if (IN_param_value == NULL)
       
  3165               IN_param_value = function_call_param_iterator.next();
       
  3166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3168             
       
  3169             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3170             {
       
  3171         
       
  3172                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3173                 return return_type_symbol;
       
  3174                 
       
  3175             }
       
  3176             
       
  3177             ERROR;
       
  3178         }
       
  3179         
       
  3180     }/*function_lint_to_int*/
       
  3181     break;
       
  3182 
       
  3183 /****
       
  3184  *LINT_TO_DINT
       
  3185  */
       
  3186     case function_lint_to_dint :
       
  3187     {
       
  3188         symbol_c *last_type_symbol = NULL;
       
  3189 
       
  3190         {
       
  3191             identifier_c param_name("IN");
       
  3192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3194             
       
  3195             /* Get the value from a foo(<param_value>) style call */
       
  3196             if (IN_param_value == NULL)
       
  3197               IN_param_value = function_call_param_iterator.next();
       
  3198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3200             
       
  3201             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
   770             {
  3202             {
   771         
  3203         
   772                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3204                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   773                 return return_type_symbol;
  3205                 return return_type_symbol;
   774                 
  3206                 
   775             }
  3207             }
   776             
  3208             
   777             ERROR;
  3209             ERROR;
   778         }
  3210         }
   779         
  3211         
   780     }/*function_lreal_to_dint*/
  3212     }/*function_lint_to_dint*/
   781     break;
  3213     break;
   782 
  3214 
   783 /****
  3215 /****
   784  *LREAL_TO_LINT
  3216  *LINT_TO_USINT
   785  */
  3217  */
   786     case function_lreal_to_lint :
  3218     case function_lint_to_usint :
   787     {
  3219     {
   788         symbol_c *last_type_symbol = NULL;
  3220         symbol_c *last_type_symbol = NULL;
   789 
  3221 
   790         {
  3222         {
   791             identifier_c param_name("IN");
  3223             identifier_c param_name("IN");
   792             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3224             /* Get the value from a foo(<param_name> = <param_value>) style call */
   793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   794             
  3226             
   795             /* Get the value from a foo(<param_value>) style call */
  3227             /* Get the value from a foo(<param_value>) style call */
   796             if (IN_param_value == NULL)
  3228             if (IN_param_value == NULL)
   797               IN_param_value = function_call_param_iterator.next();
  3229               IN_param_value = function_call_param_iterator.next();
   798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   800             
  3232             
   801             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  3233             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3234             {
       
  3235         
       
  3236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3237                 return return_type_symbol;
       
  3238                 
       
  3239             }
       
  3240             
       
  3241             ERROR;
       
  3242         }
       
  3243         
       
  3244     }/*function_lint_to_usint*/
       
  3245     break;
       
  3246 
       
  3247 /****
       
  3248  *LINT_TO_UINT
       
  3249  */
       
  3250     case function_lint_to_uint :
       
  3251     {
       
  3252         symbol_c *last_type_symbol = NULL;
       
  3253 
       
  3254         {
       
  3255             identifier_c param_name("IN");
       
  3256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3258             
       
  3259             /* Get the value from a foo(<param_value>) style call */
       
  3260             if (IN_param_value == NULL)
       
  3261               IN_param_value = function_call_param_iterator.next();
       
  3262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3264             
       
  3265             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3266             {
       
  3267         
       
  3268                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3269                 return return_type_symbol;
       
  3270                 
       
  3271             }
       
  3272             
       
  3273             ERROR;
       
  3274         }
       
  3275         
       
  3276     }/*function_lint_to_uint*/
       
  3277     break;
       
  3278 
       
  3279 /****
       
  3280  *LINT_TO_UDINT
       
  3281  */
       
  3282     case function_lint_to_udint :
       
  3283     {
       
  3284         symbol_c *last_type_symbol = NULL;
       
  3285 
       
  3286         {
       
  3287             identifier_c param_name("IN");
       
  3288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3290             
       
  3291             /* Get the value from a foo(<param_value>) style call */
       
  3292             if (IN_param_value == NULL)
       
  3293               IN_param_value = function_call_param_iterator.next();
       
  3294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3296             
       
  3297             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3298             {
       
  3299         
       
  3300                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3301                 return return_type_symbol;
       
  3302                 
       
  3303             }
       
  3304             
       
  3305             ERROR;
       
  3306         }
       
  3307         
       
  3308     }/*function_lint_to_udint*/
       
  3309     break;
       
  3310 
       
  3311 /****
       
  3312  *LINT_TO_ULINT
       
  3313  */
       
  3314     case function_lint_to_ulint :
       
  3315     {
       
  3316         symbol_c *last_type_symbol = NULL;
       
  3317 
       
  3318         {
       
  3319             identifier_c param_name("IN");
       
  3320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3322             
       
  3323             /* Get the value from a foo(<param_value>) style call */
       
  3324             if (IN_param_value == NULL)
       
  3325               IN_param_value = function_call_param_iterator.next();
       
  3326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3328             
       
  3329             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3330             {
       
  3331         
       
  3332                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3333                 return return_type_symbol;
       
  3334                 
       
  3335             }
       
  3336             
       
  3337             ERROR;
       
  3338         }
       
  3339         
       
  3340     }/*function_lint_to_ulint*/
       
  3341     break;
       
  3342 
       
  3343 /****
       
  3344  *LINT_TO_TIME
       
  3345  */
       
  3346     case function_lint_to_time :
       
  3347     {
       
  3348         symbol_c *last_type_symbol = NULL;
       
  3349 
       
  3350         {
       
  3351             identifier_c param_name("IN");
       
  3352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3354             
       
  3355             /* Get the value from a foo(<param_value>) style call */
       
  3356             if (IN_param_value == NULL)
       
  3357               IN_param_value = function_call_param_iterator.next();
       
  3358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3360             
       
  3361             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3362             {
       
  3363         
       
  3364                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3365                 return return_type_symbol;
       
  3366                 
       
  3367             }
       
  3368             
       
  3369             ERROR;
       
  3370         }
       
  3371         
       
  3372     }/*function_lint_to_time*/
       
  3373     break;
       
  3374 
       
  3375 /****
       
  3376  *LINT_TO_BOOL
       
  3377  */
       
  3378     case function_lint_to_bool :
       
  3379     {
       
  3380         symbol_c *last_type_symbol = NULL;
       
  3381 
       
  3382         {
       
  3383             identifier_c param_name("IN");
       
  3384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3386             
       
  3387             /* Get the value from a foo(<param_value>) style call */
       
  3388             if (IN_param_value == NULL)
       
  3389               IN_param_value = function_call_param_iterator.next();
       
  3390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3392             
       
  3393             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3394             {
       
  3395         
       
  3396                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3397                 return return_type_symbol;
       
  3398                 
       
  3399             }
       
  3400             
       
  3401             ERROR;
       
  3402         }
       
  3403         
       
  3404     }/*function_lint_to_bool*/
       
  3405     break;
       
  3406 
       
  3407 /****
       
  3408  *LINT_TO_BYTE
       
  3409  */
       
  3410     case function_lint_to_byte :
       
  3411     {
       
  3412         symbol_c *last_type_symbol = NULL;
       
  3413 
       
  3414         {
       
  3415             identifier_c param_name("IN");
       
  3416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3418             
       
  3419             /* Get the value from a foo(<param_value>) style call */
       
  3420             if (IN_param_value == NULL)
       
  3421               IN_param_value = function_call_param_iterator.next();
       
  3422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3424             
       
  3425             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3426             {
       
  3427         
       
  3428                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3429                 return return_type_symbol;
       
  3430                 
       
  3431             }
       
  3432             
       
  3433             ERROR;
       
  3434         }
       
  3435         
       
  3436     }/*function_lint_to_byte*/
       
  3437     break;
       
  3438 
       
  3439 /****
       
  3440  *LINT_TO_WORD
       
  3441  */
       
  3442     case function_lint_to_word :
       
  3443     {
       
  3444         symbol_c *last_type_symbol = NULL;
       
  3445 
       
  3446         {
       
  3447             identifier_c param_name("IN");
       
  3448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3450             
       
  3451             /* Get the value from a foo(<param_value>) style call */
       
  3452             if (IN_param_value == NULL)
       
  3453               IN_param_value = function_call_param_iterator.next();
       
  3454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3456             
       
  3457             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3458             {
       
  3459         
       
  3460                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3461                 return return_type_symbol;
       
  3462                 
       
  3463             }
       
  3464             
       
  3465             ERROR;
       
  3466         }
       
  3467         
       
  3468     }/*function_lint_to_word*/
       
  3469     break;
       
  3470 
       
  3471 /****
       
  3472  *LINT_TO_DWORD
       
  3473  */
       
  3474     case function_lint_to_dword :
       
  3475     {
       
  3476         symbol_c *last_type_symbol = NULL;
       
  3477 
       
  3478         {
       
  3479             identifier_c param_name("IN");
       
  3480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3482             
       
  3483             /* Get the value from a foo(<param_value>) style call */
       
  3484             if (IN_param_value == NULL)
       
  3485               IN_param_value = function_call_param_iterator.next();
       
  3486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3488             
       
  3489             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3490             {
       
  3491         
       
  3492                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3493                 return return_type_symbol;
       
  3494                 
       
  3495             }
       
  3496             
       
  3497             ERROR;
       
  3498         }
       
  3499         
       
  3500     }/*function_lint_to_dword*/
       
  3501     break;
       
  3502 
       
  3503 /****
       
  3504  *LINT_TO_LWORD
       
  3505  */
       
  3506     case function_lint_to_lword :
       
  3507     {
       
  3508         symbol_c *last_type_symbol = NULL;
       
  3509 
       
  3510         {
       
  3511             identifier_c param_name("IN");
       
  3512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3514             
       
  3515             /* Get the value from a foo(<param_value>) style call */
       
  3516             if (IN_param_value == NULL)
       
  3517               IN_param_value = function_call_param_iterator.next();
       
  3518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3520             
       
  3521             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3522             {
       
  3523         
       
  3524                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3525                 return return_type_symbol;
       
  3526                 
       
  3527             }
       
  3528             
       
  3529             ERROR;
       
  3530         }
       
  3531         
       
  3532     }/*function_lint_to_lword*/
       
  3533     break;
       
  3534 
       
  3535 /****
       
  3536  *LINT_TO_STRING
       
  3537  */
       
  3538     case function_lint_to_string :
       
  3539     {
       
  3540         symbol_c *last_type_symbol = NULL;
       
  3541 
       
  3542         {
       
  3543             identifier_c param_name("IN");
       
  3544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3546             
       
  3547             /* Get the value from a foo(<param_value>) style call */
       
  3548             if (IN_param_value == NULL)
       
  3549               IN_param_value = function_call_param_iterator.next();
       
  3550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3552             
       
  3553             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3554             {
       
  3555         
       
  3556                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3557                 return return_type_symbol;
       
  3558                 
       
  3559             }
       
  3560             
       
  3561             ERROR;
       
  3562         }
       
  3563         
       
  3564     }/*function_lint_to_string*/
       
  3565     break;
       
  3566 
       
  3567 /****
       
  3568  *LINT_TO_DATE
       
  3569  */
       
  3570     case function_lint_to_date :
       
  3571     {
       
  3572         symbol_c *last_type_symbol = NULL;
       
  3573 
       
  3574         {
       
  3575             identifier_c param_name("IN");
       
  3576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3578             
       
  3579             /* Get the value from a foo(<param_value>) style call */
       
  3580             if (IN_param_value == NULL)
       
  3581               IN_param_value = function_call_param_iterator.next();
       
  3582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3584             
       
  3585             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3586             {
       
  3587         
       
  3588                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3589                 return return_type_symbol;
       
  3590                 
       
  3591             }
       
  3592             
       
  3593             ERROR;
       
  3594         }
       
  3595         
       
  3596     }/*function_lint_to_date*/
       
  3597     break;
       
  3598 
       
  3599 /****
       
  3600  *LINT_TO_TOD
       
  3601  */
       
  3602     case function_lint_to_tod :
       
  3603     {
       
  3604         symbol_c *last_type_symbol = NULL;
       
  3605 
       
  3606         {
       
  3607             identifier_c param_name("IN");
       
  3608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3610             
       
  3611             /* Get the value from a foo(<param_value>) style call */
       
  3612             if (IN_param_value == NULL)
       
  3613               IN_param_value = function_call_param_iterator.next();
       
  3614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3616             
       
  3617             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3618             {
       
  3619         
       
  3620                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3621                 return return_type_symbol;
       
  3622                 
       
  3623             }
       
  3624             
       
  3625             ERROR;
       
  3626         }
       
  3627         
       
  3628     }/*function_lint_to_tod*/
       
  3629     break;
       
  3630 
       
  3631 /****
       
  3632  *LINT_TO_DT
       
  3633  */
       
  3634     case function_lint_to_dt :
       
  3635     {
       
  3636         symbol_c *last_type_symbol = NULL;
       
  3637 
       
  3638         {
       
  3639             identifier_c param_name("IN");
       
  3640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3642             
       
  3643             /* Get the value from a foo(<param_value>) style call */
       
  3644             if (IN_param_value == NULL)
       
  3645               IN_param_value = function_call_param_iterator.next();
       
  3646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3648             
       
  3649             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3650             {
       
  3651         
       
  3652                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3653                 return return_type_symbol;
       
  3654                 
       
  3655             }
       
  3656             
       
  3657             ERROR;
       
  3658         }
       
  3659         
       
  3660     }/*function_lint_to_dt*/
       
  3661     break;
       
  3662 
       
  3663 /****
       
  3664  *USINT_TO_REAL
       
  3665  */
       
  3666     case function_usint_to_real :
       
  3667     {
       
  3668         symbol_c *last_type_symbol = NULL;
       
  3669 
       
  3670         {
       
  3671             identifier_c param_name("IN");
       
  3672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3674             
       
  3675             /* Get the value from a foo(<param_value>) style call */
       
  3676             if (IN_param_value == NULL)
       
  3677               IN_param_value = function_call_param_iterator.next();
       
  3678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3680             
       
  3681             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3682             {
       
  3683         
       
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3685                 return return_type_symbol;
       
  3686                 
       
  3687             }
       
  3688             
       
  3689             ERROR;
       
  3690         }
       
  3691         
       
  3692     }/*function_usint_to_real*/
       
  3693     break;
       
  3694 
       
  3695 /****
       
  3696  *USINT_TO_LREAL
       
  3697  */
       
  3698     case function_usint_to_lreal :
       
  3699     {
       
  3700         symbol_c *last_type_symbol = NULL;
       
  3701 
       
  3702         {
       
  3703             identifier_c param_name("IN");
       
  3704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3706             
       
  3707             /* Get the value from a foo(<param_value>) style call */
       
  3708             if (IN_param_value == NULL)
       
  3709               IN_param_value = function_call_param_iterator.next();
       
  3710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3712             
       
  3713             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3714             {
       
  3715         
       
  3716                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3717                 return return_type_symbol;
       
  3718                 
       
  3719             }
       
  3720             
       
  3721             ERROR;
       
  3722         }
       
  3723         
       
  3724     }/*function_usint_to_lreal*/
       
  3725     break;
       
  3726 
       
  3727 /****
       
  3728  *USINT_TO_SINT
       
  3729  */
       
  3730     case function_usint_to_sint :
       
  3731     {
       
  3732         symbol_c *last_type_symbol = NULL;
       
  3733 
       
  3734         {
       
  3735             identifier_c param_name("IN");
       
  3736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3738             
       
  3739             /* Get the value from a foo(<param_value>) style call */
       
  3740             if (IN_param_value == NULL)
       
  3741               IN_param_value = function_call_param_iterator.next();
       
  3742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3744             
       
  3745             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3746             {
       
  3747         
       
  3748                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3749                 return return_type_symbol;
       
  3750                 
       
  3751             }
       
  3752             
       
  3753             ERROR;
       
  3754         }
       
  3755         
       
  3756     }/*function_usint_to_sint*/
       
  3757     break;
       
  3758 
       
  3759 /****
       
  3760  *USINT_TO_INT
       
  3761  */
       
  3762     case function_usint_to_int :
       
  3763     {
       
  3764         symbol_c *last_type_symbol = NULL;
       
  3765 
       
  3766         {
       
  3767             identifier_c param_name("IN");
       
  3768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3770             
       
  3771             /* Get the value from a foo(<param_value>) style call */
       
  3772             if (IN_param_value == NULL)
       
  3773               IN_param_value = function_call_param_iterator.next();
       
  3774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3776             
       
  3777             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3778             {
       
  3779         
       
  3780                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3781                 return return_type_symbol;
       
  3782                 
       
  3783             }
       
  3784             
       
  3785             ERROR;
       
  3786         }
       
  3787         
       
  3788     }/*function_usint_to_int*/
       
  3789     break;
       
  3790 
       
  3791 /****
       
  3792  *USINT_TO_DINT
       
  3793  */
       
  3794     case function_usint_to_dint :
       
  3795     {
       
  3796         symbol_c *last_type_symbol = NULL;
       
  3797 
       
  3798         {
       
  3799             identifier_c param_name("IN");
       
  3800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3802             
       
  3803             /* Get the value from a foo(<param_value>) style call */
       
  3804             if (IN_param_value == NULL)
       
  3805               IN_param_value = function_call_param_iterator.next();
       
  3806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3808             
       
  3809             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3810             {
       
  3811         
       
  3812                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3813                 return return_type_symbol;
       
  3814                 
       
  3815             }
       
  3816             
       
  3817             ERROR;
       
  3818         }
       
  3819         
       
  3820     }/*function_usint_to_dint*/
       
  3821     break;
       
  3822 
       
  3823 /****
       
  3824  *USINT_TO_LINT
       
  3825  */
       
  3826     case function_usint_to_lint :
       
  3827     {
       
  3828         symbol_c *last_type_symbol = NULL;
       
  3829 
       
  3830         {
       
  3831             identifier_c param_name("IN");
       
  3832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3834             
       
  3835             /* Get the value from a foo(<param_value>) style call */
       
  3836             if (IN_param_value == NULL)
       
  3837               IN_param_value = function_call_param_iterator.next();
       
  3838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3840             
       
  3841             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
   802             {
  3842             {
   803         
  3843         
   804                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3844                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   805                 return return_type_symbol;
  3845                 return return_type_symbol;
   806                 
  3846                 
   807             }
  3847             }
   808             
  3848             
   809             ERROR;
  3849             ERROR;
   810         }
  3850         }
   811         
  3851         
   812     }/*function_lreal_to_lint*/
  3852     }/*function_usint_to_lint*/
   813     break;
  3853     break;
   814 
  3854 
   815 /****
  3855 /****
   816  *LREAL_TO_USINT
  3856  *USINT_TO_UINT
   817  */
  3857  */
   818     case function_lreal_to_usint :
  3858     case function_usint_to_uint :
   819     {
  3859     {
   820         symbol_c *last_type_symbol = NULL;
  3860         symbol_c *last_type_symbol = NULL;
   821 
  3861 
   822         {
  3862         {
   823             identifier_c param_name("IN");
  3863             identifier_c param_name("IN");
   824             /* Get the value from a foo(<param_name> = <param_value>) style call */
  3864             /* Get the value from a foo(<param_name> = <param_value>) style call */
   825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  3865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   826             
  3866             
   827             /* Get the value from a foo(<param_value>) style call */
  3867             /* Get the value from a foo(<param_value>) style call */
   828             if (IN_param_value == NULL)
  3868             if (IN_param_value == NULL)
   829               IN_param_value = function_call_param_iterator.next();
  3869               IN_param_value = function_call_param_iterator.next();
   830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   832             
  3872             
   833             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  3873             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3874             {
       
  3875         
       
  3876                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3877                 return return_type_symbol;
       
  3878                 
       
  3879             }
       
  3880             
       
  3881             ERROR;
       
  3882         }
       
  3883         
       
  3884     }/*function_usint_to_uint*/
       
  3885     break;
       
  3886 
       
  3887 /****
       
  3888  *USINT_TO_UDINT
       
  3889  */
       
  3890     case function_usint_to_udint :
       
  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::udint_type_name;
       
  3909                 return return_type_symbol;
       
  3910                 
       
  3911             }
       
  3912             
       
  3913             ERROR;
       
  3914         }
       
  3915         
       
  3916     }/*function_usint_to_udint*/
       
  3917     break;
       
  3918 
       
  3919 /****
       
  3920  *USINT_TO_ULINT
       
  3921  */
       
  3922     case function_usint_to_ulint :
       
  3923     {
       
  3924         symbol_c *last_type_symbol = NULL;
       
  3925 
       
  3926         {
       
  3927             identifier_c param_name("IN");
       
  3928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3930             
       
  3931             /* Get the value from a foo(<param_value>) style call */
       
  3932             if (IN_param_value == NULL)
       
  3933               IN_param_value = function_call_param_iterator.next();
       
  3934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3936             
       
  3937             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3938             {
       
  3939         
       
  3940                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3941                 return return_type_symbol;
       
  3942                 
       
  3943             }
       
  3944             
       
  3945             ERROR;
       
  3946         }
       
  3947         
       
  3948     }/*function_usint_to_ulint*/
       
  3949     break;
       
  3950 
       
  3951 /****
       
  3952  *USINT_TO_TIME
       
  3953  */
       
  3954     case function_usint_to_time :
       
  3955     {
       
  3956         symbol_c *last_type_symbol = NULL;
       
  3957 
       
  3958         {
       
  3959             identifier_c param_name("IN");
       
  3960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3962             
       
  3963             /* Get the value from a foo(<param_value>) style call */
       
  3964             if (IN_param_value == NULL)
       
  3965               IN_param_value = function_call_param_iterator.next();
       
  3966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3968             
       
  3969             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3970             {
       
  3971         
       
  3972                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3973                 return return_type_symbol;
       
  3974                 
       
  3975             }
       
  3976             
       
  3977             ERROR;
       
  3978         }
       
  3979         
       
  3980     }/*function_usint_to_time*/
       
  3981     break;
       
  3982 
       
  3983 /****
       
  3984  *USINT_TO_BOOL
       
  3985  */
       
  3986     case function_usint_to_bool :
       
  3987     {
       
  3988         symbol_c *last_type_symbol = NULL;
       
  3989 
       
  3990         {
       
  3991             identifier_c param_name("IN");
       
  3992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3994             
       
  3995             /* Get the value from a foo(<param_value>) style call */
       
  3996             if (IN_param_value == NULL)
       
  3997               IN_param_value = function_call_param_iterator.next();
       
  3998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4000             
       
  4001             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4002             {
       
  4003         
       
  4004                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4005                 return return_type_symbol;
       
  4006                 
       
  4007             }
       
  4008             
       
  4009             ERROR;
       
  4010         }
       
  4011         
       
  4012     }/*function_usint_to_bool*/
       
  4013     break;
       
  4014 
       
  4015 /****
       
  4016  *USINT_TO_BYTE
       
  4017  */
       
  4018     case function_usint_to_byte :
       
  4019     {
       
  4020         symbol_c *last_type_symbol = NULL;
       
  4021 
       
  4022         {
       
  4023             identifier_c param_name("IN");
       
  4024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4026             
       
  4027             /* Get the value from a foo(<param_value>) style call */
       
  4028             if (IN_param_value == NULL)
       
  4029               IN_param_value = function_call_param_iterator.next();
       
  4030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4032             
       
  4033             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4034             {
       
  4035         
       
  4036                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4037                 return return_type_symbol;
       
  4038                 
       
  4039             }
       
  4040             
       
  4041             ERROR;
       
  4042         }
       
  4043         
       
  4044     }/*function_usint_to_byte*/
       
  4045     break;
       
  4046 
       
  4047 /****
       
  4048  *USINT_TO_WORD
       
  4049  */
       
  4050     case function_usint_to_word :
       
  4051     {
       
  4052         symbol_c *last_type_symbol = NULL;
       
  4053 
       
  4054         {
       
  4055             identifier_c param_name("IN");
       
  4056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4058             
       
  4059             /* Get the value from a foo(<param_value>) style call */
       
  4060             if (IN_param_value == NULL)
       
  4061               IN_param_value = function_call_param_iterator.next();
       
  4062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4064             
       
  4065             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4066             {
       
  4067         
       
  4068                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4069                 return return_type_symbol;
       
  4070                 
       
  4071             }
       
  4072             
       
  4073             ERROR;
       
  4074         }
       
  4075         
       
  4076     }/*function_usint_to_word*/
       
  4077     break;
       
  4078 
       
  4079 /****
       
  4080  *USINT_TO_DWORD
       
  4081  */
       
  4082     case function_usint_to_dword :
       
  4083     {
       
  4084         symbol_c *last_type_symbol = NULL;
       
  4085 
       
  4086         {
       
  4087             identifier_c param_name("IN");
       
  4088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4090             
       
  4091             /* Get the value from a foo(<param_value>) style call */
       
  4092             if (IN_param_value == NULL)
       
  4093               IN_param_value = function_call_param_iterator.next();
       
  4094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4096             
       
  4097             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4098             {
       
  4099         
       
  4100                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4101                 return return_type_symbol;
       
  4102                 
       
  4103             }
       
  4104             
       
  4105             ERROR;
       
  4106         }
       
  4107         
       
  4108     }/*function_usint_to_dword*/
       
  4109     break;
       
  4110 
       
  4111 /****
       
  4112  *USINT_TO_LWORD
       
  4113  */
       
  4114     case function_usint_to_lword :
       
  4115     {
       
  4116         symbol_c *last_type_symbol = NULL;
       
  4117 
       
  4118         {
       
  4119             identifier_c param_name("IN");
       
  4120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4122             
       
  4123             /* Get the value from a foo(<param_value>) style call */
       
  4124             if (IN_param_value == NULL)
       
  4125               IN_param_value = function_call_param_iterator.next();
       
  4126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4128             
       
  4129             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4130             {
       
  4131         
       
  4132                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4133                 return return_type_symbol;
       
  4134                 
       
  4135             }
       
  4136             
       
  4137             ERROR;
       
  4138         }
       
  4139         
       
  4140     }/*function_usint_to_lword*/
       
  4141     break;
       
  4142 
       
  4143 /****
       
  4144  *USINT_TO_STRING
       
  4145  */
       
  4146     case function_usint_to_string :
       
  4147     {
       
  4148         symbol_c *last_type_symbol = NULL;
       
  4149 
       
  4150         {
       
  4151             identifier_c param_name("IN");
       
  4152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4154             
       
  4155             /* Get the value from a foo(<param_value>) style call */
       
  4156             if (IN_param_value == NULL)
       
  4157               IN_param_value = function_call_param_iterator.next();
       
  4158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4160             
       
  4161             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4162             {
       
  4163         
       
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4165                 return return_type_symbol;
       
  4166                 
       
  4167             }
       
  4168             
       
  4169             ERROR;
       
  4170         }
       
  4171         
       
  4172     }/*function_usint_to_string*/
       
  4173     break;
       
  4174 
       
  4175 /****
       
  4176  *USINT_TO_DATE
       
  4177  */
       
  4178     case function_usint_to_date :
       
  4179     {
       
  4180         symbol_c *last_type_symbol = NULL;
       
  4181 
       
  4182         {
       
  4183             identifier_c param_name("IN");
       
  4184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4186             
       
  4187             /* Get the value from a foo(<param_value>) style call */
       
  4188             if (IN_param_value == NULL)
       
  4189               IN_param_value = function_call_param_iterator.next();
       
  4190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4192             
       
  4193             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4194             {
       
  4195         
       
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4197                 return return_type_symbol;
       
  4198                 
       
  4199             }
       
  4200             
       
  4201             ERROR;
       
  4202         }
       
  4203         
       
  4204     }/*function_usint_to_date*/
       
  4205     break;
       
  4206 
       
  4207 /****
       
  4208  *USINT_TO_TOD
       
  4209  */
       
  4210     case function_usint_to_tod :
       
  4211     {
       
  4212         symbol_c *last_type_symbol = NULL;
       
  4213 
       
  4214         {
       
  4215             identifier_c param_name("IN");
       
  4216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4218             
       
  4219             /* Get the value from a foo(<param_value>) style call */
       
  4220             if (IN_param_value == NULL)
       
  4221               IN_param_value = function_call_param_iterator.next();
       
  4222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4224             
       
  4225             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4226             {
       
  4227         
       
  4228                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4229                 return return_type_symbol;
       
  4230                 
       
  4231             }
       
  4232             
       
  4233             ERROR;
       
  4234         }
       
  4235         
       
  4236     }/*function_usint_to_tod*/
       
  4237     break;
       
  4238 
       
  4239 /****
       
  4240  *USINT_TO_DT
       
  4241  */
       
  4242     case function_usint_to_dt :
       
  4243     {
       
  4244         symbol_c *last_type_symbol = NULL;
       
  4245 
       
  4246         {
       
  4247             identifier_c param_name("IN");
       
  4248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4250             
       
  4251             /* Get the value from a foo(<param_value>) style call */
       
  4252             if (IN_param_value == NULL)
       
  4253               IN_param_value = function_call_param_iterator.next();
       
  4254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4256             
       
  4257             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4258             {
       
  4259         
       
  4260                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4261                 return return_type_symbol;
       
  4262                 
       
  4263             }
       
  4264             
       
  4265             ERROR;
       
  4266         }
       
  4267         
       
  4268     }/*function_usint_to_dt*/
       
  4269     break;
       
  4270 
       
  4271 /****
       
  4272  *UINT_TO_REAL
       
  4273  */
       
  4274     case function_uint_to_real :
       
  4275     {
       
  4276         symbol_c *last_type_symbol = NULL;
       
  4277 
       
  4278         {
       
  4279             identifier_c param_name("IN");
       
  4280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4282             
       
  4283             /* Get the value from a foo(<param_value>) style call */
       
  4284             if (IN_param_value == NULL)
       
  4285               IN_param_value = function_call_param_iterator.next();
       
  4286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4288             
       
  4289             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4290             {
       
  4291         
       
  4292                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4293                 return return_type_symbol;
       
  4294                 
       
  4295             }
       
  4296             
       
  4297             ERROR;
       
  4298         }
       
  4299         
       
  4300     }/*function_uint_to_real*/
       
  4301     break;
       
  4302 
       
  4303 /****
       
  4304  *UINT_TO_LREAL
       
  4305  */
       
  4306     case function_uint_to_lreal :
       
  4307     {
       
  4308         symbol_c *last_type_symbol = NULL;
       
  4309 
       
  4310         {
       
  4311             identifier_c param_name("IN");
       
  4312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4314             
       
  4315             /* Get the value from a foo(<param_value>) style call */
       
  4316             if (IN_param_value == NULL)
       
  4317               IN_param_value = function_call_param_iterator.next();
       
  4318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4320             
       
  4321             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4322             {
       
  4323         
       
  4324                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4325                 return return_type_symbol;
       
  4326                 
       
  4327             }
       
  4328             
       
  4329             ERROR;
       
  4330         }
       
  4331         
       
  4332     }/*function_uint_to_lreal*/
       
  4333     break;
       
  4334 
       
  4335 /****
       
  4336  *UINT_TO_SINT
       
  4337  */
       
  4338     case function_uint_to_sint :
       
  4339     {
       
  4340         symbol_c *last_type_symbol = NULL;
       
  4341 
       
  4342         {
       
  4343             identifier_c param_name("IN");
       
  4344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4346             
       
  4347             /* Get the value from a foo(<param_value>) style call */
       
  4348             if (IN_param_value == NULL)
       
  4349               IN_param_value = function_call_param_iterator.next();
       
  4350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4352             
       
  4353             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4354             {
       
  4355         
       
  4356                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4357                 return return_type_symbol;
       
  4358                 
       
  4359             }
       
  4360             
       
  4361             ERROR;
       
  4362         }
       
  4363         
       
  4364     }/*function_uint_to_sint*/
       
  4365     break;
       
  4366 
       
  4367 /****
       
  4368  *UINT_TO_INT
       
  4369  */
       
  4370     case function_uint_to_int :
       
  4371     {
       
  4372         symbol_c *last_type_symbol = NULL;
       
  4373 
       
  4374         {
       
  4375             identifier_c param_name("IN");
       
  4376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4378             
       
  4379             /* Get the value from a foo(<param_value>) style call */
       
  4380             if (IN_param_value == NULL)
       
  4381               IN_param_value = function_call_param_iterator.next();
       
  4382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4384             
       
  4385             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4386             {
       
  4387         
       
  4388                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4389                 return return_type_symbol;
       
  4390                 
       
  4391             }
       
  4392             
       
  4393             ERROR;
       
  4394         }
       
  4395         
       
  4396     }/*function_uint_to_int*/
       
  4397     break;
       
  4398 
       
  4399 /****
       
  4400  *UINT_TO_DINT
       
  4401  */
       
  4402     case function_uint_to_dint :
       
  4403     {
       
  4404         symbol_c *last_type_symbol = NULL;
       
  4405 
       
  4406         {
       
  4407             identifier_c param_name("IN");
       
  4408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4410             
       
  4411             /* Get the value from a foo(<param_value>) style call */
       
  4412             if (IN_param_value == NULL)
       
  4413               IN_param_value = function_call_param_iterator.next();
       
  4414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4416             
       
  4417             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4418             {
       
  4419         
       
  4420                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4421                 return return_type_symbol;
       
  4422                 
       
  4423             }
       
  4424             
       
  4425             ERROR;
       
  4426         }
       
  4427         
       
  4428     }/*function_uint_to_dint*/
       
  4429     break;
       
  4430 
       
  4431 /****
       
  4432  *UINT_TO_LINT
       
  4433  */
       
  4434     case function_uint_to_lint :
       
  4435     {
       
  4436         symbol_c *last_type_symbol = NULL;
       
  4437 
       
  4438         {
       
  4439             identifier_c param_name("IN");
       
  4440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4442             
       
  4443             /* Get the value from a foo(<param_value>) style call */
       
  4444             if (IN_param_value == NULL)
       
  4445               IN_param_value = function_call_param_iterator.next();
       
  4446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4448             
       
  4449             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4450             {
       
  4451         
       
  4452                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4453                 return return_type_symbol;
       
  4454                 
       
  4455             }
       
  4456             
       
  4457             ERROR;
       
  4458         }
       
  4459         
       
  4460     }/*function_uint_to_lint*/
       
  4461     break;
       
  4462 
       
  4463 /****
       
  4464  *UINT_TO_USINT
       
  4465  */
       
  4466     case function_uint_to_usint :
       
  4467     {
       
  4468         symbol_c *last_type_symbol = NULL;
       
  4469 
       
  4470         {
       
  4471             identifier_c param_name("IN");
       
  4472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4474             
       
  4475             /* Get the value from a foo(<param_value>) style call */
       
  4476             if (IN_param_value == NULL)
       
  4477               IN_param_value = function_call_param_iterator.next();
       
  4478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4480             
       
  4481             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
   834             {
  4482             {
   835         
  4483         
   836                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4484                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   837                 return return_type_symbol;
  4485                 return return_type_symbol;
   838                 
  4486                 
   839             }
  4487             }
   840             
  4488             
   841             ERROR;
  4489             ERROR;
   842         }
  4490         }
   843         
  4491         
   844     }/*function_lreal_to_usint*/
  4492     }/*function_uint_to_usint*/
   845     break;
  4493     break;
   846 
  4494 
   847 /****
  4495 /****
   848  *LREAL_TO_UINT
  4496  *UINT_TO_UDINT
   849  */
  4497  */
   850     case function_lreal_to_uint :
  4498     case function_uint_to_udint :
   851     {
  4499     {
   852         symbol_c *last_type_symbol = NULL;
  4500         symbol_c *last_type_symbol = NULL;
   853 
  4501 
   854         {
  4502         {
   855             identifier_c param_name("IN");
  4503             identifier_c param_name("IN");
   856             /* Get the value from a foo(<param_name> = <param_value>) style call */
  4504             /* Get the value from a foo(<param_name> = <param_value>) style call */
   857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  4505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   858             
  4506             
   859             /* Get the value from a foo(<param_value>) style call */
  4507             /* Get the value from a foo(<param_value>) style call */
   860             if (IN_param_value == NULL)
  4508             if (IN_param_value == NULL)
   861               IN_param_value = function_call_param_iterator.next();
  4509               IN_param_value = function_call_param_iterator.next();
   862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   864             
  4512             
   865             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  4513             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4514             {
       
  4515         
       
  4516                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4517                 return return_type_symbol;
       
  4518                 
       
  4519             }
       
  4520             
       
  4521             ERROR;
       
  4522         }
       
  4523         
       
  4524     }/*function_uint_to_udint*/
       
  4525     break;
       
  4526 
       
  4527 /****
       
  4528  *UINT_TO_ULINT
       
  4529  */
       
  4530     case function_uint_to_ulint :
       
  4531     {
       
  4532         symbol_c *last_type_symbol = NULL;
       
  4533 
       
  4534         {
       
  4535             identifier_c param_name("IN");
       
  4536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4538             
       
  4539             /* Get the value from a foo(<param_value>) style call */
       
  4540             if (IN_param_value == NULL)
       
  4541               IN_param_value = function_call_param_iterator.next();
       
  4542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4544             
       
  4545             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4546             {
       
  4547         
       
  4548                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4549                 return return_type_symbol;
       
  4550                 
       
  4551             }
       
  4552             
       
  4553             ERROR;
       
  4554         }
       
  4555         
       
  4556     }/*function_uint_to_ulint*/
       
  4557     break;
       
  4558 
       
  4559 /****
       
  4560  *UINT_TO_TIME
       
  4561  */
       
  4562     case function_uint_to_time :
       
  4563     {
       
  4564         symbol_c *last_type_symbol = NULL;
       
  4565 
       
  4566         {
       
  4567             identifier_c param_name("IN");
       
  4568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4570             
       
  4571             /* Get the value from a foo(<param_value>) style call */
       
  4572             if (IN_param_value == NULL)
       
  4573               IN_param_value = function_call_param_iterator.next();
       
  4574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4576             
       
  4577             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4578             {
       
  4579         
       
  4580                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4581                 return return_type_symbol;
       
  4582                 
       
  4583             }
       
  4584             
       
  4585             ERROR;
       
  4586         }
       
  4587         
       
  4588     }/*function_uint_to_time*/
       
  4589     break;
       
  4590 
       
  4591 /****
       
  4592  *UINT_TO_BOOL
       
  4593  */
       
  4594     case function_uint_to_bool :
       
  4595     {
       
  4596         symbol_c *last_type_symbol = NULL;
       
  4597 
       
  4598         {
       
  4599             identifier_c param_name("IN");
       
  4600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4602             
       
  4603             /* Get the value from a foo(<param_value>) style call */
       
  4604             if (IN_param_value == NULL)
       
  4605               IN_param_value = function_call_param_iterator.next();
       
  4606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4608             
       
  4609             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4610             {
       
  4611         
       
  4612                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4613                 return return_type_symbol;
       
  4614                 
       
  4615             }
       
  4616             
       
  4617             ERROR;
       
  4618         }
       
  4619         
       
  4620     }/*function_uint_to_bool*/
       
  4621     break;
       
  4622 
       
  4623 /****
       
  4624  *UINT_TO_BYTE
       
  4625  */
       
  4626     case function_uint_to_byte :
       
  4627     {
       
  4628         symbol_c *last_type_symbol = NULL;
       
  4629 
       
  4630         {
       
  4631             identifier_c param_name("IN");
       
  4632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4634             
       
  4635             /* Get the value from a foo(<param_value>) style call */
       
  4636             if (IN_param_value == NULL)
       
  4637               IN_param_value = function_call_param_iterator.next();
       
  4638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4640             
       
  4641             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4642             {
       
  4643         
       
  4644                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4645                 return return_type_symbol;
       
  4646                 
       
  4647             }
       
  4648             
       
  4649             ERROR;
       
  4650         }
       
  4651         
       
  4652     }/*function_uint_to_byte*/
       
  4653     break;
       
  4654 
       
  4655 /****
       
  4656  *UINT_TO_WORD
       
  4657  */
       
  4658     case function_uint_to_word :
       
  4659     {
       
  4660         symbol_c *last_type_symbol = NULL;
       
  4661 
       
  4662         {
       
  4663             identifier_c param_name("IN");
       
  4664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4666             
       
  4667             /* Get the value from a foo(<param_value>) style call */
       
  4668             if (IN_param_value == NULL)
       
  4669               IN_param_value = function_call_param_iterator.next();
       
  4670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4672             
       
  4673             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4674             {
       
  4675         
       
  4676                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4677                 return return_type_symbol;
       
  4678                 
       
  4679             }
       
  4680             
       
  4681             ERROR;
       
  4682         }
       
  4683         
       
  4684     }/*function_uint_to_word*/
       
  4685     break;
       
  4686 
       
  4687 /****
       
  4688  *UINT_TO_DWORD
       
  4689  */
       
  4690     case function_uint_to_dword :
       
  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::dword_type_name;
       
  4709                 return return_type_symbol;
       
  4710                 
       
  4711             }
       
  4712             
       
  4713             ERROR;
       
  4714         }
       
  4715         
       
  4716     }/*function_uint_to_dword*/
       
  4717     break;
       
  4718 
       
  4719 /****
       
  4720  *UINT_TO_LWORD
       
  4721  */
       
  4722     case function_uint_to_lword :
       
  4723     {
       
  4724         symbol_c *last_type_symbol = NULL;
       
  4725 
       
  4726         {
       
  4727             identifier_c param_name("IN");
       
  4728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4730             
       
  4731             /* Get the value from a foo(<param_value>) style call */
       
  4732             if (IN_param_value == NULL)
       
  4733               IN_param_value = function_call_param_iterator.next();
       
  4734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4736             
       
  4737             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4738             {
       
  4739         
       
  4740                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4741                 return return_type_symbol;
       
  4742                 
       
  4743             }
       
  4744             
       
  4745             ERROR;
       
  4746         }
       
  4747         
       
  4748     }/*function_uint_to_lword*/
       
  4749     break;
       
  4750 
       
  4751 /****
       
  4752  *UINT_TO_STRING
       
  4753  */
       
  4754     case function_uint_to_string :
       
  4755     {
       
  4756         symbol_c *last_type_symbol = NULL;
       
  4757 
       
  4758         {
       
  4759             identifier_c param_name("IN");
       
  4760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4762             
       
  4763             /* Get the value from a foo(<param_value>) style call */
       
  4764             if (IN_param_value == NULL)
       
  4765               IN_param_value = function_call_param_iterator.next();
       
  4766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4768             
       
  4769             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4770             {
       
  4771         
       
  4772                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4773                 return return_type_symbol;
       
  4774                 
       
  4775             }
       
  4776             
       
  4777             ERROR;
       
  4778         }
       
  4779         
       
  4780     }/*function_uint_to_string*/
       
  4781     break;
       
  4782 
       
  4783 /****
       
  4784  *UINT_TO_DATE
       
  4785  */
       
  4786     case function_uint_to_date :
       
  4787     {
       
  4788         symbol_c *last_type_symbol = NULL;
       
  4789 
       
  4790         {
       
  4791             identifier_c param_name("IN");
       
  4792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4794             
       
  4795             /* Get the value from a foo(<param_value>) style call */
       
  4796             if (IN_param_value == NULL)
       
  4797               IN_param_value = function_call_param_iterator.next();
       
  4798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4800             
       
  4801             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4802             {
       
  4803         
       
  4804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4805                 return return_type_symbol;
       
  4806                 
       
  4807             }
       
  4808             
       
  4809             ERROR;
       
  4810         }
       
  4811         
       
  4812     }/*function_uint_to_date*/
       
  4813     break;
       
  4814 
       
  4815 /****
       
  4816  *UINT_TO_TOD
       
  4817  */
       
  4818     case function_uint_to_tod :
       
  4819     {
       
  4820         symbol_c *last_type_symbol = NULL;
       
  4821 
       
  4822         {
       
  4823             identifier_c param_name("IN");
       
  4824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4826             
       
  4827             /* Get the value from a foo(<param_value>) style call */
       
  4828             if (IN_param_value == NULL)
       
  4829               IN_param_value = function_call_param_iterator.next();
       
  4830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4832             
       
  4833             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4834             {
       
  4835         
       
  4836                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4837                 return return_type_symbol;
       
  4838                 
       
  4839             }
       
  4840             
       
  4841             ERROR;
       
  4842         }
       
  4843         
       
  4844     }/*function_uint_to_tod*/
       
  4845     break;
       
  4846 
       
  4847 /****
       
  4848  *UINT_TO_DT
       
  4849  */
       
  4850     case function_uint_to_dt :
       
  4851     {
       
  4852         symbol_c *last_type_symbol = NULL;
       
  4853 
       
  4854         {
       
  4855             identifier_c param_name("IN");
       
  4856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4858             
       
  4859             /* Get the value from a foo(<param_value>) style call */
       
  4860             if (IN_param_value == NULL)
       
  4861               IN_param_value = function_call_param_iterator.next();
       
  4862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4864             
       
  4865             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4866             {
       
  4867         
       
  4868                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4869                 return return_type_symbol;
       
  4870                 
       
  4871             }
       
  4872             
       
  4873             ERROR;
       
  4874         }
       
  4875         
       
  4876     }/*function_uint_to_dt*/
       
  4877     break;
       
  4878 
       
  4879 /****
       
  4880  *UDINT_TO_REAL
       
  4881  */
       
  4882     case function_udint_to_real :
       
  4883     {
       
  4884         symbol_c *last_type_symbol = NULL;
       
  4885 
       
  4886         {
       
  4887             identifier_c param_name("IN");
       
  4888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4890             
       
  4891             /* Get the value from a foo(<param_value>) style call */
       
  4892             if (IN_param_value == NULL)
       
  4893               IN_param_value = function_call_param_iterator.next();
       
  4894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4896             
       
  4897             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4898             {
       
  4899         
       
  4900                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4901                 return return_type_symbol;
       
  4902                 
       
  4903             }
       
  4904             
       
  4905             ERROR;
       
  4906         }
       
  4907         
       
  4908     }/*function_udint_to_real*/
       
  4909     break;
       
  4910 
       
  4911 /****
       
  4912  *UDINT_TO_LREAL
       
  4913  */
       
  4914     case function_udint_to_lreal :
       
  4915     {
       
  4916         symbol_c *last_type_symbol = NULL;
       
  4917 
       
  4918         {
       
  4919             identifier_c param_name("IN");
       
  4920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4922             
       
  4923             /* Get the value from a foo(<param_value>) style call */
       
  4924             if (IN_param_value == NULL)
       
  4925               IN_param_value = function_call_param_iterator.next();
       
  4926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4928             
       
  4929             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4930             {
       
  4931         
       
  4932                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4933                 return return_type_symbol;
       
  4934                 
       
  4935             }
       
  4936             
       
  4937             ERROR;
       
  4938         }
       
  4939         
       
  4940     }/*function_udint_to_lreal*/
       
  4941     break;
       
  4942 
       
  4943 /****
       
  4944  *UDINT_TO_SINT
       
  4945  */
       
  4946     case function_udint_to_sint :
       
  4947     {
       
  4948         symbol_c *last_type_symbol = NULL;
       
  4949 
       
  4950         {
       
  4951             identifier_c param_name("IN");
       
  4952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4954             
       
  4955             /* Get the value from a foo(<param_value>) style call */
       
  4956             if (IN_param_value == NULL)
       
  4957               IN_param_value = function_call_param_iterator.next();
       
  4958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4960             
       
  4961             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  4962             {
       
  4963         
       
  4964                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4965                 return return_type_symbol;
       
  4966                 
       
  4967             }
       
  4968             
       
  4969             ERROR;
       
  4970         }
       
  4971         
       
  4972     }/*function_udint_to_sint*/
       
  4973     break;
       
  4974 
       
  4975 /****
       
  4976  *UDINT_TO_INT
       
  4977  */
       
  4978     case function_udint_to_int :
       
  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::int_type_name;
       
  4997                 return return_type_symbol;
       
  4998                 
       
  4999             }
       
  5000             
       
  5001             ERROR;
       
  5002         }
       
  5003         
       
  5004     }/*function_udint_to_int*/
       
  5005     break;
       
  5006 
       
  5007 /****
       
  5008  *UDINT_TO_DINT
       
  5009  */
       
  5010     case function_udint_to_dint :
       
  5011     {
       
  5012         symbol_c *last_type_symbol = NULL;
       
  5013 
       
  5014         {
       
  5015             identifier_c param_name("IN");
       
  5016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5018             
       
  5019             /* Get the value from a foo(<param_value>) style call */
       
  5020             if (IN_param_value == NULL)
       
  5021               IN_param_value = function_call_param_iterator.next();
       
  5022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5024             
       
  5025             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5026             {
       
  5027         
       
  5028                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5029                 return return_type_symbol;
       
  5030                 
       
  5031             }
       
  5032             
       
  5033             ERROR;
       
  5034         }
       
  5035         
       
  5036     }/*function_udint_to_dint*/
       
  5037     break;
       
  5038 
       
  5039 /****
       
  5040  *UDINT_TO_LINT
       
  5041  */
       
  5042     case function_udint_to_lint :
       
  5043     {
       
  5044         symbol_c *last_type_symbol = NULL;
       
  5045 
       
  5046         {
       
  5047             identifier_c param_name("IN");
       
  5048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5050             
       
  5051             /* Get the value from a foo(<param_value>) style call */
       
  5052             if (IN_param_value == NULL)
       
  5053               IN_param_value = function_call_param_iterator.next();
       
  5054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5056             
       
  5057             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5058             {
       
  5059         
       
  5060                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5061                 return return_type_symbol;
       
  5062                 
       
  5063             }
       
  5064             
       
  5065             ERROR;
       
  5066         }
       
  5067         
       
  5068     }/*function_udint_to_lint*/
       
  5069     break;
       
  5070 
       
  5071 /****
       
  5072  *UDINT_TO_USINT
       
  5073  */
       
  5074     case function_udint_to_usint :
       
  5075     {
       
  5076         symbol_c *last_type_symbol = NULL;
       
  5077 
       
  5078         {
       
  5079             identifier_c param_name("IN");
       
  5080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5082             
       
  5083             /* Get the value from a foo(<param_value>) style call */
       
  5084             if (IN_param_value == NULL)
       
  5085               IN_param_value = function_call_param_iterator.next();
       
  5086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5088             
       
  5089             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5090             {
       
  5091         
       
  5092                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5093                 return return_type_symbol;
       
  5094                 
       
  5095             }
       
  5096             
       
  5097             ERROR;
       
  5098         }
       
  5099         
       
  5100     }/*function_udint_to_usint*/
       
  5101     break;
       
  5102 
       
  5103 /****
       
  5104  *UDINT_TO_UINT
       
  5105  */
       
  5106     case function_udint_to_uint :
       
  5107     {
       
  5108         symbol_c *last_type_symbol = NULL;
       
  5109 
       
  5110         {
       
  5111             identifier_c param_name("IN");
       
  5112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5114             
       
  5115             /* Get the value from a foo(<param_value>) style call */
       
  5116             if (IN_param_value == NULL)
       
  5117               IN_param_value = function_call_param_iterator.next();
       
  5118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5120             
       
  5121             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
   866             {
  5122             {
   867         
  5123         
   868                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5124                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   869                 return return_type_symbol;
  5125                 return return_type_symbol;
   870                 
  5126                 
   871             }
  5127             }
   872             
  5128             
   873             ERROR;
  5129             ERROR;
   874         }
  5130         }
   875         
  5131         
   876     }/*function_lreal_to_uint*/
  5132     }/*function_udint_to_uint*/
   877     break;
  5133     break;
   878 
  5134 
   879 /****
  5135 /****
   880  *LREAL_TO_UDINT
  5136  *UDINT_TO_ULINT
   881  */
  5137  */
   882     case function_lreal_to_udint :
  5138     case function_udint_to_ulint :
   883     {
  5139     {
   884         symbol_c *last_type_symbol = NULL;
  5140         symbol_c *last_type_symbol = NULL;
   885 
  5141 
   886         {
  5142         {
   887             identifier_c param_name("IN");
  5143             identifier_c param_name("IN");
   888             /* Get the value from a foo(<param_name> = <param_value>) style call */
  5144             /* Get the value from a foo(<param_name> = <param_value>) style call */
   889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   890             
  5146             
   891             /* Get the value from a foo(<param_value>) style call */
  5147             /* Get the value from a foo(<param_value>) style call */
   892             if (IN_param_value == NULL)
  5148             if (IN_param_value == NULL)
   893               IN_param_value = function_call_param_iterator.next();
  5149               IN_param_value = function_call_param_iterator.next();
   894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   896             
  5152             
   897             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  5153             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5154             {
       
  5155         
       
  5156                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5157                 return return_type_symbol;
       
  5158                 
       
  5159             }
       
  5160             
       
  5161             ERROR;
       
  5162         }
       
  5163         
       
  5164     }/*function_udint_to_ulint*/
       
  5165     break;
       
  5166 
       
  5167 /****
       
  5168  *UDINT_TO_TIME
       
  5169  */
       
  5170     case function_udint_to_time :
       
  5171     {
       
  5172         symbol_c *last_type_symbol = NULL;
       
  5173 
       
  5174         {
       
  5175             identifier_c param_name("IN");
       
  5176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5178             
       
  5179             /* Get the value from a foo(<param_value>) style call */
       
  5180             if (IN_param_value == NULL)
       
  5181               IN_param_value = function_call_param_iterator.next();
       
  5182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5184             
       
  5185             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5186             {
       
  5187         
       
  5188                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5189                 return return_type_symbol;
       
  5190                 
       
  5191             }
       
  5192             
       
  5193             ERROR;
       
  5194         }
       
  5195         
       
  5196     }/*function_udint_to_time*/
       
  5197     break;
       
  5198 
       
  5199 /****
       
  5200  *UDINT_TO_BOOL
       
  5201  */
       
  5202     case function_udint_to_bool :
       
  5203     {
       
  5204         symbol_c *last_type_symbol = NULL;
       
  5205 
       
  5206         {
       
  5207             identifier_c param_name("IN");
       
  5208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5210             
       
  5211             /* Get the value from a foo(<param_value>) style call */
       
  5212             if (IN_param_value == NULL)
       
  5213               IN_param_value = function_call_param_iterator.next();
       
  5214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5216             
       
  5217             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5218             {
       
  5219         
       
  5220                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5221                 return return_type_symbol;
       
  5222                 
       
  5223             }
       
  5224             
       
  5225             ERROR;
       
  5226         }
       
  5227         
       
  5228     }/*function_udint_to_bool*/
       
  5229     break;
       
  5230 
       
  5231 /****
       
  5232  *UDINT_TO_BYTE
       
  5233  */
       
  5234     case function_udint_to_byte :
       
  5235     {
       
  5236         symbol_c *last_type_symbol = NULL;
       
  5237 
       
  5238         {
       
  5239             identifier_c param_name("IN");
       
  5240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5242             
       
  5243             /* Get the value from a foo(<param_value>) style call */
       
  5244             if (IN_param_value == NULL)
       
  5245               IN_param_value = function_call_param_iterator.next();
       
  5246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5248             
       
  5249             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5250             {
       
  5251         
       
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5253                 return return_type_symbol;
       
  5254                 
       
  5255             }
       
  5256             
       
  5257             ERROR;
       
  5258         }
       
  5259         
       
  5260     }/*function_udint_to_byte*/
       
  5261     break;
       
  5262 
       
  5263 /****
       
  5264  *UDINT_TO_WORD
       
  5265  */
       
  5266     case function_udint_to_word :
       
  5267     {
       
  5268         symbol_c *last_type_symbol = NULL;
       
  5269 
       
  5270         {
       
  5271             identifier_c param_name("IN");
       
  5272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5274             
       
  5275             /* Get the value from a foo(<param_value>) style call */
       
  5276             if (IN_param_value == NULL)
       
  5277               IN_param_value = function_call_param_iterator.next();
       
  5278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5280             
       
  5281             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5282             {
       
  5283         
       
  5284                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5285                 return return_type_symbol;
       
  5286                 
       
  5287             }
       
  5288             
       
  5289             ERROR;
       
  5290         }
       
  5291         
       
  5292     }/*function_udint_to_word*/
       
  5293     break;
       
  5294 
       
  5295 /****
       
  5296  *UDINT_TO_DWORD
       
  5297  */
       
  5298     case function_udint_to_dword :
       
  5299     {
       
  5300         symbol_c *last_type_symbol = NULL;
       
  5301 
       
  5302         {
       
  5303             identifier_c param_name("IN");
       
  5304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5306             
       
  5307             /* Get the value from a foo(<param_value>) style call */
       
  5308             if (IN_param_value == NULL)
       
  5309               IN_param_value = function_call_param_iterator.next();
       
  5310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5312             
       
  5313             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5314             {
       
  5315         
       
  5316                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5317                 return return_type_symbol;
       
  5318                 
       
  5319             }
       
  5320             
       
  5321             ERROR;
       
  5322         }
       
  5323         
       
  5324     }/*function_udint_to_dword*/
       
  5325     break;
       
  5326 
       
  5327 /****
       
  5328  *UDINT_TO_LWORD
       
  5329  */
       
  5330     case function_udint_to_lword :
       
  5331     {
       
  5332         symbol_c *last_type_symbol = NULL;
       
  5333 
       
  5334         {
       
  5335             identifier_c param_name("IN");
       
  5336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5338             
       
  5339             /* Get the value from a foo(<param_value>) style call */
       
  5340             if (IN_param_value == NULL)
       
  5341               IN_param_value = function_call_param_iterator.next();
       
  5342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5344             
       
  5345             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5346             {
       
  5347         
       
  5348                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5349                 return return_type_symbol;
       
  5350                 
       
  5351             }
       
  5352             
       
  5353             ERROR;
       
  5354         }
       
  5355         
       
  5356     }/*function_udint_to_lword*/
       
  5357     break;
       
  5358 
       
  5359 /****
       
  5360  *UDINT_TO_STRING
       
  5361  */
       
  5362     case function_udint_to_string :
       
  5363     {
       
  5364         symbol_c *last_type_symbol = NULL;
       
  5365 
       
  5366         {
       
  5367             identifier_c param_name("IN");
       
  5368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5370             
       
  5371             /* Get the value from a foo(<param_value>) style call */
       
  5372             if (IN_param_value == NULL)
       
  5373               IN_param_value = function_call_param_iterator.next();
       
  5374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5376             
       
  5377             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5378             {
       
  5379         
       
  5380                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5381                 return return_type_symbol;
       
  5382                 
       
  5383             }
       
  5384             
       
  5385             ERROR;
       
  5386         }
       
  5387         
       
  5388     }/*function_udint_to_string*/
       
  5389     break;
       
  5390 
       
  5391 /****
       
  5392  *UDINT_TO_DATE
       
  5393  */
       
  5394     case function_udint_to_date :
       
  5395     {
       
  5396         symbol_c *last_type_symbol = NULL;
       
  5397 
       
  5398         {
       
  5399             identifier_c param_name("IN");
       
  5400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5402             
       
  5403             /* Get the value from a foo(<param_value>) style call */
       
  5404             if (IN_param_value == NULL)
       
  5405               IN_param_value = function_call_param_iterator.next();
       
  5406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5408             
       
  5409             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5410             {
       
  5411         
       
  5412                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5413                 return return_type_symbol;
       
  5414                 
       
  5415             }
       
  5416             
       
  5417             ERROR;
       
  5418         }
       
  5419         
       
  5420     }/*function_udint_to_date*/
       
  5421     break;
       
  5422 
       
  5423 /****
       
  5424  *UDINT_TO_TOD
       
  5425  */
       
  5426     case function_udint_to_tod :
       
  5427     {
       
  5428         symbol_c *last_type_symbol = NULL;
       
  5429 
       
  5430         {
       
  5431             identifier_c param_name("IN");
       
  5432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5434             
       
  5435             /* Get the value from a foo(<param_value>) style call */
       
  5436             if (IN_param_value == NULL)
       
  5437               IN_param_value = function_call_param_iterator.next();
       
  5438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5440             
       
  5441             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5442             {
       
  5443         
       
  5444                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5445                 return return_type_symbol;
       
  5446                 
       
  5447             }
       
  5448             
       
  5449             ERROR;
       
  5450         }
       
  5451         
       
  5452     }/*function_udint_to_tod*/
       
  5453     break;
       
  5454 
       
  5455 /****
       
  5456  *UDINT_TO_DT
       
  5457  */
       
  5458     case function_udint_to_dt :
       
  5459     {
       
  5460         symbol_c *last_type_symbol = NULL;
       
  5461 
       
  5462         {
       
  5463             identifier_c param_name("IN");
       
  5464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5466             
       
  5467             /* Get the value from a foo(<param_value>) style call */
       
  5468             if (IN_param_value == NULL)
       
  5469               IN_param_value = function_call_param_iterator.next();
       
  5470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5472             
       
  5473             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5474             {
       
  5475         
       
  5476                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5477                 return return_type_symbol;
       
  5478                 
       
  5479             }
       
  5480             
       
  5481             ERROR;
       
  5482         }
       
  5483         
       
  5484     }/*function_udint_to_dt*/
       
  5485     break;
       
  5486 
       
  5487 /****
       
  5488  *ULINT_TO_REAL
       
  5489  */
       
  5490     case function_ulint_to_real :
       
  5491     {
       
  5492         symbol_c *last_type_symbol = NULL;
       
  5493 
       
  5494         {
       
  5495             identifier_c param_name("IN");
       
  5496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5498             
       
  5499             /* Get the value from a foo(<param_value>) style call */
       
  5500             if (IN_param_value == NULL)
       
  5501               IN_param_value = function_call_param_iterator.next();
       
  5502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5504             
       
  5505             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5506             {
       
  5507         
       
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5509                 return return_type_symbol;
       
  5510                 
       
  5511             }
       
  5512             
       
  5513             ERROR;
       
  5514         }
       
  5515         
       
  5516     }/*function_ulint_to_real*/
       
  5517     break;
       
  5518 
       
  5519 /****
       
  5520  *ULINT_TO_LREAL
       
  5521  */
       
  5522     case function_ulint_to_lreal :
       
  5523     {
       
  5524         symbol_c *last_type_symbol = NULL;
       
  5525 
       
  5526         {
       
  5527             identifier_c param_name("IN");
       
  5528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5530             
       
  5531             /* Get the value from a foo(<param_value>) style call */
       
  5532             if (IN_param_value == NULL)
       
  5533               IN_param_value = function_call_param_iterator.next();
       
  5534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5536             
       
  5537             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5538             {
       
  5539         
       
  5540                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5541                 return return_type_symbol;
       
  5542                 
       
  5543             }
       
  5544             
       
  5545             ERROR;
       
  5546         }
       
  5547         
       
  5548     }/*function_ulint_to_lreal*/
       
  5549     break;
       
  5550 
       
  5551 /****
       
  5552  *ULINT_TO_SINT
       
  5553  */
       
  5554     case function_ulint_to_sint :
       
  5555     {
       
  5556         symbol_c *last_type_symbol = NULL;
       
  5557 
       
  5558         {
       
  5559             identifier_c param_name("IN");
       
  5560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5562             
       
  5563             /* Get the value from a foo(<param_value>) style call */
       
  5564             if (IN_param_value == NULL)
       
  5565               IN_param_value = function_call_param_iterator.next();
       
  5566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5568             
       
  5569             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5570             {
       
  5571         
       
  5572                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5573                 return return_type_symbol;
       
  5574                 
       
  5575             }
       
  5576             
       
  5577             ERROR;
       
  5578         }
       
  5579         
       
  5580     }/*function_ulint_to_sint*/
       
  5581     break;
       
  5582 
       
  5583 /****
       
  5584  *ULINT_TO_INT
       
  5585  */
       
  5586     case function_ulint_to_int :
       
  5587     {
       
  5588         symbol_c *last_type_symbol = NULL;
       
  5589 
       
  5590         {
       
  5591             identifier_c param_name("IN");
       
  5592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5594             
       
  5595             /* Get the value from a foo(<param_value>) style call */
       
  5596             if (IN_param_value == NULL)
       
  5597               IN_param_value = function_call_param_iterator.next();
       
  5598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5600             
       
  5601             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5602             {
       
  5603         
       
  5604                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5605                 return return_type_symbol;
       
  5606                 
       
  5607             }
       
  5608             
       
  5609             ERROR;
       
  5610         }
       
  5611         
       
  5612     }/*function_ulint_to_int*/
       
  5613     break;
       
  5614 
       
  5615 /****
       
  5616  *ULINT_TO_DINT
       
  5617  */
       
  5618     case function_ulint_to_dint :
       
  5619     {
       
  5620         symbol_c *last_type_symbol = NULL;
       
  5621 
       
  5622         {
       
  5623             identifier_c param_name("IN");
       
  5624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5626             
       
  5627             /* Get the value from a foo(<param_value>) style call */
       
  5628             if (IN_param_value == NULL)
       
  5629               IN_param_value = function_call_param_iterator.next();
       
  5630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5632             
       
  5633             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5634             {
       
  5635         
       
  5636                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5637                 return return_type_symbol;
       
  5638                 
       
  5639             }
       
  5640             
       
  5641             ERROR;
       
  5642         }
       
  5643         
       
  5644     }/*function_ulint_to_dint*/
       
  5645     break;
       
  5646 
       
  5647 /****
       
  5648  *ULINT_TO_LINT
       
  5649  */
       
  5650     case function_ulint_to_lint :
       
  5651     {
       
  5652         symbol_c *last_type_symbol = NULL;
       
  5653 
       
  5654         {
       
  5655             identifier_c param_name("IN");
       
  5656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5658             
       
  5659             /* Get the value from a foo(<param_value>) style call */
       
  5660             if (IN_param_value == NULL)
       
  5661               IN_param_value = function_call_param_iterator.next();
       
  5662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5664             
       
  5665             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5666             {
       
  5667         
       
  5668                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5669                 return return_type_symbol;
       
  5670                 
       
  5671             }
       
  5672             
       
  5673             ERROR;
       
  5674         }
       
  5675         
       
  5676     }/*function_ulint_to_lint*/
       
  5677     break;
       
  5678 
       
  5679 /****
       
  5680  *ULINT_TO_USINT
       
  5681  */
       
  5682     case function_ulint_to_usint :
       
  5683     {
       
  5684         symbol_c *last_type_symbol = NULL;
       
  5685 
       
  5686         {
       
  5687             identifier_c param_name("IN");
       
  5688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5690             
       
  5691             /* Get the value from a foo(<param_value>) style call */
       
  5692             if (IN_param_value == NULL)
       
  5693               IN_param_value = function_call_param_iterator.next();
       
  5694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5696             
       
  5697             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5698             {
       
  5699         
       
  5700                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5701                 return return_type_symbol;
       
  5702                 
       
  5703             }
       
  5704             
       
  5705             ERROR;
       
  5706         }
       
  5707         
       
  5708     }/*function_ulint_to_usint*/
       
  5709     break;
       
  5710 
       
  5711 /****
       
  5712  *ULINT_TO_UINT
       
  5713  */
       
  5714     case function_ulint_to_uint :
       
  5715     {
       
  5716         symbol_c *last_type_symbol = NULL;
       
  5717 
       
  5718         {
       
  5719             identifier_c param_name("IN");
       
  5720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5722             
       
  5723             /* Get the value from a foo(<param_value>) style call */
       
  5724             if (IN_param_value == NULL)
       
  5725               IN_param_value = function_call_param_iterator.next();
       
  5726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5728             
       
  5729             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5730             {
       
  5731         
       
  5732                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5733                 return return_type_symbol;
       
  5734                 
       
  5735             }
       
  5736             
       
  5737             ERROR;
       
  5738         }
       
  5739         
       
  5740     }/*function_ulint_to_uint*/
       
  5741     break;
       
  5742 
       
  5743 /****
       
  5744  *ULINT_TO_UDINT
       
  5745  */
       
  5746     case function_ulint_to_udint :
       
  5747     {
       
  5748         symbol_c *last_type_symbol = NULL;
       
  5749 
       
  5750         {
       
  5751             identifier_c param_name("IN");
       
  5752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5754             
       
  5755             /* Get the value from a foo(<param_value>) style call */
       
  5756             if (IN_param_value == NULL)
       
  5757               IN_param_value = function_call_param_iterator.next();
       
  5758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5760             
       
  5761             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
   898             {
  5762             {
   899         
  5763         
   900                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5764                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   901                 return return_type_symbol;
  5765                 return return_type_symbol;
   902                 
  5766                 
   903             }
  5767             }
   904             
  5768             
   905             ERROR;
  5769             ERROR;
   906         }
  5770         }
   907         
  5771         
   908     }/*function_lreal_to_udint*/
  5772     }/*function_ulint_to_udint*/
   909     break;
  5773     break;
   910 
  5774 
   911 /****
  5775 /****
   912  *LREAL_TO_ULINT
  5776  *ULINT_TO_TIME
   913  */
  5777  */
   914     case function_lreal_to_ulint :
  5778     case function_ulint_to_time :
   915     {
  5779     {
   916         symbol_c *last_type_symbol = NULL;
  5780         symbol_c *last_type_symbol = NULL;
   917 
  5781 
   918         {
  5782         {
   919             identifier_c param_name("IN");
  5783             identifier_c param_name("IN");
   920             /* Get the value from a foo(<param_name> = <param_value>) style call */
  5784             /* Get the value from a foo(<param_name> = <param_value>) style call */
   921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  5785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   922             
  5786             
   923             /* Get the value from a foo(<param_value>) style call */
  5787             /* Get the value from a foo(<param_value>) style call */
   924             if (IN_param_value == NULL)
  5788             if (IN_param_value == NULL)
   925               IN_param_value = function_call_param_iterator.next();
  5789               IN_param_value = function_call_param_iterator.next();
   926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   928             
  5792             
   929             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  5793             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5794             {
       
  5795         
       
  5796                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5797                 return return_type_symbol;
       
  5798                 
       
  5799             }
       
  5800             
       
  5801             ERROR;
       
  5802         }
       
  5803         
       
  5804     }/*function_ulint_to_time*/
       
  5805     break;
       
  5806 
       
  5807 /****
       
  5808  *ULINT_TO_BOOL
       
  5809  */
       
  5810     case function_ulint_to_bool :
       
  5811     {
       
  5812         symbol_c *last_type_symbol = NULL;
       
  5813 
       
  5814         {
       
  5815             identifier_c param_name("IN");
       
  5816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5818             
       
  5819             /* Get the value from a foo(<param_value>) style call */
       
  5820             if (IN_param_value == NULL)
       
  5821               IN_param_value = function_call_param_iterator.next();
       
  5822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5824             
       
  5825             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5826             {
       
  5827         
       
  5828                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5829                 return return_type_symbol;
       
  5830                 
       
  5831             }
       
  5832             
       
  5833             ERROR;
       
  5834         }
       
  5835         
       
  5836     }/*function_ulint_to_bool*/
       
  5837     break;
       
  5838 
       
  5839 /****
       
  5840  *ULINT_TO_BYTE
       
  5841  */
       
  5842     case function_ulint_to_byte :
       
  5843     {
       
  5844         symbol_c *last_type_symbol = NULL;
       
  5845 
       
  5846         {
       
  5847             identifier_c param_name("IN");
       
  5848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5850             
       
  5851             /* Get the value from a foo(<param_value>) style call */
       
  5852             if (IN_param_value == NULL)
       
  5853               IN_param_value = function_call_param_iterator.next();
       
  5854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5856             
       
  5857             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5858             {
       
  5859         
       
  5860                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5861                 return return_type_symbol;
       
  5862                 
       
  5863             }
       
  5864             
       
  5865             ERROR;
       
  5866         }
       
  5867         
       
  5868     }/*function_ulint_to_byte*/
       
  5869     break;
       
  5870 
       
  5871 /****
       
  5872  *ULINT_TO_WORD
       
  5873  */
       
  5874     case function_ulint_to_word :
       
  5875     {
       
  5876         symbol_c *last_type_symbol = NULL;
       
  5877 
       
  5878         {
       
  5879             identifier_c param_name("IN");
       
  5880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5882             
       
  5883             /* Get the value from a foo(<param_value>) style call */
       
  5884             if (IN_param_value == NULL)
       
  5885               IN_param_value = function_call_param_iterator.next();
       
  5886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5888             
       
  5889             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5890             {
       
  5891         
       
  5892                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5893                 return return_type_symbol;
       
  5894                 
       
  5895             }
       
  5896             
       
  5897             ERROR;
       
  5898         }
       
  5899         
       
  5900     }/*function_ulint_to_word*/
       
  5901     break;
       
  5902 
       
  5903 /****
       
  5904  *ULINT_TO_DWORD
       
  5905  */
       
  5906     case function_ulint_to_dword :
       
  5907     {
       
  5908         symbol_c *last_type_symbol = NULL;
       
  5909 
       
  5910         {
       
  5911             identifier_c param_name("IN");
       
  5912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5914             
       
  5915             /* Get the value from a foo(<param_value>) style call */
       
  5916             if (IN_param_value == NULL)
       
  5917               IN_param_value = function_call_param_iterator.next();
       
  5918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5920             
       
  5921             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5922             {
       
  5923         
       
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5925                 return return_type_symbol;
       
  5926                 
       
  5927             }
       
  5928             
       
  5929             ERROR;
       
  5930         }
       
  5931         
       
  5932     }/*function_ulint_to_dword*/
       
  5933     break;
       
  5934 
       
  5935 /****
       
  5936  *ULINT_TO_LWORD
       
  5937  */
       
  5938     case function_ulint_to_lword :
       
  5939     {
       
  5940         symbol_c *last_type_symbol = NULL;
       
  5941 
       
  5942         {
       
  5943             identifier_c param_name("IN");
       
  5944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5946             
       
  5947             /* Get the value from a foo(<param_value>) style call */
       
  5948             if (IN_param_value == NULL)
       
  5949               IN_param_value = function_call_param_iterator.next();
       
  5950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5952             
       
  5953             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5954             {
       
  5955         
       
  5956                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5957                 return return_type_symbol;
       
  5958                 
       
  5959             }
       
  5960             
       
  5961             ERROR;
       
  5962         }
       
  5963         
       
  5964     }/*function_ulint_to_lword*/
       
  5965     break;
       
  5966 
       
  5967 /****
       
  5968  *ULINT_TO_STRING
       
  5969  */
       
  5970     case function_ulint_to_string :
       
  5971     {
       
  5972         symbol_c *last_type_symbol = NULL;
       
  5973 
       
  5974         {
       
  5975             identifier_c param_name("IN");
       
  5976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5978             
       
  5979             /* Get the value from a foo(<param_value>) style call */
       
  5980             if (IN_param_value == NULL)
       
  5981               IN_param_value = function_call_param_iterator.next();
       
  5982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5984             
       
  5985             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5986             {
       
  5987         
       
  5988                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5989                 return return_type_symbol;
       
  5990                 
       
  5991             }
       
  5992             
       
  5993             ERROR;
       
  5994         }
       
  5995         
       
  5996     }/*function_ulint_to_string*/
       
  5997     break;
       
  5998 
       
  5999 /****
       
  6000  *ULINT_TO_DATE
       
  6001  */
       
  6002     case function_ulint_to_date :
       
  6003     {
       
  6004         symbol_c *last_type_symbol = NULL;
       
  6005 
       
  6006         {
       
  6007             identifier_c param_name("IN");
       
  6008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6010             
       
  6011             /* Get the value from a foo(<param_value>) style call */
       
  6012             if (IN_param_value == NULL)
       
  6013               IN_param_value = function_call_param_iterator.next();
       
  6014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6016             
       
  6017             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6018             {
       
  6019         
       
  6020                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6021                 return return_type_symbol;
       
  6022                 
       
  6023             }
       
  6024             
       
  6025             ERROR;
       
  6026         }
       
  6027         
       
  6028     }/*function_ulint_to_date*/
       
  6029     break;
       
  6030 
       
  6031 /****
       
  6032  *ULINT_TO_TOD
       
  6033  */
       
  6034     case function_ulint_to_tod :
       
  6035     {
       
  6036         symbol_c *last_type_symbol = NULL;
       
  6037 
       
  6038         {
       
  6039             identifier_c param_name("IN");
       
  6040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6042             
       
  6043             /* Get the value from a foo(<param_value>) style call */
       
  6044             if (IN_param_value == NULL)
       
  6045               IN_param_value = function_call_param_iterator.next();
       
  6046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6048             
       
  6049             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6050             {
       
  6051         
       
  6052                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6053                 return return_type_symbol;
       
  6054                 
       
  6055             }
       
  6056             
       
  6057             ERROR;
       
  6058         }
       
  6059         
       
  6060     }/*function_ulint_to_tod*/
       
  6061     break;
       
  6062 
       
  6063 /****
       
  6064  *ULINT_TO_DT
       
  6065  */
       
  6066     case function_ulint_to_dt :
       
  6067     {
       
  6068         symbol_c *last_type_symbol = NULL;
       
  6069 
       
  6070         {
       
  6071             identifier_c param_name("IN");
       
  6072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6074             
       
  6075             /* Get the value from a foo(<param_value>) style call */
       
  6076             if (IN_param_value == NULL)
       
  6077               IN_param_value = function_call_param_iterator.next();
       
  6078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6080             
       
  6081             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6082             {
       
  6083         
       
  6084                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6085                 return return_type_symbol;
       
  6086                 
       
  6087             }
       
  6088             
       
  6089             ERROR;
       
  6090         }
       
  6091         
       
  6092     }/*function_ulint_to_dt*/
       
  6093     break;
       
  6094 
       
  6095 /****
       
  6096  *TIME_TO_REAL
       
  6097  */
       
  6098     case function_time_to_real :
       
  6099     {
       
  6100         symbol_c *last_type_symbol = NULL;
       
  6101 
       
  6102         {
       
  6103             identifier_c param_name("IN");
       
  6104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6106             
       
  6107             /* Get the value from a foo(<param_value>) style call */
       
  6108             if (IN_param_value == NULL)
       
  6109               IN_param_value = function_call_param_iterator.next();
       
  6110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6112             
       
  6113             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6114             {
       
  6115         
       
  6116                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6117                 return return_type_symbol;
       
  6118                 
       
  6119             }
       
  6120             
       
  6121             ERROR;
       
  6122         }
       
  6123         
       
  6124     }/*function_time_to_real*/
       
  6125     break;
       
  6126 
       
  6127 /****
       
  6128  *TIME_TO_LREAL
       
  6129  */
       
  6130     case function_time_to_lreal :
       
  6131     {
       
  6132         symbol_c *last_type_symbol = NULL;
       
  6133 
       
  6134         {
       
  6135             identifier_c param_name("IN");
       
  6136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6138             
       
  6139             /* Get the value from a foo(<param_value>) style call */
       
  6140             if (IN_param_value == NULL)
       
  6141               IN_param_value = function_call_param_iterator.next();
       
  6142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6144             
       
  6145             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6146             {
       
  6147         
       
  6148                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6149                 return return_type_symbol;
       
  6150                 
       
  6151             }
       
  6152             
       
  6153             ERROR;
       
  6154         }
       
  6155         
       
  6156     }/*function_time_to_lreal*/
       
  6157     break;
       
  6158 
       
  6159 /****
       
  6160  *TIME_TO_SINT
       
  6161  */
       
  6162     case function_time_to_sint :
       
  6163     {
       
  6164         symbol_c *last_type_symbol = NULL;
       
  6165 
       
  6166         {
       
  6167             identifier_c param_name("IN");
       
  6168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6170             
       
  6171             /* Get the value from a foo(<param_value>) style call */
       
  6172             if (IN_param_value == NULL)
       
  6173               IN_param_value = function_call_param_iterator.next();
       
  6174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6176             
       
  6177             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6178             {
       
  6179         
       
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6181                 return return_type_symbol;
       
  6182                 
       
  6183             }
       
  6184             
       
  6185             ERROR;
       
  6186         }
       
  6187         
       
  6188     }/*function_time_to_sint*/
       
  6189     break;
       
  6190 
       
  6191 /****
       
  6192  *TIME_TO_INT
       
  6193  */
       
  6194     case function_time_to_int :
       
  6195     {
       
  6196         symbol_c *last_type_symbol = NULL;
       
  6197 
       
  6198         {
       
  6199             identifier_c param_name("IN");
       
  6200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6202             
       
  6203             /* Get the value from a foo(<param_value>) style call */
       
  6204             if (IN_param_value == NULL)
       
  6205               IN_param_value = function_call_param_iterator.next();
       
  6206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6208             
       
  6209             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6210             {
       
  6211         
       
  6212                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6213                 return return_type_symbol;
       
  6214                 
       
  6215             }
       
  6216             
       
  6217             ERROR;
       
  6218         }
       
  6219         
       
  6220     }/*function_time_to_int*/
       
  6221     break;
       
  6222 
       
  6223 /****
       
  6224  *TIME_TO_DINT
       
  6225  */
       
  6226     case function_time_to_dint :
       
  6227     {
       
  6228         symbol_c *last_type_symbol = NULL;
       
  6229 
       
  6230         {
       
  6231             identifier_c param_name("IN");
       
  6232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6234             
       
  6235             /* Get the value from a foo(<param_value>) style call */
       
  6236             if (IN_param_value == NULL)
       
  6237               IN_param_value = function_call_param_iterator.next();
       
  6238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6240             
       
  6241             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6242             {
       
  6243         
       
  6244                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6245                 return return_type_symbol;
       
  6246                 
       
  6247             }
       
  6248             
       
  6249             ERROR;
       
  6250         }
       
  6251         
       
  6252     }/*function_time_to_dint*/
       
  6253     break;
       
  6254 
       
  6255 /****
       
  6256  *TIME_TO_LINT
       
  6257  */
       
  6258     case function_time_to_lint :
       
  6259     {
       
  6260         symbol_c *last_type_symbol = NULL;
       
  6261 
       
  6262         {
       
  6263             identifier_c param_name("IN");
       
  6264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6266             
       
  6267             /* Get the value from a foo(<param_value>) style call */
       
  6268             if (IN_param_value == NULL)
       
  6269               IN_param_value = function_call_param_iterator.next();
       
  6270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6272             
       
  6273             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6274             {
       
  6275         
       
  6276                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6277                 return return_type_symbol;
       
  6278                 
       
  6279             }
       
  6280             
       
  6281             ERROR;
       
  6282         }
       
  6283         
       
  6284     }/*function_time_to_lint*/
       
  6285     break;
       
  6286 
       
  6287 /****
       
  6288  *TIME_TO_USINT
       
  6289  */
       
  6290     case function_time_to_usint :
       
  6291     {
       
  6292         symbol_c *last_type_symbol = NULL;
       
  6293 
       
  6294         {
       
  6295             identifier_c param_name("IN");
       
  6296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6298             
       
  6299             /* Get the value from a foo(<param_value>) style call */
       
  6300             if (IN_param_value == NULL)
       
  6301               IN_param_value = function_call_param_iterator.next();
       
  6302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6304             
       
  6305             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6306             {
       
  6307         
       
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6309                 return return_type_symbol;
       
  6310                 
       
  6311             }
       
  6312             
       
  6313             ERROR;
       
  6314         }
       
  6315         
       
  6316     }/*function_time_to_usint*/
       
  6317     break;
       
  6318 
       
  6319 /****
       
  6320  *TIME_TO_UINT
       
  6321  */
       
  6322     case function_time_to_uint :
       
  6323     {
       
  6324         symbol_c *last_type_symbol = NULL;
       
  6325 
       
  6326         {
       
  6327             identifier_c param_name("IN");
       
  6328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6330             
       
  6331             /* Get the value from a foo(<param_value>) style call */
       
  6332             if (IN_param_value == NULL)
       
  6333               IN_param_value = function_call_param_iterator.next();
       
  6334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6336             
       
  6337             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6338             {
       
  6339         
       
  6340                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6341                 return return_type_symbol;
       
  6342                 
       
  6343             }
       
  6344             
       
  6345             ERROR;
       
  6346         }
       
  6347         
       
  6348     }/*function_time_to_uint*/
       
  6349     break;
       
  6350 
       
  6351 /****
       
  6352  *TIME_TO_UDINT
       
  6353  */
       
  6354     case function_time_to_udint :
       
  6355     {
       
  6356         symbol_c *last_type_symbol = NULL;
       
  6357 
       
  6358         {
       
  6359             identifier_c param_name("IN");
       
  6360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next();
       
  6366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6368             
       
  6369             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6370             {
       
  6371         
       
  6372                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6373                 return return_type_symbol;
       
  6374                 
       
  6375             }
       
  6376             
       
  6377             ERROR;
       
  6378         }
       
  6379         
       
  6380     }/*function_time_to_udint*/
       
  6381     break;
       
  6382 
       
  6383 /****
       
  6384  *TIME_TO_ULINT
       
  6385  */
       
  6386     case function_time_to_ulint :
       
  6387     {
       
  6388         symbol_c *last_type_symbol = NULL;
       
  6389 
       
  6390         {
       
  6391             identifier_c param_name("IN");
       
  6392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6394             
       
  6395             /* Get the value from a foo(<param_value>) style call */
       
  6396             if (IN_param_value == NULL)
       
  6397               IN_param_value = function_call_param_iterator.next();
       
  6398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6400             
       
  6401             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
   930             {
  6402             {
   931         
  6403         
   932                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6404                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   933                 return return_type_symbol;
  6405                 return return_type_symbol;
   934                 
  6406                 
   935             }
  6407             }
   936             
  6408             
   937             ERROR;
  6409             ERROR;
   938         }
  6410         }
   939         
  6411         
   940     }/*function_lreal_to_ulint*/
  6412     }/*function_time_to_ulint*/
   941     break;
  6413     break;
   942 
  6414 
   943 /****
  6415 /****
   944  *LREAL_TO_TIME
  6416  *TIME_TO_BOOL
   945  */
  6417  */
   946     case function_lreal_to_time :
  6418     case function_time_to_bool :
   947     {
  6419     {
   948         symbol_c *last_type_symbol = NULL;
  6420         symbol_c *last_type_symbol = NULL;
   949 
  6421 
   950         {
  6422         {
   951             identifier_c param_name("IN");
  6423             identifier_c param_name("IN");
   952             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6424             /* Get the value from a foo(<param_name> = <param_value>) style call */
   953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   954             
  6426             
   955             /* Get the value from a foo(<param_value>) style call */
  6427             /* Get the value from a foo(<param_value>) style call */
   956             if (IN_param_value == NULL)
  6428             if (IN_param_value == NULL)
   957               IN_param_value = function_call_param_iterator.next();
  6429               IN_param_value = function_call_param_iterator.next();
   958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   960             
  6432             
   961             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6433             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6434             {
       
  6435         
       
  6436                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6437                 return return_type_symbol;
       
  6438                 
       
  6439             }
       
  6440             
       
  6441             ERROR;
       
  6442         }
       
  6443         
       
  6444     }/*function_time_to_bool*/
       
  6445     break;
       
  6446 
       
  6447 /****
       
  6448  *TIME_TO_BYTE
       
  6449  */
       
  6450     case function_time_to_byte :
       
  6451     {
       
  6452         symbol_c *last_type_symbol = NULL;
       
  6453 
       
  6454         {
       
  6455             identifier_c param_name("IN");
       
  6456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6458             
       
  6459             /* Get the value from a foo(<param_value>) style call */
       
  6460             if (IN_param_value == NULL)
       
  6461               IN_param_value = function_call_param_iterator.next();
       
  6462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6464             
       
  6465             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6466             {
       
  6467         
       
  6468                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6469                 return return_type_symbol;
       
  6470                 
       
  6471             }
       
  6472             
       
  6473             ERROR;
       
  6474         }
       
  6475         
       
  6476     }/*function_time_to_byte*/
       
  6477     break;
       
  6478 
       
  6479 /****
       
  6480  *TIME_TO_WORD
       
  6481  */
       
  6482     case function_time_to_word :
       
  6483     {
       
  6484         symbol_c *last_type_symbol = NULL;
       
  6485 
       
  6486         {
       
  6487             identifier_c param_name("IN");
       
  6488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6490             
       
  6491             /* Get the value from a foo(<param_value>) style call */
       
  6492             if (IN_param_value == NULL)
       
  6493               IN_param_value = function_call_param_iterator.next();
       
  6494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6496             
       
  6497             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6498             {
       
  6499         
       
  6500                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6501                 return return_type_symbol;
       
  6502                 
       
  6503             }
       
  6504             
       
  6505             ERROR;
       
  6506         }
       
  6507         
       
  6508     }/*function_time_to_word*/
       
  6509     break;
       
  6510 
       
  6511 /****
       
  6512  *TIME_TO_DWORD
       
  6513  */
       
  6514     case function_time_to_dword :
       
  6515     {
       
  6516         symbol_c *last_type_symbol = NULL;
       
  6517 
       
  6518         {
       
  6519             identifier_c param_name("IN");
       
  6520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6522             
       
  6523             /* Get the value from a foo(<param_value>) style call */
       
  6524             if (IN_param_value == NULL)
       
  6525               IN_param_value = function_call_param_iterator.next();
       
  6526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6528             
       
  6529             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6530             {
       
  6531         
       
  6532                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6533                 return return_type_symbol;
       
  6534                 
       
  6535             }
       
  6536             
       
  6537             ERROR;
       
  6538         }
       
  6539         
       
  6540     }/*function_time_to_dword*/
       
  6541     break;
       
  6542 
       
  6543 /****
       
  6544  *TIME_TO_LWORD
       
  6545  */
       
  6546     case function_time_to_lword :
       
  6547     {
       
  6548         symbol_c *last_type_symbol = NULL;
       
  6549 
       
  6550         {
       
  6551             identifier_c param_name("IN");
       
  6552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6554             
       
  6555             /* Get the value from a foo(<param_value>) style call */
       
  6556             if (IN_param_value == NULL)
       
  6557               IN_param_value = function_call_param_iterator.next();
       
  6558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6560             
       
  6561             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6562             {
       
  6563         
       
  6564                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6565                 return return_type_symbol;
       
  6566                 
       
  6567             }
       
  6568             
       
  6569             ERROR;
       
  6570         }
       
  6571         
       
  6572     }/*function_time_to_lword*/
       
  6573     break;
       
  6574 
       
  6575 /****
       
  6576  *TIME_TO_STRING
       
  6577  */
       
  6578     case function_time_to_string :
       
  6579     {
       
  6580         symbol_c *last_type_symbol = NULL;
       
  6581 
       
  6582         {
       
  6583             identifier_c param_name("IN");
       
  6584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6586             
       
  6587             /* Get the value from a foo(<param_value>) style call */
       
  6588             if (IN_param_value == NULL)
       
  6589               IN_param_value = function_call_param_iterator.next();
       
  6590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6592             
       
  6593             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6594             {
       
  6595         
       
  6596                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6597                 return return_type_symbol;
       
  6598                 
       
  6599             }
       
  6600             
       
  6601             ERROR;
       
  6602         }
       
  6603         
       
  6604     }/*function_time_to_string*/
       
  6605     break;
       
  6606 
       
  6607 /****
       
  6608  *BOOL_TO_REAL
       
  6609  */
       
  6610     case function_bool_to_real :
       
  6611     {
       
  6612         symbol_c *last_type_symbol = NULL;
       
  6613 
       
  6614         {
       
  6615             identifier_c param_name("IN");
       
  6616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6618             
       
  6619             /* Get the value from a foo(<param_value>) style call */
       
  6620             if (IN_param_value == NULL)
       
  6621               IN_param_value = function_call_param_iterator.next();
       
  6622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6624             
       
  6625             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6626             {
       
  6627         
       
  6628                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6629                 return return_type_symbol;
       
  6630                 
       
  6631             }
       
  6632             
       
  6633             ERROR;
       
  6634         }
       
  6635         
       
  6636     }/*function_bool_to_real*/
       
  6637     break;
       
  6638 
       
  6639 /****
       
  6640  *BOOL_TO_LREAL
       
  6641  */
       
  6642     case function_bool_to_lreal :
       
  6643     {
       
  6644         symbol_c *last_type_symbol = NULL;
       
  6645 
       
  6646         {
       
  6647             identifier_c param_name("IN");
       
  6648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6650             
       
  6651             /* Get the value from a foo(<param_value>) style call */
       
  6652             if (IN_param_value == NULL)
       
  6653               IN_param_value = function_call_param_iterator.next();
       
  6654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6656             
       
  6657             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6658             {
       
  6659         
       
  6660                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6661                 return return_type_symbol;
       
  6662                 
       
  6663             }
       
  6664             
       
  6665             ERROR;
       
  6666         }
       
  6667         
       
  6668     }/*function_bool_to_lreal*/
       
  6669     break;
       
  6670 
       
  6671 /****
       
  6672  *BOOL_TO_SINT
       
  6673  */
       
  6674     case function_bool_to_sint :
       
  6675     {
       
  6676         symbol_c *last_type_symbol = NULL;
       
  6677 
       
  6678         {
       
  6679             identifier_c param_name("IN");
       
  6680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6682             
       
  6683             /* Get the value from a foo(<param_value>) style call */
       
  6684             if (IN_param_value == NULL)
       
  6685               IN_param_value = function_call_param_iterator.next();
       
  6686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6688             
       
  6689             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6690             {
       
  6691         
       
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6693                 return return_type_symbol;
       
  6694                 
       
  6695             }
       
  6696             
       
  6697             ERROR;
       
  6698         }
       
  6699         
       
  6700     }/*function_bool_to_sint*/
       
  6701     break;
       
  6702 
       
  6703 /****
       
  6704  *BOOL_TO_INT
       
  6705  */
       
  6706     case function_bool_to_int :
       
  6707     {
       
  6708         symbol_c *last_type_symbol = NULL;
       
  6709 
       
  6710         {
       
  6711             identifier_c param_name("IN");
       
  6712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6714             
       
  6715             /* Get the value from a foo(<param_value>) style call */
       
  6716             if (IN_param_value == NULL)
       
  6717               IN_param_value = function_call_param_iterator.next();
       
  6718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6720             
       
  6721             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6722             {
       
  6723         
       
  6724                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6725                 return return_type_symbol;
       
  6726                 
       
  6727             }
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_bool_to_int*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *BOOL_TO_DINT
       
  6737  */
       
  6738     case function_bool_to_dint :
       
  6739     {
       
  6740         symbol_c *last_type_symbol = NULL;
       
  6741 
       
  6742         {
       
  6743             identifier_c param_name("IN");
       
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6746             
       
  6747             /* Get the value from a foo(<param_value>) style call */
       
  6748             if (IN_param_value == NULL)
       
  6749               IN_param_value = function_call_param_iterator.next();
       
  6750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6752             
       
  6753             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6754             {
       
  6755         
       
  6756                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6757                 return return_type_symbol;
       
  6758                 
       
  6759             }
       
  6760             
       
  6761             ERROR;
       
  6762         }
       
  6763         
       
  6764     }/*function_bool_to_dint*/
       
  6765     break;
       
  6766 
       
  6767 /****
       
  6768  *BOOL_TO_LINT
       
  6769  */
       
  6770     case function_bool_to_lint :
       
  6771     {
       
  6772         symbol_c *last_type_symbol = NULL;
       
  6773 
       
  6774         {
       
  6775             identifier_c param_name("IN");
       
  6776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6778             
       
  6779             /* Get the value from a foo(<param_value>) style call */
       
  6780             if (IN_param_value == NULL)
       
  6781               IN_param_value = function_call_param_iterator.next();
       
  6782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6784             
       
  6785             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6786             {
       
  6787         
       
  6788                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6789                 return return_type_symbol;
       
  6790                 
       
  6791             }
       
  6792             
       
  6793             ERROR;
       
  6794         }
       
  6795         
       
  6796     }/*function_bool_to_lint*/
       
  6797     break;
       
  6798 
       
  6799 /****
       
  6800  *BOOL_TO_USINT
       
  6801  */
       
  6802     case function_bool_to_usint :
       
  6803     {
       
  6804         symbol_c *last_type_symbol = NULL;
       
  6805 
       
  6806         {
       
  6807             identifier_c param_name("IN");
       
  6808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6810             
       
  6811             /* Get the value from a foo(<param_value>) style call */
       
  6812             if (IN_param_value == NULL)
       
  6813               IN_param_value = function_call_param_iterator.next();
       
  6814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6816             
       
  6817             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6818             {
       
  6819         
       
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6821                 return return_type_symbol;
       
  6822                 
       
  6823             }
       
  6824             
       
  6825             ERROR;
       
  6826         }
       
  6827         
       
  6828     }/*function_bool_to_usint*/
       
  6829     break;
       
  6830 
       
  6831 /****
       
  6832  *BOOL_TO_UINT
       
  6833  */
       
  6834     case function_bool_to_uint :
       
  6835     {
       
  6836         symbol_c *last_type_symbol = NULL;
       
  6837 
       
  6838         {
       
  6839             identifier_c param_name("IN");
       
  6840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6842             
       
  6843             /* Get the value from a foo(<param_value>) style call */
       
  6844             if (IN_param_value == NULL)
       
  6845               IN_param_value = function_call_param_iterator.next();
       
  6846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6848             
       
  6849             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6850             {
       
  6851         
       
  6852                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6853                 return return_type_symbol;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             ERROR;
       
  6858         }
       
  6859         
       
  6860     }/*function_bool_to_uint*/
       
  6861     break;
       
  6862 
       
  6863 /****
       
  6864  *BOOL_TO_UDINT
       
  6865  */
       
  6866     case function_bool_to_udint :
       
  6867     {
       
  6868         symbol_c *last_type_symbol = NULL;
       
  6869 
       
  6870         {
       
  6871             identifier_c param_name("IN");
       
  6872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6874             
       
  6875             /* Get the value from a foo(<param_value>) style call */
       
  6876             if (IN_param_value == NULL)
       
  6877               IN_param_value = function_call_param_iterator.next();
       
  6878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6880             
       
  6881             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6882             {
       
  6883         
       
  6884                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6885                 return return_type_symbol;
       
  6886                 
       
  6887             }
       
  6888             
       
  6889             ERROR;
       
  6890         }
       
  6891         
       
  6892     }/*function_bool_to_udint*/
       
  6893     break;
       
  6894 
       
  6895 /****
       
  6896  *BOOL_TO_ULINT
       
  6897  */
       
  6898     case function_bool_to_ulint :
       
  6899     {
       
  6900         symbol_c *last_type_symbol = NULL;
       
  6901 
       
  6902         {
       
  6903             identifier_c param_name("IN");
       
  6904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6906             
       
  6907             /* Get the value from a foo(<param_value>) style call */
       
  6908             if (IN_param_value == NULL)
       
  6909               IN_param_value = function_call_param_iterator.next();
       
  6910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6912             
       
  6913             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6914             {
       
  6915         
       
  6916                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6917                 return return_type_symbol;
       
  6918                 
       
  6919             }
       
  6920             
       
  6921             ERROR;
       
  6922         }
       
  6923         
       
  6924     }/*function_bool_to_ulint*/
       
  6925     break;
       
  6926 
       
  6927 /****
       
  6928  *BOOL_TO_TIME
       
  6929  */
       
  6930     case function_bool_to_time :
       
  6931     {
       
  6932         symbol_c *last_type_symbol = NULL;
       
  6933 
       
  6934         {
       
  6935             identifier_c param_name("IN");
       
  6936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6938             
       
  6939             /* Get the value from a foo(<param_value>) style call */
       
  6940             if (IN_param_value == NULL)
       
  6941               IN_param_value = function_call_param_iterator.next();
       
  6942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6944             
       
  6945             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   962             {
  6946             {
   963         
  6947         
   964                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  6948                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   965                 return return_type_symbol;
  6949                 return return_type_symbol;
   966                 
  6950                 
   967             }
  6951             }
   968             
  6952             
   969             ERROR;
  6953             ERROR;
   970         }
  6954         }
   971         
  6955         
   972     }/*function_lreal_to_time*/
  6956     }/*function_bool_to_time*/
   973     break;
  6957     break;
   974 
  6958 
   975 /****
  6959 /****
   976  *LREAL_TO_BOOL
  6960  *BOOL_TO_BYTE
   977  */
  6961  */
   978     case function_lreal_to_bool :
  6962     case function_bool_to_byte :
   979     {
  6963     {
   980         symbol_c *last_type_symbol = NULL;
  6964         symbol_c *last_type_symbol = NULL;
   981 
  6965 
   982         {
  6966         {
   983             identifier_c param_name("IN");
  6967             identifier_c param_name("IN");
   984             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6968             /* Get the value from a foo(<param_name> = <param_value>) style call */
   985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   986             
  6970             
   987             /* Get the value from a foo(<param_value>) style call */
  6971             /* Get the value from a foo(<param_value>) style call */
   988             if (IN_param_value == NULL)
  6972             if (IN_param_value == NULL)
   989               IN_param_value = function_call_param_iterator.next();
  6973               IN_param_value = function_call_param_iterator.next();
   990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   992             
  6976             
   993             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6977             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6978             {
       
  6979         
       
  6980                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6981                 return return_type_symbol;
       
  6982                 
       
  6983             }
       
  6984             
       
  6985             ERROR;
       
  6986         }
       
  6987         
       
  6988     }/*function_bool_to_byte*/
       
  6989     break;
       
  6990 
       
  6991 /****
       
  6992  *BOOL_TO_WORD
       
  6993  */
       
  6994     case function_bool_to_word :
       
  6995     {
       
  6996         symbol_c *last_type_symbol = NULL;
       
  6997 
       
  6998         {
       
  6999             identifier_c param_name("IN");
       
  7000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7002             
       
  7003             /* Get the value from a foo(<param_value>) style call */
       
  7004             if (IN_param_value == NULL)
       
  7005               IN_param_value = function_call_param_iterator.next();
       
  7006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7008             
       
  7009             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7010             {
       
  7011         
       
  7012                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7013                 return return_type_symbol;
       
  7014                 
       
  7015             }
       
  7016             
       
  7017             ERROR;
       
  7018         }
       
  7019         
       
  7020     }/*function_bool_to_word*/
       
  7021     break;
       
  7022 
       
  7023 /****
       
  7024  *BOOL_TO_DWORD
       
  7025  */
       
  7026     case function_bool_to_dword :
       
  7027     {
       
  7028         symbol_c *last_type_symbol = NULL;
       
  7029 
       
  7030         {
       
  7031             identifier_c param_name("IN");
       
  7032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7034             
       
  7035             /* Get the value from a foo(<param_value>) style call */
       
  7036             if (IN_param_value == NULL)
       
  7037               IN_param_value = function_call_param_iterator.next();
       
  7038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7040             
       
  7041             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7042             {
       
  7043         
       
  7044                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7045                 return return_type_symbol;
       
  7046                 
       
  7047             }
       
  7048             
       
  7049             ERROR;
       
  7050         }
       
  7051         
       
  7052     }/*function_bool_to_dword*/
       
  7053     break;
       
  7054 
       
  7055 /****
       
  7056  *BOOL_TO_LWORD
       
  7057  */
       
  7058     case function_bool_to_lword :
       
  7059     {
       
  7060         symbol_c *last_type_symbol = NULL;
       
  7061 
       
  7062         {
       
  7063             identifier_c param_name("IN");
       
  7064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7066             
       
  7067             /* Get the value from a foo(<param_value>) style call */
       
  7068             if (IN_param_value == NULL)
       
  7069               IN_param_value = function_call_param_iterator.next();
       
  7070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7072             
       
  7073             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7074             {
       
  7075         
       
  7076                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7077                 return return_type_symbol;
       
  7078                 
       
  7079             }
       
  7080             
       
  7081             ERROR;
       
  7082         }
       
  7083         
       
  7084     }/*function_bool_to_lword*/
       
  7085     break;
       
  7086 
       
  7087 /****
       
  7088  *BOOL_TO_STRING
       
  7089  */
       
  7090     case function_bool_to_string :
       
  7091     {
       
  7092         symbol_c *last_type_symbol = NULL;
       
  7093 
       
  7094         {
       
  7095             identifier_c param_name("IN");
       
  7096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7098             
       
  7099             /* Get the value from a foo(<param_value>) style call */
       
  7100             if (IN_param_value == NULL)
       
  7101               IN_param_value = function_call_param_iterator.next();
       
  7102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7104             
       
  7105             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7106             {
       
  7107         
       
  7108                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7109                 return return_type_symbol;
       
  7110                 
       
  7111             }
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_bool_to_string*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *BOOL_TO_DATE
       
  7121  */
       
  7122     case function_bool_to_date :
       
  7123     {
       
  7124         symbol_c *last_type_symbol = NULL;
       
  7125 
       
  7126         {
       
  7127             identifier_c param_name("IN");
       
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7130             
       
  7131             /* Get the value from a foo(<param_value>) style call */
       
  7132             if (IN_param_value == NULL)
       
  7133               IN_param_value = function_call_param_iterator.next();
       
  7134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7136             
       
  7137             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7138             {
       
  7139         
       
  7140                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7141                 return return_type_symbol;
       
  7142                 
       
  7143             }
       
  7144             
       
  7145             ERROR;
       
  7146         }
       
  7147         
       
  7148     }/*function_bool_to_date*/
       
  7149     break;
       
  7150 
       
  7151 /****
       
  7152  *BOOL_TO_TOD
       
  7153  */
       
  7154     case function_bool_to_tod :
       
  7155     {
       
  7156         symbol_c *last_type_symbol = NULL;
       
  7157 
       
  7158         {
       
  7159             identifier_c param_name("IN");
       
  7160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7162             
       
  7163             /* Get the value from a foo(<param_value>) style call */
       
  7164             if (IN_param_value == NULL)
       
  7165               IN_param_value = function_call_param_iterator.next();
       
  7166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7168             
       
  7169             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7170             {
       
  7171         
       
  7172                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7173                 return return_type_symbol;
       
  7174                 
       
  7175             }
       
  7176             
       
  7177             ERROR;
       
  7178         }
       
  7179         
       
  7180     }/*function_bool_to_tod*/
       
  7181     break;
       
  7182 
       
  7183 /****
       
  7184  *BOOL_TO_DT
       
  7185  */
       
  7186     case function_bool_to_dt :
       
  7187     {
       
  7188         symbol_c *last_type_symbol = NULL;
       
  7189 
       
  7190         {
       
  7191             identifier_c param_name("IN");
       
  7192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7194             
       
  7195             /* Get the value from a foo(<param_value>) style call */
       
  7196             if (IN_param_value == NULL)
       
  7197               IN_param_value = function_call_param_iterator.next();
       
  7198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7200             
       
  7201             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7202             {
       
  7203         
       
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7205                 return return_type_symbol;
       
  7206                 
       
  7207             }
       
  7208             
       
  7209             ERROR;
       
  7210         }
       
  7211         
       
  7212     }/*function_bool_to_dt*/
       
  7213     break;
       
  7214 
       
  7215 /****
       
  7216  *BYTE_TO_REAL
       
  7217  */
       
  7218     case function_byte_to_real :
       
  7219     {
       
  7220         symbol_c *last_type_symbol = NULL;
       
  7221 
       
  7222         {
       
  7223             identifier_c param_name("IN");
       
  7224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7226             
       
  7227             /* Get the value from a foo(<param_value>) style call */
       
  7228             if (IN_param_value == NULL)
       
  7229               IN_param_value = function_call_param_iterator.next();
       
  7230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7232             
       
  7233             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7234             {
       
  7235         
       
  7236                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7237                 return return_type_symbol;
       
  7238                 
       
  7239             }
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_byte_to_real*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *BYTE_TO_LREAL
       
  7249  */
       
  7250     case function_byte_to_lreal :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = NULL;
       
  7253 
       
  7254         {
       
  7255             identifier_c param_name("IN");
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7258             
       
  7259             /* Get the value from a foo(<param_value>) style call */
       
  7260             if (IN_param_value == NULL)
       
  7261               IN_param_value = function_call_param_iterator.next();
       
  7262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7264             
       
  7265             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7266             {
       
  7267         
       
  7268                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7269                 return return_type_symbol;
       
  7270                 
       
  7271             }
       
  7272             
       
  7273             ERROR;
       
  7274         }
       
  7275         
       
  7276     }/*function_byte_to_lreal*/
       
  7277     break;
       
  7278 
       
  7279 /****
       
  7280  *BYTE_TO_SINT
       
  7281  */
       
  7282     case function_byte_to_sint :
       
  7283     {
       
  7284         symbol_c *last_type_symbol = NULL;
       
  7285 
       
  7286         {
       
  7287             identifier_c param_name("IN");
       
  7288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7290             
       
  7291             /* Get the value from a foo(<param_value>) style call */
       
  7292             if (IN_param_value == NULL)
       
  7293               IN_param_value = function_call_param_iterator.next();
       
  7294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7296             
       
  7297             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7298             {
       
  7299         
       
  7300                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7301                 return return_type_symbol;
       
  7302                 
       
  7303             }
       
  7304             
       
  7305             ERROR;
       
  7306         }
       
  7307         
       
  7308     }/*function_byte_to_sint*/
       
  7309     break;
       
  7310 
       
  7311 /****
       
  7312  *BYTE_TO_INT
       
  7313  */
       
  7314     case function_byte_to_int :
       
  7315     {
       
  7316         symbol_c *last_type_symbol = NULL;
       
  7317 
       
  7318         {
       
  7319             identifier_c param_name("IN");
       
  7320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7322             
       
  7323             /* Get the value from a foo(<param_value>) style call */
       
  7324             if (IN_param_value == NULL)
       
  7325               IN_param_value = function_call_param_iterator.next();
       
  7326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7328             
       
  7329             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7330             {
       
  7331         
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7333                 return return_type_symbol;
       
  7334                 
       
  7335             }
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_byte_to_int*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *BYTE_TO_DINT
       
  7345  */
       
  7346     case function_byte_to_dint :
       
  7347     {
       
  7348         symbol_c *last_type_symbol = NULL;
       
  7349 
       
  7350         {
       
  7351             identifier_c param_name("IN");
       
  7352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7354             
       
  7355             /* Get the value from a foo(<param_value>) style call */
       
  7356             if (IN_param_value == NULL)
       
  7357               IN_param_value = function_call_param_iterator.next();
       
  7358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7360             
       
  7361             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             ERROR;
       
  7370         }
       
  7371         
       
  7372     }/*function_byte_to_dint*/
       
  7373     break;
       
  7374 
       
  7375 /****
       
  7376  *BYTE_TO_LINT
       
  7377  */
       
  7378     case function_byte_to_lint :
       
  7379     {
       
  7380         symbol_c *last_type_symbol = NULL;
       
  7381 
       
  7382         {
       
  7383             identifier_c param_name("IN");
       
  7384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7386             
       
  7387             /* Get the value from a foo(<param_value>) style call */
       
  7388             if (IN_param_value == NULL)
       
  7389               IN_param_value = function_call_param_iterator.next();
       
  7390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7392             
       
  7393             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7394             {
       
  7395         
       
  7396                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7397                 return return_type_symbol;
       
  7398                 
       
  7399             }
       
  7400             
       
  7401             ERROR;
       
  7402         }
       
  7403         
       
  7404     }/*function_byte_to_lint*/
       
  7405     break;
       
  7406 
       
  7407 /****
       
  7408  *BYTE_TO_USINT
       
  7409  */
       
  7410     case function_byte_to_usint :
       
  7411     {
       
  7412         symbol_c *last_type_symbol = NULL;
       
  7413 
       
  7414         {
       
  7415             identifier_c param_name("IN");
       
  7416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7418             
       
  7419             /* Get the value from a foo(<param_value>) style call */
       
  7420             if (IN_param_value == NULL)
       
  7421               IN_param_value = function_call_param_iterator.next();
       
  7422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7424             
       
  7425             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7426             {
       
  7427         
       
  7428                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7429                 return return_type_symbol;
       
  7430                 
       
  7431             }
       
  7432             
       
  7433             ERROR;
       
  7434         }
       
  7435         
       
  7436     }/*function_byte_to_usint*/
       
  7437     break;
       
  7438 
       
  7439 /****
       
  7440  *BYTE_TO_UINT
       
  7441  */
       
  7442     case function_byte_to_uint :
       
  7443     {
       
  7444         symbol_c *last_type_symbol = NULL;
       
  7445 
       
  7446         {
       
  7447             identifier_c param_name("IN");
       
  7448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7450             
       
  7451             /* Get the value from a foo(<param_value>) style call */
       
  7452             if (IN_param_value == NULL)
       
  7453               IN_param_value = function_call_param_iterator.next();
       
  7454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7456             
       
  7457             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7458             {
       
  7459         
       
  7460                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7461                 return return_type_symbol;
       
  7462                 
       
  7463             }
       
  7464             
       
  7465             ERROR;
       
  7466         }
       
  7467         
       
  7468     }/*function_byte_to_uint*/
       
  7469     break;
       
  7470 
       
  7471 /****
       
  7472  *BYTE_TO_UDINT
       
  7473  */
       
  7474     case function_byte_to_udint :
       
  7475     {
       
  7476         symbol_c *last_type_symbol = NULL;
       
  7477 
       
  7478         {
       
  7479             identifier_c param_name("IN");
       
  7480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7482             
       
  7483             /* Get the value from a foo(<param_value>) style call */
       
  7484             if (IN_param_value == NULL)
       
  7485               IN_param_value = function_call_param_iterator.next();
       
  7486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7488             
       
  7489             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7490             {
       
  7491         
       
  7492                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7493                 return return_type_symbol;
       
  7494                 
       
  7495             }
       
  7496             
       
  7497             ERROR;
       
  7498         }
       
  7499         
       
  7500     }/*function_byte_to_udint*/
       
  7501     break;
       
  7502 
       
  7503 /****
       
  7504  *BYTE_TO_ULINT
       
  7505  */
       
  7506     case function_byte_to_ulint :
       
  7507     {
       
  7508         symbol_c *last_type_symbol = NULL;
       
  7509 
       
  7510         {
       
  7511             identifier_c param_name("IN");
       
  7512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7514             
       
  7515             /* Get the value from a foo(<param_value>) style call */
       
  7516             if (IN_param_value == NULL)
       
  7517               IN_param_value = function_call_param_iterator.next();
       
  7518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7520             
       
  7521             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7522             {
       
  7523         
       
  7524                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7525                 return return_type_symbol;
       
  7526                 
       
  7527             }
       
  7528             
       
  7529             ERROR;
       
  7530         }
       
  7531         
       
  7532     }/*function_byte_to_ulint*/
       
  7533     break;
       
  7534 
       
  7535 /****
       
  7536  *BYTE_TO_TIME
       
  7537  */
       
  7538     case function_byte_to_time :
       
  7539     {
       
  7540         symbol_c *last_type_symbol = NULL;
       
  7541 
       
  7542         {
       
  7543             identifier_c param_name("IN");
       
  7544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7546             
       
  7547             /* Get the value from a foo(<param_value>) style call */
       
  7548             if (IN_param_value == NULL)
       
  7549               IN_param_value = function_call_param_iterator.next();
       
  7550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7552             
       
  7553             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7554             {
       
  7555         
       
  7556                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7557                 return return_type_symbol;
       
  7558                 
       
  7559             }
       
  7560             
       
  7561             ERROR;
       
  7562         }
       
  7563         
       
  7564     }/*function_byte_to_time*/
       
  7565     break;
       
  7566 
       
  7567 /****
       
  7568  *BYTE_TO_BOOL
       
  7569  */
       
  7570     case function_byte_to_bool :
       
  7571     {
       
  7572         symbol_c *last_type_symbol = NULL;
       
  7573 
       
  7574         {
       
  7575             identifier_c param_name("IN");
       
  7576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7578             
       
  7579             /* Get the value from a foo(<param_value>) style call */
       
  7580             if (IN_param_value == NULL)
       
  7581               IN_param_value = function_call_param_iterator.next();
       
  7582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7584             
       
  7585             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
   994             {
  7586             {
   995         
  7587         
   996                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  7588                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   997                 return return_type_symbol;
  7589                 return return_type_symbol;
   998                 
  7590                 
   999             }
  7591             }
  1000             
  7592             
  1001             ERROR;
  7593             ERROR;
  1002         }
  7594         }
  1003         
  7595         
  1004     }/*function_lreal_to_bool*/
  7596     }/*function_byte_to_bool*/
  1005     break;
  7597     break;
  1006 
  7598 
  1007 /****
  7599 /****
  1008  *LREAL_TO_BYTE
  7600  *BYTE_TO_WORD
  1009  */
  7601  */
  1010     case function_lreal_to_byte :
  7602     case function_byte_to_word :
  1011     {
  7603     {
  1012         symbol_c *last_type_symbol = NULL;
  7604         symbol_c *last_type_symbol = NULL;
  1013 
  7605 
  1014         {
  7606         {
  1015             identifier_c param_name("IN");
  7607             identifier_c param_name("IN");
  1016             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7608             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1018             
  7610             
  1019             /* Get the value from a foo(<param_value>) style call */
  7611             /* Get the value from a foo(<param_value>) style call */
  1020             if (IN_param_value == NULL)
  7612             if (IN_param_value == NULL)
  1021               IN_param_value = function_call_param_iterator.next();
  7613               IN_param_value = function_call_param_iterator.next();
  1022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1024             
  7616             
  1025             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  7617             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7618             {
       
  7619         
       
  7620                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7621                 return return_type_symbol;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             ERROR;
       
  7626         }
       
  7627         
       
  7628     }/*function_byte_to_word*/
       
  7629     break;
       
  7630 
       
  7631 /****
       
  7632  *BYTE_TO_DWORD
       
  7633  */
       
  7634     case function_byte_to_dword :
       
  7635     {
       
  7636         symbol_c *last_type_symbol = NULL;
       
  7637 
       
  7638         {
       
  7639             identifier_c param_name("IN");
       
  7640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7642             
       
  7643             /* Get the value from a foo(<param_value>) style call */
       
  7644             if (IN_param_value == NULL)
       
  7645               IN_param_value = function_call_param_iterator.next();
       
  7646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7648             
       
  7649             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7650             {
       
  7651         
       
  7652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7653                 return return_type_symbol;
       
  7654                 
       
  7655             }
       
  7656             
       
  7657             ERROR;
       
  7658         }
       
  7659         
       
  7660     }/*function_byte_to_dword*/
       
  7661     break;
       
  7662 
       
  7663 /****
       
  7664  *BYTE_TO_LWORD
       
  7665  */
       
  7666     case function_byte_to_lword :
       
  7667     {
       
  7668         symbol_c *last_type_symbol = NULL;
       
  7669 
       
  7670         {
       
  7671             identifier_c param_name("IN");
       
  7672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7674             
       
  7675             /* Get the value from a foo(<param_value>) style call */
       
  7676             if (IN_param_value == NULL)
       
  7677               IN_param_value = function_call_param_iterator.next();
       
  7678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7680             
       
  7681             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7682             {
       
  7683         
       
  7684                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7685                 return return_type_symbol;
       
  7686                 
       
  7687             }
       
  7688             
       
  7689             ERROR;
       
  7690         }
       
  7691         
       
  7692     }/*function_byte_to_lword*/
       
  7693     break;
       
  7694 
       
  7695 /****
       
  7696  *BYTE_TO_STRING
       
  7697  */
       
  7698     case function_byte_to_string :
       
  7699     {
       
  7700         symbol_c *last_type_symbol = NULL;
       
  7701 
       
  7702         {
       
  7703             identifier_c param_name("IN");
       
  7704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7706             
       
  7707             /* Get the value from a foo(<param_value>) style call */
       
  7708             if (IN_param_value == NULL)
       
  7709               IN_param_value = function_call_param_iterator.next();
       
  7710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7712             
       
  7713             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7714             {
       
  7715         
       
  7716                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7717                 return return_type_symbol;
       
  7718                 
       
  7719             }
       
  7720             
       
  7721             ERROR;
       
  7722         }
       
  7723         
       
  7724     }/*function_byte_to_string*/
       
  7725     break;
       
  7726 
       
  7727 /****
       
  7728  *BYTE_TO_DATE
       
  7729  */
       
  7730     case function_byte_to_date :
       
  7731     {
       
  7732         symbol_c *last_type_symbol = NULL;
       
  7733 
       
  7734         {
       
  7735             identifier_c param_name("IN");
       
  7736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7738             
       
  7739             /* Get the value from a foo(<param_value>) style call */
       
  7740             if (IN_param_value == NULL)
       
  7741               IN_param_value = function_call_param_iterator.next();
       
  7742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7744             
       
  7745             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7746             {
       
  7747         
       
  7748                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7749                 return return_type_symbol;
       
  7750                 
       
  7751             }
       
  7752             
       
  7753             ERROR;
       
  7754         }
       
  7755         
       
  7756     }/*function_byte_to_date*/
       
  7757     break;
       
  7758 
       
  7759 /****
       
  7760  *BYTE_TO_TOD
       
  7761  */
       
  7762     case function_byte_to_tod :
       
  7763     {
       
  7764         symbol_c *last_type_symbol = NULL;
       
  7765 
       
  7766         {
       
  7767             identifier_c param_name("IN");
       
  7768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next();
       
  7774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7776             
       
  7777             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7778             {
       
  7779         
       
  7780                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7781                 return return_type_symbol;
       
  7782                 
       
  7783             }
       
  7784             
       
  7785             ERROR;
       
  7786         }
       
  7787         
       
  7788     }/*function_byte_to_tod*/
       
  7789     break;
       
  7790 
       
  7791 /****
       
  7792  *BYTE_TO_DT
       
  7793  */
       
  7794     case function_byte_to_dt :
       
  7795     {
       
  7796         symbol_c *last_type_symbol = NULL;
       
  7797 
       
  7798         {
       
  7799             identifier_c param_name("IN");
       
  7800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7802             
       
  7803             /* Get the value from a foo(<param_value>) style call */
       
  7804             if (IN_param_value == NULL)
       
  7805               IN_param_value = function_call_param_iterator.next();
       
  7806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7808             
       
  7809             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7810             {
       
  7811         
       
  7812                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7813                 return return_type_symbol;
       
  7814                 
       
  7815             }
       
  7816             
       
  7817             ERROR;
       
  7818         }
       
  7819         
       
  7820     }/*function_byte_to_dt*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *WORD_TO_REAL
       
  7825  */
       
  7826     case function_word_to_real :
       
  7827     {
       
  7828         symbol_c *last_type_symbol = NULL;
       
  7829 
       
  7830         {
       
  7831             identifier_c param_name("IN");
       
  7832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7834             
       
  7835             /* Get the value from a foo(<param_value>) style call */
       
  7836             if (IN_param_value == NULL)
       
  7837               IN_param_value = function_call_param_iterator.next();
       
  7838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7840             
       
  7841             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7842             {
       
  7843         
       
  7844                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7845                 return return_type_symbol;
       
  7846                 
       
  7847             }
       
  7848             
       
  7849             ERROR;
       
  7850         }
       
  7851         
       
  7852     }/*function_word_to_real*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *WORD_TO_LREAL
       
  7857  */
       
  7858     case function_word_to_lreal :
       
  7859     {
       
  7860         symbol_c *last_type_symbol = NULL;
       
  7861 
       
  7862         {
       
  7863             identifier_c param_name("IN");
       
  7864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7866             
       
  7867             /* Get the value from a foo(<param_value>) style call */
       
  7868             if (IN_param_value == NULL)
       
  7869               IN_param_value = function_call_param_iterator.next();
       
  7870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7872             
       
  7873             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7874             {
       
  7875         
       
  7876                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7877                 return return_type_symbol;
       
  7878                 
       
  7879             }
       
  7880             
       
  7881             ERROR;
       
  7882         }
       
  7883         
       
  7884     }/*function_word_to_lreal*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *WORD_TO_SINT
       
  7889  */
       
  7890     case function_word_to_sint :
       
  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(word_type_name_c))
       
  7906             {
       
  7907         
       
  7908                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7909                 return return_type_symbol;
       
  7910                 
       
  7911             }
       
  7912             
       
  7913             ERROR;
       
  7914         }
       
  7915         
       
  7916     }/*function_word_to_sint*/
       
  7917     break;
       
  7918 
       
  7919 /****
       
  7920  *WORD_TO_INT
       
  7921  */
       
  7922     case function_word_to_int :
       
  7923     {
       
  7924         symbol_c *last_type_symbol = NULL;
       
  7925 
       
  7926         {
       
  7927             identifier_c param_name("IN");
       
  7928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7930             
       
  7931             /* Get the value from a foo(<param_value>) style call */
       
  7932             if (IN_param_value == NULL)
       
  7933               IN_param_value = function_call_param_iterator.next();
       
  7934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7936             
       
  7937             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7938             {
       
  7939         
       
  7940                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7941                 return return_type_symbol;
       
  7942                 
       
  7943             }
       
  7944             
       
  7945             ERROR;
       
  7946         }
       
  7947         
       
  7948     }/*function_word_to_int*/
       
  7949     break;
       
  7950 
       
  7951 /****
       
  7952  *WORD_TO_DINT
       
  7953  */
       
  7954     case function_word_to_dint :
       
  7955     {
       
  7956         symbol_c *last_type_symbol = NULL;
       
  7957 
       
  7958         {
       
  7959             identifier_c param_name("IN");
       
  7960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7962             
       
  7963             /* Get the value from a foo(<param_value>) style call */
       
  7964             if (IN_param_value == NULL)
       
  7965               IN_param_value = function_call_param_iterator.next();
       
  7966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7968             
       
  7969             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  7970             {
       
  7971         
       
  7972                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7973                 return return_type_symbol;
       
  7974                 
       
  7975             }
       
  7976             
       
  7977             ERROR;
       
  7978         }
       
  7979         
       
  7980     }/*function_word_to_dint*/
       
  7981     break;
       
  7982 
       
  7983 /****
       
  7984  *WORD_TO_LINT
       
  7985  */
       
  7986     case function_word_to_lint :
       
  7987     {
       
  7988         symbol_c *last_type_symbol = NULL;
       
  7989 
       
  7990         {
       
  7991             identifier_c param_name("IN");
       
  7992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7994             
       
  7995             /* Get the value from a foo(<param_value>) style call */
       
  7996             if (IN_param_value == NULL)
       
  7997               IN_param_value = function_call_param_iterator.next();
       
  7998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8000             
       
  8001             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8002             {
       
  8003         
       
  8004                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8005                 return return_type_symbol;
       
  8006                 
       
  8007             }
       
  8008             
       
  8009             ERROR;
       
  8010         }
       
  8011         
       
  8012     }/*function_word_to_lint*/
       
  8013     break;
       
  8014 
       
  8015 /****
       
  8016  *WORD_TO_USINT
       
  8017  */
       
  8018     case function_word_to_usint :
       
  8019     {
       
  8020         symbol_c *last_type_symbol = NULL;
       
  8021 
       
  8022         {
       
  8023             identifier_c param_name("IN");
       
  8024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8026             
       
  8027             /* Get the value from a foo(<param_value>) style call */
       
  8028             if (IN_param_value == NULL)
       
  8029               IN_param_value = function_call_param_iterator.next();
       
  8030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8032             
       
  8033             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8034             {
       
  8035         
       
  8036                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8037                 return return_type_symbol;
       
  8038                 
       
  8039             }
       
  8040             
       
  8041             ERROR;
       
  8042         }
       
  8043         
       
  8044     }/*function_word_to_usint*/
       
  8045     break;
       
  8046 
       
  8047 /****
       
  8048  *WORD_TO_UINT
       
  8049  */
       
  8050     case function_word_to_uint :
       
  8051     {
       
  8052         symbol_c *last_type_symbol = NULL;
       
  8053 
       
  8054         {
       
  8055             identifier_c param_name("IN");
       
  8056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8058             
       
  8059             /* Get the value from a foo(<param_value>) style call */
       
  8060             if (IN_param_value == NULL)
       
  8061               IN_param_value = function_call_param_iterator.next();
       
  8062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8064             
       
  8065             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8066             {
       
  8067         
       
  8068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8069                 return return_type_symbol;
       
  8070                 
       
  8071             }
       
  8072             
       
  8073             ERROR;
       
  8074         }
       
  8075         
       
  8076     }/*function_word_to_uint*/
       
  8077     break;
       
  8078 
       
  8079 /****
       
  8080  *WORD_TO_UDINT
       
  8081  */
       
  8082     case function_word_to_udint :
       
  8083     {
       
  8084         symbol_c *last_type_symbol = NULL;
       
  8085 
       
  8086         {
       
  8087             identifier_c param_name("IN");
       
  8088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8090             
       
  8091             /* Get the value from a foo(<param_value>) style call */
       
  8092             if (IN_param_value == NULL)
       
  8093               IN_param_value = function_call_param_iterator.next();
       
  8094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8096             
       
  8097             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8098             {
       
  8099         
       
  8100                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8101                 return return_type_symbol;
       
  8102                 
       
  8103             }
       
  8104             
       
  8105             ERROR;
       
  8106         }
       
  8107         
       
  8108     }/*function_word_to_udint*/
       
  8109     break;
       
  8110 
       
  8111 /****
       
  8112  *WORD_TO_ULINT
       
  8113  */
       
  8114     case function_word_to_ulint :
       
  8115     {
       
  8116         symbol_c *last_type_symbol = NULL;
       
  8117 
       
  8118         {
       
  8119             identifier_c param_name("IN");
       
  8120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8122             
       
  8123             /* Get the value from a foo(<param_value>) style call */
       
  8124             if (IN_param_value == NULL)
       
  8125               IN_param_value = function_call_param_iterator.next();
       
  8126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8128             
       
  8129             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8130             {
       
  8131         
       
  8132                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8133                 return return_type_symbol;
       
  8134                 
       
  8135             }
       
  8136             
       
  8137             ERROR;
       
  8138         }
       
  8139         
       
  8140     }/*function_word_to_ulint*/
       
  8141     break;
       
  8142 
       
  8143 /****
       
  8144  *WORD_TO_TIME
       
  8145  */
       
  8146     case function_word_to_time :
       
  8147     {
       
  8148         symbol_c *last_type_symbol = NULL;
       
  8149 
       
  8150         {
       
  8151             identifier_c param_name("IN");
       
  8152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8154             
       
  8155             /* Get the value from a foo(<param_value>) style call */
       
  8156             if (IN_param_value == NULL)
       
  8157               IN_param_value = function_call_param_iterator.next();
       
  8158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8160             
       
  8161             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8162             {
       
  8163         
       
  8164                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8165                 return return_type_symbol;
       
  8166                 
       
  8167             }
       
  8168             
       
  8169             ERROR;
       
  8170         }
       
  8171         
       
  8172     }/*function_word_to_time*/
       
  8173     break;
       
  8174 
       
  8175 /****
       
  8176  *WORD_TO_BOOL
       
  8177  */
       
  8178     case function_word_to_bool :
       
  8179     {
       
  8180         symbol_c *last_type_symbol = NULL;
       
  8181 
       
  8182         {
       
  8183             identifier_c param_name("IN");
       
  8184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8186             
       
  8187             /* Get the value from a foo(<param_value>) style call */
       
  8188             if (IN_param_value == NULL)
       
  8189               IN_param_value = function_call_param_iterator.next();
       
  8190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8192             
       
  8193             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8194             {
       
  8195         
       
  8196                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8197                 return return_type_symbol;
       
  8198                 
       
  8199             }
       
  8200             
       
  8201             ERROR;
       
  8202         }
       
  8203         
       
  8204     }/*function_word_to_bool*/
       
  8205     break;
       
  8206 
       
  8207 /****
       
  8208  *WORD_TO_BYTE
       
  8209  */
       
  8210     case function_word_to_byte :
       
  8211     {
       
  8212         symbol_c *last_type_symbol = NULL;
       
  8213 
       
  8214         {
       
  8215             identifier_c param_name("IN");
       
  8216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8218             
       
  8219             /* Get the value from a foo(<param_value>) style call */
       
  8220             if (IN_param_value == NULL)
       
  8221               IN_param_value = function_call_param_iterator.next();
       
  8222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8224             
       
  8225             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
  1026             {
  8226             {
  1027         
  8227         
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  8228                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1029                 return return_type_symbol;
  8229                 return return_type_symbol;
  1030                 
  8230                 
  1031             }
  8231             }
  1032             
  8232             
  1033             ERROR;
  8233             ERROR;
  1034         }
  8234         }
  1035         
  8235         
  1036     }/*function_lreal_to_byte*/
  8236     }/*function_word_to_byte*/
  1037     break;
  8237     break;
  1038 
  8238 
  1039 /****
  8239 /****
  1040  *LREAL_TO_WORD
  8240  *WORD_TO_DWORD
  1041  */
  8241  */
  1042     case function_lreal_to_word :
  8242     case function_word_to_dword :
  1043     {
  8243     {
  1044         symbol_c *last_type_symbol = NULL;
  8244         symbol_c *last_type_symbol = NULL;
  1045 
  8245 
  1046         {
  8246         {
  1047             identifier_c param_name("IN");
  8247             identifier_c param_name("IN");
  1048             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8248             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1050             
  8250             
  1051             /* Get the value from a foo(<param_value>) style call */
  8251             /* Get the value from a foo(<param_value>) style call */
  1052             if (IN_param_value == NULL)
  8252             if (IN_param_value == NULL)
  1053               IN_param_value = function_call_param_iterator.next();
  8253               IN_param_value = function_call_param_iterator.next();
  1054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1056             
  8256             
  1057             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  8257             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8258             {
       
  8259         
       
  8260                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8261                 return return_type_symbol;
       
  8262                 
       
  8263             }
       
  8264             
       
  8265             ERROR;
       
  8266         }
       
  8267         
       
  8268     }/*function_word_to_dword*/
       
  8269     break;
       
  8270 
       
  8271 /****
       
  8272  *WORD_TO_LWORD
       
  8273  */
       
  8274     case function_word_to_lword :
       
  8275     {
       
  8276         symbol_c *last_type_symbol = NULL;
       
  8277 
       
  8278         {
       
  8279             identifier_c param_name("IN");
       
  8280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8282             
       
  8283             /* Get the value from a foo(<param_value>) style call */
       
  8284             if (IN_param_value == NULL)
       
  8285               IN_param_value = function_call_param_iterator.next();
       
  8286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8288             
       
  8289             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8290             {
       
  8291         
       
  8292                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8293                 return return_type_symbol;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             ERROR;
       
  8298         }
       
  8299         
       
  8300     }/*function_word_to_lword*/
       
  8301     break;
       
  8302 
       
  8303 /****
       
  8304  *WORD_TO_STRING
       
  8305  */
       
  8306     case function_word_to_string :
       
  8307     {
       
  8308         symbol_c *last_type_symbol = NULL;
       
  8309 
       
  8310         {
       
  8311             identifier_c param_name("IN");
       
  8312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8314             
       
  8315             /* Get the value from a foo(<param_value>) style call */
       
  8316             if (IN_param_value == NULL)
       
  8317               IN_param_value = function_call_param_iterator.next();
       
  8318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8320             
       
  8321             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8322             {
       
  8323         
       
  8324                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8325                 return return_type_symbol;
       
  8326                 
       
  8327             }
       
  8328             
       
  8329             ERROR;
       
  8330         }
       
  8331         
       
  8332     }/*function_word_to_string*/
       
  8333     break;
       
  8334 
       
  8335 /****
       
  8336  *WORD_TO_DATE
       
  8337  */
       
  8338     case function_word_to_date :
       
  8339     {
       
  8340         symbol_c *last_type_symbol = NULL;
       
  8341 
       
  8342         {
       
  8343             identifier_c param_name("IN");
       
  8344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8346             
       
  8347             /* Get the value from a foo(<param_value>) style call */
       
  8348             if (IN_param_value == NULL)
       
  8349               IN_param_value = function_call_param_iterator.next();
       
  8350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8352             
       
  8353             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8354             {
       
  8355         
       
  8356                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8357                 return return_type_symbol;
       
  8358                 
       
  8359             }
       
  8360             
       
  8361             ERROR;
       
  8362         }
       
  8363         
       
  8364     }/*function_word_to_date*/
       
  8365     break;
       
  8366 
       
  8367 /****
       
  8368  *WORD_TO_TOD
       
  8369  */
       
  8370     case function_word_to_tod :
       
  8371     {
       
  8372         symbol_c *last_type_symbol = NULL;
       
  8373 
       
  8374         {
       
  8375             identifier_c param_name("IN");
       
  8376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8378             
       
  8379             /* Get the value from a foo(<param_value>) style call */
       
  8380             if (IN_param_value == NULL)
       
  8381               IN_param_value = function_call_param_iterator.next();
       
  8382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8384             
       
  8385             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8386             {
       
  8387         
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8389                 return return_type_symbol;
       
  8390                 
       
  8391             }
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_word_to_tod*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *WORD_TO_DT
       
  8401  */
       
  8402     case function_word_to_dt :
       
  8403     {
       
  8404         symbol_c *last_type_symbol = NULL;
       
  8405 
       
  8406         {
       
  8407             identifier_c param_name("IN");
       
  8408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8410             
       
  8411             /* Get the value from a foo(<param_value>) style call */
       
  8412             if (IN_param_value == NULL)
       
  8413               IN_param_value = function_call_param_iterator.next();
       
  8414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8416             
       
  8417             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_word_to_dt*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *DWORD_TO_REAL
       
  8433  */
       
  8434     case function_dword_to_real :
       
  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(dword_type_name_c))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8453                 return return_type_symbol;
       
  8454                 
       
  8455             }
       
  8456             
       
  8457             ERROR;
       
  8458         }
       
  8459         
       
  8460     }/*function_dword_to_real*/
       
  8461     break;
       
  8462 
       
  8463 /****
       
  8464  *DWORD_TO_LREAL
       
  8465  */
       
  8466     case function_dword_to_lreal :
       
  8467     {
       
  8468         symbol_c *last_type_symbol = NULL;
       
  8469 
       
  8470         {
       
  8471             identifier_c param_name("IN");
       
  8472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8474             
       
  8475             /* Get the value from a foo(<param_value>) style call */
       
  8476             if (IN_param_value == NULL)
       
  8477               IN_param_value = function_call_param_iterator.next();
       
  8478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8480             
       
  8481             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8482             {
       
  8483         
       
  8484                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8485                 return return_type_symbol;
       
  8486                 
       
  8487             }
       
  8488             
       
  8489             ERROR;
       
  8490         }
       
  8491         
       
  8492     }/*function_dword_to_lreal*/
       
  8493     break;
       
  8494 
       
  8495 /****
       
  8496  *DWORD_TO_SINT
       
  8497  */
       
  8498     case function_dword_to_sint :
       
  8499     {
       
  8500         symbol_c *last_type_symbol = NULL;
       
  8501 
       
  8502         {
       
  8503             identifier_c param_name("IN");
       
  8504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8506             
       
  8507             /* Get the value from a foo(<param_value>) style call */
       
  8508             if (IN_param_value == NULL)
       
  8509               IN_param_value = function_call_param_iterator.next();
       
  8510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8512             
       
  8513             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8514             {
       
  8515         
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8517                 return return_type_symbol;
       
  8518                 
       
  8519             }
       
  8520             
       
  8521             ERROR;
       
  8522         }
       
  8523         
       
  8524     }/*function_dword_to_sint*/
       
  8525     break;
       
  8526 
       
  8527 /****
       
  8528  *DWORD_TO_INT
       
  8529  */
       
  8530     case function_dword_to_int :
       
  8531     {
       
  8532         symbol_c *last_type_symbol = NULL;
       
  8533 
       
  8534         {
       
  8535             identifier_c param_name("IN");
       
  8536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8538             
       
  8539             /* Get the value from a foo(<param_value>) style call */
       
  8540             if (IN_param_value == NULL)
       
  8541               IN_param_value = function_call_param_iterator.next();
       
  8542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8544             
       
  8545             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8546             {
       
  8547         
       
  8548                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8549                 return return_type_symbol;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             ERROR;
       
  8554         }
       
  8555         
       
  8556     }/*function_dword_to_int*/
       
  8557     break;
       
  8558 
       
  8559 /****
       
  8560  *DWORD_TO_DINT
       
  8561  */
       
  8562     case function_dword_to_dint :
       
  8563     {
       
  8564         symbol_c *last_type_symbol = NULL;
       
  8565 
       
  8566         {
       
  8567             identifier_c param_name("IN");
       
  8568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8570             
       
  8571             /* Get the value from a foo(<param_value>) style call */
       
  8572             if (IN_param_value == NULL)
       
  8573               IN_param_value = function_call_param_iterator.next();
       
  8574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8576             
       
  8577             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8578             {
       
  8579         
       
  8580                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8581                 return return_type_symbol;
       
  8582                 
       
  8583             }
       
  8584             
       
  8585             ERROR;
       
  8586         }
       
  8587         
       
  8588     }/*function_dword_to_dint*/
       
  8589     break;
       
  8590 
       
  8591 /****
       
  8592  *DWORD_TO_LINT
       
  8593  */
       
  8594     case function_dword_to_lint :
       
  8595     {
       
  8596         symbol_c *last_type_symbol = NULL;
       
  8597 
       
  8598         {
       
  8599             identifier_c param_name("IN");
       
  8600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8602             
       
  8603             /* Get the value from a foo(<param_value>) style call */
       
  8604             if (IN_param_value == NULL)
       
  8605               IN_param_value = function_call_param_iterator.next();
       
  8606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8608             
       
  8609             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8610             {
       
  8611         
       
  8612                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8613                 return return_type_symbol;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_dword_to_lint*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *DWORD_TO_USINT
       
  8625  */
       
  8626     case function_dword_to_usint :
       
  8627     {
       
  8628         symbol_c *last_type_symbol = NULL;
       
  8629 
       
  8630         {
       
  8631             identifier_c param_name("IN");
       
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8634             
       
  8635             /* Get the value from a foo(<param_value>) style call */
       
  8636             if (IN_param_value == NULL)
       
  8637               IN_param_value = function_call_param_iterator.next();
       
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8640             
       
  8641             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8645                 return return_type_symbol;
       
  8646                 
       
  8647             }
       
  8648             
       
  8649             ERROR;
       
  8650         }
       
  8651         
       
  8652     }/*function_dword_to_usint*/
       
  8653     break;
       
  8654 
       
  8655 /****
       
  8656  *DWORD_TO_UINT
       
  8657  */
       
  8658     case function_dword_to_uint :
       
  8659     {
       
  8660         symbol_c *last_type_symbol = NULL;
       
  8661 
       
  8662         {
       
  8663             identifier_c param_name("IN");
       
  8664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8666             
       
  8667             /* Get the value from a foo(<param_value>) style call */
       
  8668             if (IN_param_value == NULL)
       
  8669               IN_param_value = function_call_param_iterator.next();
       
  8670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8672             
       
  8673             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8674             {
       
  8675         
       
  8676                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8677                 return return_type_symbol;
       
  8678                 
       
  8679             }
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_dword_to_uint*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *DWORD_TO_UDINT
       
  8689  */
       
  8690     case function_dword_to_udint :
       
  8691     {
       
  8692         symbol_c *last_type_symbol = NULL;
       
  8693 
       
  8694         {
       
  8695             identifier_c param_name("IN");
       
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8698             
       
  8699             /* Get the value from a foo(<param_value>) style call */
       
  8700             if (IN_param_value == NULL)
       
  8701               IN_param_value = function_call_param_iterator.next();
       
  8702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8704             
       
  8705             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8706             {
       
  8707         
       
  8708                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8709                 return return_type_symbol;
       
  8710                 
       
  8711             }
       
  8712             
       
  8713             ERROR;
       
  8714         }
       
  8715         
       
  8716     }/*function_dword_to_udint*/
       
  8717     break;
       
  8718 
       
  8719 /****
       
  8720  *DWORD_TO_ULINT
       
  8721  */
       
  8722     case function_dword_to_ulint :
       
  8723     {
       
  8724         symbol_c *last_type_symbol = NULL;
       
  8725 
       
  8726         {
       
  8727             identifier_c param_name("IN");
       
  8728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8730             
       
  8731             /* Get the value from a foo(<param_value>) style call */
       
  8732             if (IN_param_value == NULL)
       
  8733               IN_param_value = function_call_param_iterator.next();
       
  8734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8736             
       
  8737             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8738             {
       
  8739         
       
  8740                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8741                 return return_type_symbol;
       
  8742                 
       
  8743             }
       
  8744             
       
  8745             ERROR;
       
  8746         }
       
  8747         
       
  8748     }/*function_dword_to_ulint*/
       
  8749     break;
       
  8750 
       
  8751 /****
       
  8752  *DWORD_TO_TIME
       
  8753  */
       
  8754     case function_dword_to_time :
       
  8755     {
       
  8756         symbol_c *last_type_symbol = NULL;
       
  8757 
       
  8758         {
       
  8759             identifier_c param_name("IN");
       
  8760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8762             
       
  8763             /* Get the value from a foo(<param_value>) style call */
       
  8764             if (IN_param_value == NULL)
       
  8765               IN_param_value = function_call_param_iterator.next();
       
  8766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8768             
       
  8769             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8770             {
       
  8771         
       
  8772                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8773                 return return_type_symbol;
       
  8774                 
       
  8775             }
       
  8776             
       
  8777             ERROR;
       
  8778         }
       
  8779         
       
  8780     }/*function_dword_to_time*/
       
  8781     break;
       
  8782 
       
  8783 /****
       
  8784  *DWORD_TO_BOOL
       
  8785  */
       
  8786     case function_dword_to_bool :
       
  8787     {
       
  8788         symbol_c *last_type_symbol = NULL;
       
  8789 
       
  8790         {
       
  8791             identifier_c param_name("IN");
       
  8792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8794             
       
  8795             /* Get the value from a foo(<param_value>) style call */
       
  8796             if (IN_param_value == NULL)
       
  8797               IN_param_value = function_call_param_iterator.next();
       
  8798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8800             
       
  8801             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8802             {
       
  8803         
       
  8804                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8805                 return return_type_symbol;
       
  8806                 
       
  8807             }
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_dword_to_bool*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *DWORD_TO_BYTE
       
  8817  */
       
  8818     case function_dword_to_byte :
       
  8819     {
       
  8820         symbol_c *last_type_symbol = NULL;
       
  8821 
       
  8822         {
       
  8823             identifier_c param_name("IN");
       
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8826             
       
  8827             /* Get the value from a foo(<param_value>) style call */
       
  8828             if (IN_param_value == NULL)
       
  8829               IN_param_value = function_call_param_iterator.next();
       
  8830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8832             
       
  8833             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8834             {
       
  8835         
       
  8836                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8837                 return return_type_symbol;
       
  8838                 
       
  8839             }
       
  8840             
       
  8841             ERROR;
       
  8842         }
       
  8843         
       
  8844     }/*function_dword_to_byte*/
       
  8845     break;
       
  8846 
       
  8847 /****
       
  8848  *DWORD_TO_WORD
       
  8849  */
       
  8850     case function_dword_to_word :
       
  8851     {
       
  8852         symbol_c *last_type_symbol = NULL;
       
  8853 
       
  8854         {
       
  8855             identifier_c param_name("IN");
       
  8856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8858             
       
  8859             /* Get the value from a foo(<param_value>) style call */
       
  8860             if (IN_param_value == NULL)
       
  8861               IN_param_value = function_call_param_iterator.next();
       
  8862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8864             
       
  8865             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
  1058             {
  8866             {
  1059         
  8867         
  1060                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  8868                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1061                 return return_type_symbol;
  8869                 return return_type_symbol;
  1062                 
  8870                 
  1063             }
  8871             }
  1064             
  8872             
  1065             ERROR;
  8873             ERROR;
  1066         }
  8874         }
  1067         
  8875         
  1068     }/*function_lreal_to_word*/
  8876     }/*function_dword_to_word*/
  1069     break;
  8877     break;
  1070 
  8878 
  1071 /****
  8879 /****
  1072  *LREAL_TO_DWORD
  8880  *DWORD_TO_LWORD
  1073  */
  8881  */
  1074     case function_lreal_to_dword :
  8882     case function_dword_to_lword :
  1075     {
  8883     {
  1076         symbol_c *last_type_symbol = NULL;
  8884         symbol_c *last_type_symbol = NULL;
  1077 
  8885 
  1078         {
  8886         {
  1079             identifier_c param_name("IN");
  8887             identifier_c param_name("IN");
  1080             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8888             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1082             
  8890             
  1083             /* Get the value from a foo(<param_value>) style call */
  8891             /* Get the value from a foo(<param_value>) style call */
  1084             if (IN_param_value == NULL)
  8892             if (IN_param_value == NULL)
  1085               IN_param_value = function_call_param_iterator.next();
  8893               IN_param_value = function_call_param_iterator.next();
  1086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1088             
  8896             
  1089             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  8897             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8898             {
       
  8899         
       
  8900                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8901                 return return_type_symbol;
       
  8902                 
       
  8903             }
       
  8904             
       
  8905             ERROR;
       
  8906         }
       
  8907         
       
  8908     }/*function_dword_to_lword*/
       
  8909     break;
       
  8910 
       
  8911 /****
       
  8912  *DWORD_TO_STRING
       
  8913  */
       
  8914     case function_dword_to_string :
       
  8915     {
       
  8916         symbol_c *last_type_symbol = NULL;
       
  8917 
       
  8918         {
       
  8919             identifier_c param_name("IN");
       
  8920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8922             
       
  8923             /* Get the value from a foo(<param_value>) style call */
       
  8924             if (IN_param_value == NULL)
       
  8925               IN_param_value = function_call_param_iterator.next();
       
  8926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8928             
       
  8929             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8930             {
       
  8931         
       
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8933                 return return_type_symbol;
       
  8934                 
       
  8935             }
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_dword_to_string*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *DWORD_TO_DATE
       
  8945  */
       
  8946     case function_dword_to_date :
       
  8947     {
       
  8948         symbol_c *last_type_symbol = NULL;
       
  8949 
       
  8950         {
       
  8951             identifier_c param_name("IN");
       
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8954             
       
  8955             /* Get the value from a foo(<param_value>) style call */
       
  8956             if (IN_param_value == NULL)
       
  8957               IN_param_value = function_call_param_iterator.next();
       
  8958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8960             
       
  8961             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8962             {
       
  8963         
       
  8964                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8965                 return return_type_symbol;
       
  8966                 
       
  8967             }
       
  8968             
       
  8969             ERROR;
       
  8970         }
       
  8971         
       
  8972     }/*function_dword_to_date*/
       
  8973     break;
       
  8974 
       
  8975 /****
       
  8976  *DWORD_TO_TOD
       
  8977  */
       
  8978     case function_dword_to_tod :
       
  8979     {
       
  8980         symbol_c *last_type_symbol = NULL;
       
  8981 
       
  8982         {
       
  8983             identifier_c param_name("IN");
       
  8984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8986             
       
  8987             /* Get the value from a foo(<param_value>) style call */
       
  8988             if (IN_param_value == NULL)
       
  8989               IN_param_value = function_call_param_iterator.next();
       
  8990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8992             
       
  8993             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8994             {
       
  8995         
       
  8996                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8997                 return return_type_symbol;
       
  8998                 
       
  8999             }
       
  9000             
       
  9001             ERROR;
       
  9002         }
       
  9003         
       
  9004     }/*function_dword_to_tod*/
       
  9005     break;
       
  9006 
       
  9007 /****
       
  9008  *DWORD_TO_DT
       
  9009  */
       
  9010     case function_dword_to_dt :
       
  9011     {
       
  9012         symbol_c *last_type_symbol = NULL;
       
  9013 
       
  9014         {
       
  9015             identifier_c param_name("IN");
       
  9016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9018             
       
  9019             /* Get the value from a foo(<param_value>) style call */
       
  9020             if (IN_param_value == NULL)
       
  9021               IN_param_value = function_call_param_iterator.next();
       
  9022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9024             
       
  9025             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9026             {
       
  9027         
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9029                 return return_type_symbol;
       
  9030                 
       
  9031             }
       
  9032             
       
  9033             ERROR;
       
  9034         }
       
  9035         
       
  9036     }/*function_dword_to_dt*/
       
  9037     break;
       
  9038 
       
  9039 /****
       
  9040  *LWORD_TO_REAL
       
  9041  */
       
  9042     case function_lword_to_real :
       
  9043     {
       
  9044         symbol_c *last_type_symbol = NULL;
       
  9045 
       
  9046         {
       
  9047             identifier_c param_name("IN");
       
  9048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9050             
       
  9051             /* Get the value from a foo(<param_value>) style call */
       
  9052             if (IN_param_value == NULL)
       
  9053               IN_param_value = function_call_param_iterator.next();
       
  9054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9056             
       
  9057             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9058             {
       
  9059         
       
  9060                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9061                 return return_type_symbol;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             ERROR;
       
  9066         }
       
  9067         
       
  9068     }/*function_lword_to_real*/
       
  9069     break;
       
  9070 
       
  9071 /****
       
  9072  *LWORD_TO_LREAL
       
  9073  */
       
  9074     case function_lword_to_lreal :
       
  9075     {
       
  9076         symbol_c *last_type_symbol = NULL;
       
  9077 
       
  9078         {
       
  9079             identifier_c param_name("IN");
       
  9080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9082             
       
  9083             /* Get the value from a foo(<param_value>) style call */
       
  9084             if (IN_param_value == NULL)
       
  9085               IN_param_value = function_call_param_iterator.next();
       
  9086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9088             
       
  9089             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9090             {
       
  9091         
       
  9092                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9093                 return return_type_symbol;
       
  9094                 
       
  9095             }
       
  9096             
       
  9097             ERROR;
       
  9098         }
       
  9099         
       
  9100     }/*function_lword_to_lreal*/
       
  9101     break;
       
  9102 
       
  9103 /****
       
  9104  *LWORD_TO_SINT
       
  9105  */
       
  9106     case function_lword_to_sint :
       
  9107     {
       
  9108         symbol_c *last_type_symbol = NULL;
       
  9109 
       
  9110         {
       
  9111             identifier_c param_name("IN");
       
  9112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9114             
       
  9115             /* Get the value from a foo(<param_value>) style call */
       
  9116             if (IN_param_value == NULL)
       
  9117               IN_param_value = function_call_param_iterator.next();
       
  9118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9120             
       
  9121             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9122             {
       
  9123         
       
  9124                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9125                 return return_type_symbol;
       
  9126                 
       
  9127             }
       
  9128             
       
  9129             ERROR;
       
  9130         }
       
  9131         
       
  9132     }/*function_lword_to_sint*/
       
  9133     break;
       
  9134 
       
  9135 /****
       
  9136  *LWORD_TO_INT
       
  9137  */
       
  9138     case function_lword_to_int :
       
  9139     {
       
  9140         symbol_c *last_type_symbol = NULL;
       
  9141 
       
  9142         {
       
  9143             identifier_c param_name("IN");
       
  9144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9146             
       
  9147             /* Get the value from a foo(<param_value>) style call */
       
  9148             if (IN_param_value == NULL)
       
  9149               IN_param_value = function_call_param_iterator.next();
       
  9150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9152             
       
  9153             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9154             {
       
  9155         
       
  9156                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9157                 return return_type_symbol;
       
  9158                 
       
  9159             }
       
  9160             
       
  9161             ERROR;
       
  9162         }
       
  9163         
       
  9164     }/*function_lword_to_int*/
       
  9165     break;
       
  9166 
       
  9167 /****
       
  9168  *LWORD_TO_DINT
       
  9169  */
       
  9170     case function_lword_to_dint :
       
  9171     {
       
  9172         symbol_c *last_type_symbol = NULL;
       
  9173 
       
  9174         {
       
  9175             identifier_c param_name("IN");
       
  9176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9178             
       
  9179             /* Get the value from a foo(<param_value>) style call */
       
  9180             if (IN_param_value == NULL)
       
  9181               IN_param_value = function_call_param_iterator.next();
       
  9182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9184             
       
  9185             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9186             {
       
  9187         
       
  9188                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9189                 return return_type_symbol;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             ERROR;
       
  9194         }
       
  9195         
       
  9196     }/*function_lword_to_dint*/
       
  9197     break;
       
  9198 
       
  9199 /****
       
  9200  *LWORD_TO_LINT
       
  9201  */
       
  9202     case function_lword_to_lint :
       
  9203     {
       
  9204         symbol_c *last_type_symbol = NULL;
       
  9205 
       
  9206         {
       
  9207             identifier_c param_name("IN");
       
  9208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9210             
       
  9211             /* Get the value from a foo(<param_value>) style call */
       
  9212             if (IN_param_value == NULL)
       
  9213               IN_param_value = function_call_param_iterator.next();
       
  9214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9216             
       
  9217             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9218             {
       
  9219         
       
  9220                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9221                 return return_type_symbol;
       
  9222                 
       
  9223             }
       
  9224             
       
  9225             ERROR;
       
  9226         }
       
  9227         
       
  9228     }/*function_lword_to_lint*/
       
  9229     break;
       
  9230 
       
  9231 /****
       
  9232  *LWORD_TO_USINT
       
  9233  */
       
  9234     case function_lword_to_usint :
       
  9235     {
       
  9236         symbol_c *last_type_symbol = NULL;
       
  9237 
       
  9238         {
       
  9239             identifier_c param_name("IN");
       
  9240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9242             
       
  9243             /* Get the value from a foo(<param_value>) style call */
       
  9244             if (IN_param_value == NULL)
       
  9245               IN_param_value = function_call_param_iterator.next();
       
  9246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9248             
       
  9249             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9250             {
       
  9251         
       
  9252                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9253                 return return_type_symbol;
       
  9254                 
       
  9255             }
       
  9256             
       
  9257             ERROR;
       
  9258         }
       
  9259         
       
  9260     }/*function_lword_to_usint*/
       
  9261     break;
       
  9262 
       
  9263 /****
       
  9264  *LWORD_TO_UINT
       
  9265  */
       
  9266     case function_lword_to_uint :
       
  9267     {
       
  9268         symbol_c *last_type_symbol = NULL;
       
  9269 
       
  9270         {
       
  9271             identifier_c param_name("IN");
       
  9272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9274             
       
  9275             /* Get the value from a foo(<param_value>) style call */
       
  9276             if (IN_param_value == NULL)
       
  9277               IN_param_value = function_call_param_iterator.next();
       
  9278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9280             
       
  9281             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9282             {
       
  9283         
       
  9284                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9285                 return return_type_symbol;
       
  9286                 
       
  9287             }
       
  9288             
       
  9289             ERROR;
       
  9290         }
       
  9291         
       
  9292     }/*function_lword_to_uint*/
       
  9293     break;
       
  9294 
       
  9295 /****
       
  9296  *LWORD_TO_UDINT
       
  9297  */
       
  9298     case function_lword_to_udint :
       
  9299     {
       
  9300         symbol_c *last_type_symbol = NULL;
       
  9301 
       
  9302         {
       
  9303             identifier_c param_name("IN");
       
  9304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9306             
       
  9307             /* Get the value from a foo(<param_value>) style call */
       
  9308             if (IN_param_value == NULL)
       
  9309               IN_param_value = function_call_param_iterator.next();
       
  9310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9312             
       
  9313             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9314             {
       
  9315         
       
  9316                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9317                 return return_type_symbol;
       
  9318                 
       
  9319             }
       
  9320             
       
  9321             ERROR;
       
  9322         }
       
  9323         
       
  9324     }/*function_lword_to_udint*/
       
  9325     break;
       
  9326 
       
  9327 /****
       
  9328  *LWORD_TO_ULINT
       
  9329  */
       
  9330     case function_lword_to_ulint :
       
  9331     {
       
  9332         symbol_c *last_type_symbol = NULL;
       
  9333 
       
  9334         {
       
  9335             identifier_c param_name("IN");
       
  9336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9338             
       
  9339             /* Get the value from a foo(<param_value>) style call */
       
  9340             if (IN_param_value == NULL)
       
  9341               IN_param_value = function_call_param_iterator.next();
       
  9342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9344             
       
  9345             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9346             {
       
  9347         
       
  9348                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9349                 return return_type_symbol;
       
  9350                 
       
  9351             }
       
  9352             
       
  9353             ERROR;
       
  9354         }
       
  9355         
       
  9356     }/*function_lword_to_ulint*/
       
  9357     break;
       
  9358 
       
  9359 /****
       
  9360  *LWORD_TO_TIME
       
  9361  */
       
  9362     case function_lword_to_time :
       
  9363     {
       
  9364         symbol_c *last_type_symbol = NULL;
       
  9365 
       
  9366         {
       
  9367             identifier_c param_name("IN");
       
  9368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9370             
       
  9371             /* Get the value from a foo(<param_value>) style call */
       
  9372             if (IN_param_value == NULL)
       
  9373               IN_param_value = function_call_param_iterator.next();
       
  9374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9376             
       
  9377             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9378             {
       
  9379         
       
  9380                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9381                 return return_type_symbol;
       
  9382                 
       
  9383             }
       
  9384             
       
  9385             ERROR;
       
  9386         }
       
  9387         
       
  9388     }/*function_lword_to_time*/
       
  9389     break;
       
  9390 
       
  9391 /****
       
  9392  *LWORD_TO_BOOL
       
  9393  */
       
  9394     case function_lword_to_bool :
       
  9395     {
       
  9396         symbol_c *last_type_symbol = NULL;
       
  9397 
       
  9398         {
       
  9399             identifier_c param_name("IN");
       
  9400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9402             
       
  9403             /* Get the value from a foo(<param_value>) style call */
       
  9404             if (IN_param_value == NULL)
       
  9405               IN_param_value = function_call_param_iterator.next();
       
  9406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9408             
       
  9409             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9410             {
       
  9411         
       
  9412                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9413                 return return_type_symbol;
       
  9414                 
       
  9415             }
       
  9416             
       
  9417             ERROR;
       
  9418         }
       
  9419         
       
  9420     }/*function_lword_to_bool*/
       
  9421     break;
       
  9422 
       
  9423 /****
       
  9424  *LWORD_TO_BYTE
       
  9425  */
       
  9426     case function_lword_to_byte :
       
  9427     {
       
  9428         symbol_c *last_type_symbol = NULL;
       
  9429 
       
  9430         {
       
  9431             identifier_c param_name("IN");
       
  9432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9434             
       
  9435             /* Get the value from a foo(<param_value>) style call */
       
  9436             if (IN_param_value == NULL)
       
  9437               IN_param_value = function_call_param_iterator.next();
       
  9438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9440             
       
  9441             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9442             {
       
  9443         
       
  9444                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9445                 return return_type_symbol;
       
  9446                 
       
  9447             }
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_lword_to_byte*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *LWORD_TO_WORD
       
  9457  */
       
  9458     case function_lword_to_word :
       
  9459     {
       
  9460         symbol_c *last_type_symbol = NULL;
       
  9461 
       
  9462         {
       
  9463             identifier_c param_name("IN");
       
  9464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9466             
       
  9467             /* Get the value from a foo(<param_value>) style call */
       
  9468             if (IN_param_value == NULL)
       
  9469               IN_param_value = function_call_param_iterator.next();
       
  9470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9472             
       
  9473             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             ERROR;
       
  9482         }
       
  9483         
       
  9484     }/*function_lword_to_word*/
       
  9485     break;
       
  9486 
       
  9487 /****
       
  9488  *LWORD_TO_DWORD
       
  9489  */
       
  9490     case function_lword_to_dword :
       
  9491     {
       
  9492         symbol_c *last_type_symbol = NULL;
       
  9493 
       
  9494         {
       
  9495             identifier_c param_name("IN");
       
  9496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9498             
       
  9499             /* Get the value from a foo(<param_value>) style call */
       
  9500             if (IN_param_value == NULL)
       
  9501               IN_param_value = function_call_param_iterator.next();
       
  9502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9504             
       
  9505             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
  1090             {
  9506             {
  1091         
  9507         
  1092                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  9508                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1093                 return return_type_symbol;
  9509                 return return_type_symbol;
  1094                 
  9510                 
  1095             }
  9511             }
  1096             
  9512             
  1097             ERROR;
  9513             ERROR;
  1098         }
  9514         }
  1099         
  9515         
  1100     }/*function_lreal_to_dword*/
  9516     }/*function_lword_to_dword*/
  1101     break;
  9517     break;
  1102 
  9518 
  1103 /****
  9519 /****
  1104  *LREAL_TO_LWORD
  9520  *LWORD_TO_STRING
  1105  */
  9521  */
  1106     case function_lreal_to_lword :
  9522     case function_lword_to_string :
  1107     {
  9523     {
  1108         symbol_c *last_type_symbol = NULL;
  9524         symbol_c *last_type_symbol = NULL;
  1109 
  9525 
  1110         {
  9526         {
  1111             identifier_c param_name("IN");
  9527             identifier_c param_name("IN");
  1112             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9528             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1114             
  9530             
  1115             /* Get the value from a foo(<param_value>) style call */
  9531             /* Get the value from a foo(<param_value>) style call */
  1116             if (IN_param_value == NULL)
  9532             if (IN_param_value == NULL)
  1117               IN_param_value = function_call_param_iterator.next();
  9533               IN_param_value = function_call_param_iterator.next();
  1118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1120             
  9536             
  1121             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  9537             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9538             {
       
  9539         
       
  9540                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9541                 return return_type_symbol;
       
  9542                 
       
  9543             }
       
  9544             
       
  9545             ERROR;
       
  9546         }
       
  9547         
       
  9548     }/*function_lword_to_string*/
       
  9549     break;
       
  9550 
       
  9551 /****
       
  9552  *LWORD_TO_DATE
       
  9553  */
       
  9554     case function_lword_to_date :
       
  9555     {
       
  9556         symbol_c *last_type_symbol = NULL;
       
  9557 
       
  9558         {
       
  9559             identifier_c param_name("IN");
       
  9560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9562             
       
  9563             /* Get the value from a foo(<param_value>) style call */
       
  9564             if (IN_param_value == NULL)
       
  9565               IN_param_value = function_call_param_iterator.next();
       
  9566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9568             
       
  9569             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9570             {
       
  9571         
       
  9572                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9573                 return return_type_symbol;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             ERROR;
       
  9578         }
       
  9579         
       
  9580     }/*function_lword_to_date*/
       
  9581     break;
       
  9582 
       
  9583 /****
       
  9584  *LWORD_TO_TOD
       
  9585  */
       
  9586     case function_lword_to_tod :
       
  9587     {
       
  9588         symbol_c *last_type_symbol = NULL;
       
  9589 
       
  9590         {
       
  9591             identifier_c param_name("IN");
       
  9592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9594             
       
  9595             /* Get the value from a foo(<param_value>) style call */
       
  9596             if (IN_param_value == NULL)
       
  9597               IN_param_value = function_call_param_iterator.next();
       
  9598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9600             
       
  9601             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9602             {
       
  9603         
       
  9604                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9605                 return return_type_symbol;
       
  9606                 
       
  9607             }
       
  9608             
       
  9609             ERROR;
       
  9610         }
       
  9611         
       
  9612     }/*function_lword_to_tod*/
       
  9613     break;
       
  9614 
       
  9615 /****
       
  9616  *LWORD_TO_DT
       
  9617  */
       
  9618     case function_lword_to_dt :
       
  9619     {
       
  9620         symbol_c *last_type_symbol = NULL;
       
  9621 
       
  9622         {
       
  9623             identifier_c param_name("IN");
       
  9624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9626             
       
  9627             /* Get the value from a foo(<param_value>) style call */
       
  9628             if (IN_param_value == NULL)
       
  9629               IN_param_value = function_call_param_iterator.next();
       
  9630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9632             
       
  9633             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9634             {
       
  9635         
       
  9636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9637                 return return_type_symbol;
       
  9638                 
       
  9639             }
       
  9640             
       
  9641             ERROR;
       
  9642         }
       
  9643         
       
  9644     }/*function_lword_to_dt*/
       
  9645     break;
       
  9646 
       
  9647 /****
       
  9648  *STRING_TO_REAL
       
  9649  */
       
  9650     case function_string_to_real :
       
  9651     {
       
  9652         symbol_c *last_type_symbol = NULL;
       
  9653 
       
  9654         {
       
  9655             identifier_c param_name("IN");
       
  9656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9658             
       
  9659             /* Get the value from a foo(<param_value>) style call */
       
  9660             if (IN_param_value == NULL)
       
  9661               IN_param_value = function_call_param_iterator.next();
       
  9662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9664             
       
  9665             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9666             {
       
  9667         
       
  9668                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9669                 return return_type_symbol;
       
  9670                 
       
  9671             }
       
  9672             
       
  9673             ERROR;
       
  9674         }
       
  9675         
       
  9676     }/*function_string_to_real*/
       
  9677     break;
       
  9678 
       
  9679 /****
       
  9680  *STRING_TO_LREAL
       
  9681  */
       
  9682     case function_string_to_lreal :
       
  9683     {
       
  9684         symbol_c *last_type_symbol = NULL;
       
  9685 
       
  9686         {
       
  9687             identifier_c param_name("IN");
       
  9688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9690             
       
  9691             /* Get the value from a foo(<param_value>) style call */
       
  9692             if (IN_param_value == NULL)
       
  9693               IN_param_value = function_call_param_iterator.next();
       
  9694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9696             
       
  9697             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9698             {
       
  9699         
       
  9700                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9701                 return return_type_symbol;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             ERROR;
       
  9706         }
       
  9707         
       
  9708     }/*function_string_to_lreal*/
       
  9709     break;
       
  9710 
       
  9711 /****
       
  9712  *STRING_TO_SINT
       
  9713  */
       
  9714     case function_string_to_sint :
       
  9715     {
       
  9716         symbol_c *last_type_symbol = NULL;
       
  9717 
       
  9718         {
       
  9719             identifier_c param_name("IN");
       
  9720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9722             
       
  9723             /* Get the value from a foo(<param_value>) style call */
       
  9724             if (IN_param_value == NULL)
       
  9725               IN_param_value = function_call_param_iterator.next();
       
  9726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9728             
       
  9729             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9730             {
       
  9731         
       
  9732                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9733                 return return_type_symbol;
       
  9734                 
       
  9735             }
       
  9736             
       
  9737             ERROR;
       
  9738         }
       
  9739         
       
  9740     }/*function_string_to_sint*/
       
  9741     break;
       
  9742 
       
  9743 /****
       
  9744  *STRING_TO_INT
       
  9745  */
       
  9746     case function_string_to_int :
       
  9747     {
       
  9748         symbol_c *last_type_symbol = NULL;
       
  9749 
       
  9750         {
       
  9751             identifier_c param_name("IN");
       
  9752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9754             
       
  9755             /* Get the value from a foo(<param_value>) style call */
       
  9756             if (IN_param_value == NULL)
       
  9757               IN_param_value = function_call_param_iterator.next();
       
  9758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9760             
       
  9761             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9762             {
       
  9763         
       
  9764                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9765                 return return_type_symbol;
       
  9766                 
       
  9767             }
       
  9768             
       
  9769             ERROR;
       
  9770         }
       
  9771         
       
  9772     }/*function_string_to_int*/
       
  9773     break;
       
  9774 
       
  9775 /****
       
  9776  *STRING_TO_DINT
       
  9777  */
       
  9778     case function_string_to_dint :
       
  9779     {
       
  9780         symbol_c *last_type_symbol = NULL;
       
  9781 
       
  9782         {
       
  9783             identifier_c param_name("IN");
       
  9784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9786             
       
  9787             /* Get the value from a foo(<param_value>) style call */
       
  9788             if (IN_param_value == NULL)
       
  9789               IN_param_value = function_call_param_iterator.next();
       
  9790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9792             
       
  9793             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9794             {
       
  9795         
       
  9796                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9797                 return return_type_symbol;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_string_to_dint*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *STRING_TO_LINT
       
  9809  */
       
  9810     case function_string_to_lint :
       
  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(string_type_name_c))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9829                 return return_type_symbol;
       
  9830                 
       
  9831             }
       
  9832             
       
  9833             ERROR;
       
  9834         }
       
  9835         
       
  9836     }/*function_string_to_lint*/
       
  9837     break;
       
  9838 
       
  9839 /****
       
  9840  *STRING_TO_USINT
       
  9841  */
       
  9842     case function_string_to_usint :
       
  9843     {
       
  9844         symbol_c *last_type_symbol = NULL;
       
  9845 
       
  9846         {
       
  9847             identifier_c param_name("IN");
       
  9848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9850             
       
  9851             /* Get the value from a foo(<param_value>) style call */
       
  9852             if (IN_param_value == NULL)
       
  9853               IN_param_value = function_call_param_iterator.next();
       
  9854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9856             
       
  9857             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9858             {
       
  9859         
       
  9860                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9861                 return return_type_symbol;
       
  9862                 
       
  9863             }
       
  9864             
       
  9865             ERROR;
       
  9866         }
       
  9867         
       
  9868     }/*function_string_to_usint*/
       
  9869     break;
       
  9870 
       
  9871 /****
       
  9872  *STRING_TO_UINT
       
  9873  */
       
  9874     case function_string_to_uint :
       
  9875     {
       
  9876         symbol_c *last_type_symbol = NULL;
       
  9877 
       
  9878         {
       
  9879             identifier_c param_name("IN");
       
  9880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9882             
       
  9883             /* Get the value from a foo(<param_value>) style call */
       
  9884             if (IN_param_value == NULL)
       
  9885               IN_param_value = function_call_param_iterator.next();
       
  9886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9888             
       
  9889             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9890             {
       
  9891         
       
  9892                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9893                 return return_type_symbol;
       
  9894                 
       
  9895             }
       
  9896             
       
  9897             ERROR;
       
  9898         }
       
  9899         
       
  9900     }/*function_string_to_uint*/
       
  9901     break;
       
  9902 
       
  9903 /****
       
  9904  *STRING_TO_UDINT
       
  9905  */
       
  9906     case function_string_to_udint :
       
  9907     {
       
  9908         symbol_c *last_type_symbol = NULL;
       
  9909 
       
  9910         {
       
  9911             identifier_c param_name("IN");
       
  9912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9914             
       
  9915             /* Get the value from a foo(<param_value>) style call */
       
  9916             if (IN_param_value == NULL)
       
  9917               IN_param_value = function_call_param_iterator.next();
       
  9918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9920             
       
  9921             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9922             {
       
  9923         
       
  9924                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9925                 return return_type_symbol;
       
  9926                 
       
  9927             }
       
  9928             
       
  9929             ERROR;
       
  9930         }
       
  9931         
       
  9932     }/*function_string_to_udint*/
       
  9933     break;
       
  9934 
       
  9935 /****
       
  9936  *STRING_TO_ULINT
       
  9937  */
       
  9938     case function_string_to_ulint :
       
  9939     {
       
  9940         symbol_c *last_type_symbol = NULL;
       
  9941 
       
  9942         {
       
  9943             identifier_c param_name("IN");
       
  9944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9946             
       
  9947             /* Get the value from a foo(<param_value>) style call */
       
  9948             if (IN_param_value == NULL)
       
  9949               IN_param_value = function_call_param_iterator.next();
       
  9950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9952             
       
  9953             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9954             {
       
  9955         
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9957                 return return_type_symbol;
       
  9958                 
       
  9959             }
       
  9960             
       
  9961             ERROR;
       
  9962         }
       
  9963         
       
  9964     }/*function_string_to_ulint*/
       
  9965     break;
       
  9966 
       
  9967 /****
       
  9968  *STRING_TO_TIME
       
  9969  */
       
  9970     case function_string_to_time :
       
  9971     {
       
  9972         symbol_c *last_type_symbol = NULL;
       
  9973 
       
  9974         {
       
  9975             identifier_c param_name("IN");
       
  9976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9978             
       
  9979             /* Get the value from a foo(<param_value>) style call */
       
  9980             if (IN_param_value == NULL)
       
  9981               IN_param_value = function_call_param_iterator.next();
       
  9982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9984             
       
  9985             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9986             {
       
  9987         
       
  9988                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9989                 return return_type_symbol;
       
  9990                 
       
  9991             }
       
  9992             
       
  9993             ERROR;
       
  9994         }
       
  9995         
       
  9996     }/*function_string_to_time*/
       
  9997     break;
       
  9998 
       
  9999 /****
       
 10000  *STRING_TO_BOOL
       
 10001  */
       
 10002     case function_string_to_bool :
       
 10003     {
       
 10004         symbol_c *last_type_symbol = NULL;
       
 10005 
       
 10006         {
       
 10007             identifier_c param_name("IN");
       
 10008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10010             
       
 10011             /* Get the value from a foo(<param_value>) style call */
       
 10012             if (IN_param_value == NULL)
       
 10013               IN_param_value = function_call_param_iterator.next();
       
 10014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10016             
       
 10017             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10018             {
       
 10019         
       
 10020                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10021                 return return_type_symbol;
       
 10022                 
       
 10023             }
       
 10024             
       
 10025             ERROR;
       
 10026         }
       
 10027         
       
 10028     }/*function_string_to_bool*/
       
 10029     break;
       
 10030 
       
 10031 /****
       
 10032  *STRING_TO_BYTE
       
 10033  */
       
 10034     case function_string_to_byte :
       
 10035     {
       
 10036         symbol_c *last_type_symbol = NULL;
       
 10037 
       
 10038         {
       
 10039             identifier_c param_name("IN");
       
 10040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10042             
       
 10043             /* Get the value from a foo(<param_value>) style call */
       
 10044             if (IN_param_value == NULL)
       
 10045               IN_param_value = function_call_param_iterator.next();
       
 10046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10048             
       
 10049             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10050             {
       
 10051         
       
 10052                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10053                 return return_type_symbol;
       
 10054                 
       
 10055             }
       
 10056             
       
 10057             ERROR;
       
 10058         }
       
 10059         
       
 10060     }/*function_string_to_byte*/
       
 10061     break;
       
 10062 
       
 10063 /****
       
 10064  *STRING_TO_WORD
       
 10065  */
       
 10066     case function_string_to_word :
       
 10067     {
       
 10068         symbol_c *last_type_symbol = NULL;
       
 10069 
       
 10070         {
       
 10071             identifier_c param_name("IN");
       
 10072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10074             
       
 10075             /* Get the value from a foo(<param_value>) style call */
       
 10076             if (IN_param_value == NULL)
       
 10077               IN_param_value = function_call_param_iterator.next();
       
 10078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10080             
       
 10081             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10082             {
       
 10083         
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10085                 return return_type_symbol;
       
 10086                 
       
 10087             }
       
 10088             
       
 10089             ERROR;
       
 10090         }
       
 10091         
       
 10092     }/*function_string_to_word*/
       
 10093     break;
       
 10094 
       
 10095 /****
       
 10096  *STRING_TO_DWORD
       
 10097  */
       
 10098     case function_string_to_dword :
       
 10099     {
       
 10100         symbol_c *last_type_symbol = NULL;
       
 10101 
       
 10102         {
       
 10103             identifier_c param_name("IN");
       
 10104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10106             
       
 10107             /* Get the value from a foo(<param_value>) style call */
       
 10108             if (IN_param_value == NULL)
       
 10109               IN_param_value = function_call_param_iterator.next();
       
 10110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10112             
       
 10113             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10114             {
       
 10115         
       
 10116                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10117                 return return_type_symbol;
       
 10118                 
       
 10119             }
       
 10120             
       
 10121             ERROR;
       
 10122         }
       
 10123         
       
 10124     }/*function_string_to_dword*/
       
 10125     break;
       
 10126 
       
 10127 /****
       
 10128  *STRING_TO_LWORD
       
 10129  */
       
 10130     case function_string_to_lword :
       
 10131     {
       
 10132         symbol_c *last_type_symbol = NULL;
       
 10133 
       
 10134         {
       
 10135             identifier_c param_name("IN");
       
 10136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10138             
       
 10139             /* Get the value from a foo(<param_value>) style call */
       
 10140             if (IN_param_value == NULL)
       
 10141               IN_param_value = function_call_param_iterator.next();
       
 10142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10144             
       
 10145             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
  1122             {
 10146             {
  1123         
 10147         
  1124                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 10148                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1125                 return return_type_symbol;
 10149                 return return_type_symbol;
  1126                 
 10150                 
  1127             }
 10151             }
  1128             
 10152             
  1129             ERROR;
 10153             ERROR;
  1130         }
 10154         }
  1131         
 10155         
  1132     }/*function_lreal_to_lword*/
 10156     }/*function_string_to_lword*/
  1133     break;
 10157     break;
  1134 
 10158 
  1135 /****
 10159 /****
  1136  *LREAL_TO_STRING
 10160  *STRING_TO_DATE
  1137  */
 10161  */
  1138     case function_lreal_to_string :
 10162     case function_string_to_date :
  1139     {
 10163     {
  1140         symbol_c *last_type_symbol = NULL;
 10164         symbol_c *last_type_symbol = NULL;
  1141 
 10165 
  1142         {
 10166         {
  1143             identifier_c param_name("IN");
 10167             identifier_c param_name("IN");
  1144             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10168             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1146             
 10170             
  1147             /* Get the value from a foo(<param_value>) style call */
 10171             /* Get the value from a foo(<param_value>) style call */
  1148             if (IN_param_value == NULL)
 10172             if (IN_param_value == NULL)
  1149               IN_param_value = function_call_param_iterator.next();
 10173               IN_param_value = function_call_param_iterator.next();
  1150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1152             
 10176             
  1153             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 10177             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10178             {
       
 10179         
       
 10180                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10181                 return return_type_symbol;
       
 10182                 
       
 10183             }
       
 10184             
       
 10185             ERROR;
       
 10186         }
       
 10187         
       
 10188     }/*function_string_to_date*/
       
 10189     break;
       
 10190 
       
 10191 /****
       
 10192  *STRING_TO_TOD
       
 10193  */
       
 10194     case function_string_to_tod :
       
 10195     {
       
 10196         symbol_c *last_type_symbol = NULL;
       
 10197 
       
 10198         {
       
 10199             identifier_c param_name("IN");
       
 10200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10202             
       
 10203             /* Get the value from a foo(<param_value>) style call */
       
 10204             if (IN_param_value == NULL)
       
 10205               IN_param_value = function_call_param_iterator.next();
       
 10206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10208             
       
 10209             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10210             {
       
 10211         
       
 10212                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10213                 return return_type_symbol;
       
 10214                 
       
 10215             }
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_string_to_tod*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *STRING_TO_DT
       
 10225  */
       
 10226     case function_string_to_dt :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = NULL;
       
 10229 
       
 10230         {
       
 10231             identifier_c param_name("IN");
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10234             
       
 10235             /* Get the value from a foo(<param_value>) style call */
       
 10236             if (IN_param_value == NULL)
       
 10237               IN_param_value = function_call_param_iterator.next();
       
 10238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10240             
       
 10241             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10242             {
       
 10243         
       
 10244                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10245                 return return_type_symbol;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_string_to_dt*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *DATE_TO_REAL
       
 10257  */
       
 10258     case function_date_to_real :
       
 10259     {
       
 10260         symbol_c *last_type_symbol = NULL;
       
 10261 
       
 10262         {
       
 10263             identifier_c param_name("IN");
       
 10264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10266             
       
 10267             /* Get the value from a foo(<param_value>) style call */
       
 10268             if (IN_param_value == NULL)
       
 10269               IN_param_value = function_call_param_iterator.next();
       
 10270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10272             
       
 10273             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10277                 return return_type_symbol;
       
 10278                 
       
 10279             }
       
 10280             
       
 10281             ERROR;
       
 10282         }
       
 10283         
       
 10284     }/*function_date_to_real*/
       
 10285     break;
       
 10286 
       
 10287 /****
       
 10288  *DATE_TO_LREAL
       
 10289  */
       
 10290     case function_date_to_lreal :
       
 10291     {
       
 10292         symbol_c *last_type_symbol = NULL;
       
 10293 
       
 10294         {
       
 10295             identifier_c param_name("IN");
       
 10296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10298             
       
 10299             /* Get the value from a foo(<param_value>) style call */
       
 10300             if (IN_param_value == NULL)
       
 10301               IN_param_value = function_call_param_iterator.next();
       
 10302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10304             
       
 10305             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10306             {
       
 10307         
       
 10308                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10309                 return return_type_symbol;
       
 10310                 
       
 10311             }
       
 10312             
       
 10313             ERROR;
       
 10314         }
       
 10315         
       
 10316     }/*function_date_to_lreal*/
       
 10317     break;
       
 10318 
       
 10319 /****
       
 10320  *DATE_TO_SINT
       
 10321  */
       
 10322     case function_date_to_sint :
       
 10323     {
       
 10324         symbol_c *last_type_symbol = NULL;
       
 10325 
       
 10326         {
       
 10327             identifier_c param_name("IN");
       
 10328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10330             
       
 10331             /* Get the value from a foo(<param_value>) style call */
       
 10332             if (IN_param_value == NULL)
       
 10333               IN_param_value = function_call_param_iterator.next();
       
 10334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10336             
       
 10337             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10338             {
       
 10339         
       
 10340                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10341                 return return_type_symbol;
       
 10342                 
       
 10343             }
       
 10344             
       
 10345             ERROR;
       
 10346         }
       
 10347         
       
 10348     }/*function_date_to_sint*/
       
 10349     break;
       
 10350 
       
 10351 /****
       
 10352  *DATE_TO_INT
       
 10353  */
       
 10354     case function_date_to_int :
       
 10355     {
       
 10356         symbol_c *last_type_symbol = NULL;
       
 10357 
       
 10358         {
       
 10359             identifier_c param_name("IN");
       
 10360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10362             
       
 10363             /* Get the value from a foo(<param_value>) style call */
       
 10364             if (IN_param_value == NULL)
       
 10365               IN_param_value = function_call_param_iterator.next();
       
 10366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             
       
 10369             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10370             {
       
 10371         
       
 10372                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10373                 return return_type_symbol;
       
 10374                 
       
 10375             }
       
 10376             
       
 10377             ERROR;
       
 10378         }
       
 10379         
       
 10380     }/*function_date_to_int*/
       
 10381     break;
       
 10382 
       
 10383 /****
       
 10384  *DATE_TO_DINT
       
 10385  */
       
 10386     case function_date_to_dint :
       
 10387     {
       
 10388         symbol_c *last_type_symbol = NULL;
       
 10389 
       
 10390         {
       
 10391             identifier_c param_name("IN");
       
 10392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10394             
       
 10395             /* Get the value from a foo(<param_value>) style call */
       
 10396             if (IN_param_value == NULL)
       
 10397               IN_param_value = function_call_param_iterator.next();
       
 10398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10400             
       
 10401             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10402             {
       
 10403         
       
 10404                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10405                 return return_type_symbol;
       
 10406                 
       
 10407             }
       
 10408             
       
 10409             ERROR;
       
 10410         }
       
 10411         
       
 10412     }/*function_date_to_dint*/
       
 10413     break;
       
 10414 
       
 10415 /****
       
 10416  *DATE_TO_LINT
       
 10417  */
       
 10418     case function_date_to_lint :
       
 10419     {
       
 10420         symbol_c *last_type_symbol = NULL;
       
 10421 
       
 10422         {
       
 10423             identifier_c param_name("IN");
       
 10424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10426             
       
 10427             /* Get the value from a foo(<param_value>) style call */
       
 10428             if (IN_param_value == NULL)
       
 10429               IN_param_value = function_call_param_iterator.next();
       
 10430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10432             
       
 10433             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10434             {
       
 10435         
       
 10436                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10437                 return return_type_symbol;
       
 10438                 
       
 10439             }
       
 10440             
       
 10441             ERROR;
       
 10442         }
       
 10443         
       
 10444     }/*function_date_to_lint*/
       
 10445     break;
       
 10446 
       
 10447 /****
       
 10448  *DATE_TO_USINT
       
 10449  */
       
 10450     case function_date_to_usint :
       
 10451     {
       
 10452         symbol_c *last_type_symbol = NULL;
       
 10453 
       
 10454         {
       
 10455             identifier_c param_name("IN");
       
 10456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10458             
       
 10459             /* Get the value from a foo(<param_value>) style call */
       
 10460             if (IN_param_value == NULL)
       
 10461               IN_param_value = function_call_param_iterator.next();
       
 10462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10464             
       
 10465             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10466             {
       
 10467         
       
 10468                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10469                 return return_type_symbol;
       
 10470                 
       
 10471             }
       
 10472             
       
 10473             ERROR;
       
 10474         }
       
 10475         
       
 10476     }/*function_date_to_usint*/
       
 10477     break;
       
 10478 
       
 10479 /****
       
 10480  *DATE_TO_UINT
       
 10481  */
       
 10482     case function_date_to_uint :
       
 10483     {
       
 10484         symbol_c *last_type_symbol = NULL;
       
 10485 
       
 10486         {
       
 10487             identifier_c param_name("IN");
       
 10488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10490             
       
 10491             /* Get the value from a foo(<param_value>) style call */
       
 10492             if (IN_param_value == NULL)
       
 10493               IN_param_value = function_call_param_iterator.next();
       
 10494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10496             
       
 10497             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10498             {
       
 10499         
       
 10500                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10501                 return return_type_symbol;
       
 10502                 
       
 10503             }
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_date_to_uint*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *DATE_TO_UDINT
       
 10513  */
       
 10514     case function_date_to_udint :
       
 10515     {
       
 10516         symbol_c *last_type_symbol = NULL;
       
 10517 
       
 10518         {
       
 10519             identifier_c param_name("IN");
       
 10520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10522             
       
 10523             /* Get the value from a foo(<param_value>) style call */
       
 10524             if (IN_param_value == NULL)
       
 10525               IN_param_value = function_call_param_iterator.next();
       
 10526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10528             
       
 10529             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             ERROR;
       
 10538         }
       
 10539         
       
 10540     }/*function_date_to_udint*/
       
 10541     break;
       
 10542 
       
 10543 /****
       
 10544  *DATE_TO_ULINT
       
 10545  */
       
 10546     case function_date_to_ulint :
       
 10547     {
       
 10548         symbol_c *last_type_symbol = NULL;
       
 10549 
       
 10550         {
       
 10551             identifier_c param_name("IN");
       
 10552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10554             
       
 10555             /* Get the value from a foo(<param_value>) style call */
       
 10556             if (IN_param_value == NULL)
       
 10557               IN_param_value = function_call_param_iterator.next();
       
 10558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10560             
       
 10561             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10562             {
       
 10563         
       
 10564                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10565                 return return_type_symbol;
       
 10566                 
       
 10567             }
       
 10568             
       
 10569             ERROR;
       
 10570         }
       
 10571         
       
 10572     }/*function_date_to_ulint*/
       
 10573     break;
       
 10574 
       
 10575 /****
       
 10576  *DATE_TO_BOOL
       
 10577  */
       
 10578     case function_date_to_bool :
       
 10579     {
       
 10580         symbol_c *last_type_symbol = NULL;
       
 10581 
       
 10582         {
       
 10583             identifier_c param_name("IN");
       
 10584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10586             
       
 10587             /* Get the value from a foo(<param_value>) style call */
       
 10588             if (IN_param_value == NULL)
       
 10589               IN_param_value = function_call_param_iterator.next();
       
 10590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10592             
       
 10593             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10594             {
       
 10595         
       
 10596                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10597                 return return_type_symbol;
       
 10598                 
       
 10599             }
       
 10600             
       
 10601             ERROR;
       
 10602         }
       
 10603         
       
 10604     }/*function_date_to_bool*/
       
 10605     break;
       
 10606 
       
 10607 /****
       
 10608  *DATE_TO_BYTE
       
 10609  */
       
 10610     case function_date_to_byte :
       
 10611     {
       
 10612         symbol_c *last_type_symbol = NULL;
       
 10613 
       
 10614         {
       
 10615             identifier_c param_name("IN");
       
 10616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10618             
       
 10619             /* Get the value from a foo(<param_value>) style call */
       
 10620             if (IN_param_value == NULL)
       
 10621               IN_param_value = function_call_param_iterator.next();
       
 10622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10624             
       
 10625             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10626             {
       
 10627         
       
 10628                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10629                 return return_type_symbol;
       
 10630                 
       
 10631             }
       
 10632             
       
 10633             ERROR;
       
 10634         }
       
 10635         
       
 10636     }/*function_date_to_byte*/
       
 10637     break;
       
 10638 
       
 10639 /****
       
 10640  *DATE_TO_WORD
       
 10641  */
       
 10642     case function_date_to_word :
       
 10643     {
       
 10644         symbol_c *last_type_symbol = NULL;
       
 10645 
       
 10646         {
       
 10647             identifier_c param_name("IN");
       
 10648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10650             
       
 10651             /* Get the value from a foo(<param_value>) style call */
       
 10652             if (IN_param_value == NULL)
       
 10653               IN_param_value = function_call_param_iterator.next();
       
 10654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10656             
       
 10657             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10658             {
       
 10659         
       
 10660                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10661                 return return_type_symbol;
       
 10662                 
       
 10663             }
       
 10664             
       
 10665             ERROR;
       
 10666         }
       
 10667         
       
 10668     }/*function_date_to_word*/
       
 10669     break;
       
 10670 
       
 10671 /****
       
 10672  *DATE_TO_DWORD
       
 10673  */
       
 10674     case function_date_to_dword :
       
 10675     {
       
 10676         symbol_c *last_type_symbol = NULL;
       
 10677 
       
 10678         {
       
 10679             identifier_c param_name("IN");
       
 10680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10682             
       
 10683             /* Get the value from a foo(<param_value>) style call */
       
 10684             if (IN_param_value == NULL)
       
 10685               IN_param_value = function_call_param_iterator.next();
       
 10686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10688             
       
 10689             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10690             {
       
 10691         
       
 10692                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10693                 return return_type_symbol;
       
 10694                 
       
 10695             }
       
 10696             
       
 10697             ERROR;
       
 10698         }
       
 10699         
       
 10700     }/*function_date_to_dword*/
       
 10701     break;
       
 10702 
       
 10703 /****
       
 10704  *DATE_TO_LWORD
       
 10705  */
       
 10706     case function_date_to_lword :
       
 10707     {
       
 10708         symbol_c *last_type_symbol = NULL;
       
 10709 
       
 10710         {
       
 10711             identifier_c param_name("IN");
       
 10712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10714             
       
 10715             /* Get the value from a foo(<param_value>) style call */
       
 10716             if (IN_param_value == NULL)
       
 10717               IN_param_value = function_call_param_iterator.next();
       
 10718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10720             
       
 10721             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 10722             {
       
 10723         
       
 10724                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10725                 return return_type_symbol;
       
 10726                 
       
 10727             }
       
 10728             
       
 10729             ERROR;
       
 10730         }
       
 10731         
       
 10732     }/*function_date_to_lword*/
       
 10733     break;
       
 10734 
       
 10735 /****
       
 10736  *DATE_TO_STRING
       
 10737  */
       
 10738     case function_date_to_string :
       
 10739     {
       
 10740         symbol_c *last_type_symbol = NULL;
       
 10741 
       
 10742         {
       
 10743             identifier_c param_name("IN");
       
 10744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10746             
       
 10747             /* Get the value from a foo(<param_value>) style call */
       
 10748             if (IN_param_value == NULL)
       
 10749               IN_param_value = function_call_param_iterator.next();
       
 10750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10752             
       
 10753             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
  1154             {
 10754             {
  1155         
 10755         
  1156                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1157                 return return_type_symbol;
 10757                 return return_type_symbol;
  1158                 
 10758                 
  1159             }
 10759             }
  1160             
 10760             
  1161             ERROR;
 10761             ERROR;
  1162         }
 10762         }
  1163         
 10763         
  1164     }/*function_lreal_to_string*/
 10764     }/*function_date_to_string*/
  1165     break;
 10765     break;
  1166 
 10766 
  1167 /****
 10767 /****
  1168  *LREAL_TO_WSTRING
 10768  *TOD_TO_REAL
  1169  */
 10769  */
  1170     case function_lreal_to_wstring :
 10770     case function_tod_to_real :
  1171     {
 10771     {
  1172         symbol_c *last_type_symbol = NULL;
 10772         symbol_c *last_type_symbol = NULL;
  1173 
 10773 
  1174         {
 10774         {
  1175             identifier_c param_name("IN");
 10775             identifier_c param_name("IN");
  1176             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10776             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1178             
 10778             
  1179             /* Get the value from a foo(<param_value>) style call */
 10779             /* Get the value from a foo(<param_value>) style call */
  1180             if (IN_param_value == NULL)
 10780             if (IN_param_value == NULL)
  1181               IN_param_value = function_call_param_iterator.next();
 10781               IN_param_value = function_call_param_iterator.next();
  1182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1184             
 10784             
  1185             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 10785             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1186             {
       
  1187         
       
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1189                 return return_type_symbol;
       
  1190                 
       
  1191             }
       
  1192             
       
  1193             ERROR;
       
  1194         }
       
  1195         
       
  1196     }/*function_lreal_to_wstring*/
       
  1197     break;
       
  1198 
       
  1199 /****
       
  1200  *LREAL_TO_DATE
       
  1201  */
       
  1202     case function_lreal_to_date :
       
  1203     {
       
  1204         symbol_c *last_type_symbol = NULL;
       
  1205 
       
  1206         {
       
  1207             identifier_c param_name("IN");
       
  1208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1210             
       
  1211             /* Get the value from a foo(<param_value>) style call */
       
  1212             if (IN_param_value == NULL)
       
  1213               IN_param_value = function_call_param_iterator.next();
       
  1214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1216             
       
  1217             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1218             {
       
  1219         
       
  1220                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1221                 return return_type_symbol;
       
  1222                 
       
  1223             }
       
  1224             
       
  1225             ERROR;
       
  1226         }
       
  1227         
       
  1228     }/*function_lreal_to_date*/
       
  1229     break;
       
  1230 
       
  1231 /****
       
  1232  *LREAL_TO_TOD
       
  1233  */
       
  1234     case function_lreal_to_tod :
       
  1235     {
       
  1236         symbol_c *last_type_symbol = NULL;
       
  1237 
       
  1238         {
       
  1239             identifier_c param_name("IN");
       
  1240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1242             
       
  1243             /* Get the value from a foo(<param_value>) style call */
       
  1244             if (IN_param_value == NULL)
       
  1245               IN_param_value = function_call_param_iterator.next();
       
  1246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1248             
       
  1249             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1250             {
       
  1251         
       
  1252                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1253                 return return_type_symbol;
       
  1254                 
       
  1255             }
       
  1256             
       
  1257             ERROR;
       
  1258         }
       
  1259         
       
  1260     }/*function_lreal_to_tod*/
       
  1261     break;
       
  1262 
       
  1263 /****
       
  1264  *LREAL_TO_DT
       
  1265  */
       
  1266     case function_lreal_to_dt :
       
  1267     {
       
  1268         symbol_c *last_type_symbol = NULL;
       
  1269 
       
  1270         {
       
  1271             identifier_c param_name("IN");
       
  1272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1274             
       
  1275             /* Get the value from a foo(<param_value>) style call */
       
  1276             if (IN_param_value == NULL)
       
  1277               IN_param_value = function_call_param_iterator.next();
       
  1278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1280             
       
  1281             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
  1282             {
       
  1283         
       
  1284                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1285                 return return_type_symbol;
       
  1286                 
       
  1287             }
       
  1288             
       
  1289             ERROR;
       
  1290         }
       
  1291         
       
  1292     }/*function_lreal_to_dt*/
       
  1293     break;
       
  1294 
       
  1295 /****
       
  1296  *SINT_TO_REAL
       
  1297  */
       
  1298     case function_sint_to_real :
       
  1299     {
       
  1300         symbol_c *last_type_symbol = NULL;
       
  1301 
       
  1302         {
       
  1303             identifier_c param_name("IN");
       
  1304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1306             
       
  1307             /* Get the value from a foo(<param_value>) style call */
       
  1308             if (IN_param_value == NULL)
       
  1309               IN_param_value = function_call_param_iterator.next();
       
  1310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1312             
       
  1313             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1314             {
 10786             {
  1315         
 10787         
  1316                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 10788                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1317                 return return_type_symbol;
 10789                 return return_type_symbol;
  1318                 
 10790                 
  1319             }
 10791             }
  1320             
 10792             
  1321             ERROR;
 10793             ERROR;
  1322         }
 10794         }
  1323         
 10795         
  1324     }/*function_sint_to_real*/
 10796     }/*function_tod_to_real*/
  1325     break;
 10797     break;
  1326 
 10798 
  1327 /****
 10799 /****
  1328  *SINT_TO_LREAL
 10800  *TOD_TO_LREAL
  1329  */
 10801  */
  1330     case function_sint_to_lreal :
 10802     case function_tod_to_lreal :
  1331     {
 10803     {
  1332         symbol_c *last_type_symbol = NULL;
 10804         symbol_c *last_type_symbol = NULL;
  1333 
 10805 
  1334         {
 10806         {
  1335             identifier_c param_name("IN");
 10807             identifier_c param_name("IN");
  1336             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10808             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1338             
 10810             
  1339             /* Get the value from a foo(<param_value>) style call */
 10811             /* Get the value from a foo(<param_value>) style call */
  1340             if (IN_param_value == NULL)
 10812             if (IN_param_value == NULL)
  1341               IN_param_value = function_call_param_iterator.next();
 10813               IN_param_value = function_call_param_iterator.next();
  1342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1344             
 10816             
  1345             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 10817             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1346             {
 10818             {
  1347         
 10819         
  1348                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 10820                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1349                 return return_type_symbol;
 10821                 return return_type_symbol;
  1350                 
 10822                 
  1351             }
 10823             }
  1352             
 10824             
  1353             ERROR;
 10825             ERROR;
  1354         }
 10826         }
  1355         
 10827         
  1356     }/*function_sint_to_lreal*/
 10828     }/*function_tod_to_lreal*/
  1357     break;
 10829     break;
  1358 
 10830 
  1359 /****
 10831 /****
  1360  *SINT_TO_INT
 10832  *TOD_TO_SINT
  1361  */
 10833  */
  1362     case function_sint_to_int :
 10834     case function_tod_to_sint :
  1363     {
 10835     {
  1364         symbol_c *last_type_symbol = NULL;
 10836         symbol_c *last_type_symbol = NULL;
  1365 
 10837 
  1366         {
 10838         {
  1367             identifier_c param_name("IN");
 10839             identifier_c param_name("IN");
  1368             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10840             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1370             
 10842             
  1371             /* Get the value from a foo(<param_value>) style call */
 10843             /* Get the value from a foo(<param_value>) style call */
  1372             if (IN_param_value == NULL)
 10844             if (IN_param_value == NULL)
  1373               IN_param_value = function_call_param_iterator.next();
 10845               IN_param_value = function_call_param_iterator.next();
  1374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1376             
 10848             
  1377             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 10849             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 10850             {
       
 10851         
       
 10852                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10853                 return return_type_symbol;
       
 10854                 
       
 10855             }
       
 10856             
       
 10857             ERROR;
       
 10858         }
       
 10859         
       
 10860     }/*function_tod_to_sint*/
       
 10861     break;
       
 10862 
       
 10863 /****
       
 10864  *TOD_TO_INT
       
 10865  */
       
 10866     case function_tod_to_int :
       
 10867     {
       
 10868         symbol_c *last_type_symbol = NULL;
       
 10869 
       
 10870         {
       
 10871             identifier_c param_name("IN");
       
 10872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10874             
       
 10875             /* Get the value from a foo(<param_value>) style call */
       
 10876             if (IN_param_value == NULL)
       
 10877               IN_param_value = function_call_param_iterator.next();
       
 10878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10880             
       
 10881             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1378             {
 10882             {
  1379         
 10883         
  1380                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 10884                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1381                 return return_type_symbol;
 10885                 return return_type_symbol;
  1382                 
 10886                 
  1383             }
 10887             }
  1384             
 10888             
  1385             ERROR;
 10889             ERROR;
  1386         }
 10890         }
  1387         
 10891         
  1388     }/*function_sint_to_int*/
 10892     }/*function_tod_to_int*/
  1389     break;
 10893     break;
  1390 
 10894 
  1391 /****
 10895 /****
  1392  *SINT_TO_DINT
 10896  *TOD_TO_DINT
  1393  */
 10897  */
  1394     case function_sint_to_dint :
 10898     case function_tod_to_dint :
  1395     {
 10899     {
  1396         symbol_c *last_type_symbol = NULL;
 10900         symbol_c *last_type_symbol = NULL;
  1397 
 10901 
  1398         {
 10902         {
  1399             identifier_c param_name("IN");
 10903             identifier_c param_name("IN");
  1400             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10904             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1402             
 10906             
  1403             /* Get the value from a foo(<param_value>) style call */
 10907             /* Get the value from a foo(<param_value>) style call */
  1404             if (IN_param_value == NULL)
 10908             if (IN_param_value == NULL)
  1405               IN_param_value = function_call_param_iterator.next();
 10909               IN_param_value = function_call_param_iterator.next();
  1406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1408             
 10912             
  1409             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 10913             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1410             {
 10914             {
  1411         
 10915         
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 10916                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1413                 return return_type_symbol;
 10917                 return return_type_symbol;
  1414                 
 10918                 
  1415             }
 10919             }
  1416             
 10920             
  1417             ERROR;
 10921             ERROR;
  1418         }
 10922         }
  1419         
 10923         
  1420     }/*function_sint_to_dint*/
 10924     }/*function_tod_to_dint*/
  1421     break;
 10925     break;
  1422 
 10926 
  1423 /****
 10927 /****
  1424  *SINT_TO_LINT
 10928  *TOD_TO_LINT
  1425  */
 10929  */
  1426     case function_sint_to_lint :
 10930     case function_tod_to_lint :
  1427     {
 10931     {
  1428         symbol_c *last_type_symbol = NULL;
 10932         symbol_c *last_type_symbol = NULL;
  1429 
 10933 
  1430         {
 10934         {
  1431             identifier_c param_name("IN");
 10935             identifier_c param_name("IN");
  1432             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10936             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1434             
 10938             
  1435             /* Get the value from a foo(<param_value>) style call */
 10939             /* Get the value from a foo(<param_value>) style call */
  1436             if (IN_param_value == NULL)
 10940             if (IN_param_value == NULL)
  1437               IN_param_value = function_call_param_iterator.next();
 10941               IN_param_value = function_call_param_iterator.next();
  1438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1440             
 10944             
  1441             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 10945             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1442             {
 10946             {
  1443         
 10947         
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 10948                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1445                 return return_type_symbol;
 10949                 return return_type_symbol;
  1446                 
 10950                 
  1447             }
 10951             }
  1448             
 10952             
  1449             ERROR;
 10953             ERROR;
  1450         }
 10954         }
  1451         
 10955         
  1452     }/*function_sint_to_lint*/
 10956     }/*function_tod_to_lint*/
  1453     break;
 10957     break;
  1454 
 10958 
  1455 /****
 10959 /****
  1456  *SINT_TO_USINT
 10960  *TOD_TO_USINT
  1457  */
 10961  */
  1458     case function_sint_to_usint :
 10962     case function_tod_to_usint :
  1459     {
 10963     {
  1460         symbol_c *last_type_symbol = NULL;
 10964         symbol_c *last_type_symbol = NULL;
  1461 
 10965 
  1462         {
 10966         {
  1463             identifier_c param_name("IN");
 10967             identifier_c param_name("IN");
  1464             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10968             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1466             
 10970             
  1467             /* Get the value from a foo(<param_value>) style call */
 10971             /* Get the value from a foo(<param_value>) style call */
  1468             if (IN_param_value == NULL)
 10972             if (IN_param_value == NULL)
  1469               IN_param_value = function_call_param_iterator.next();
 10973               IN_param_value = function_call_param_iterator.next();
  1470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1472             
 10976             
  1473             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 10977             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1474             {
 10978             {
  1475         
 10979         
  1476                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 10980                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1477                 return return_type_symbol;
 10981                 return return_type_symbol;
  1478                 
 10982                 
  1479             }
 10983             }
  1480             
 10984             
  1481             ERROR;
 10985             ERROR;
  1482         }
 10986         }
  1483         
 10987         
  1484     }/*function_sint_to_usint*/
 10988     }/*function_tod_to_usint*/
  1485     break;
 10989     break;
  1486 
 10990 
  1487 /****
 10991 /****
  1488  *SINT_TO_UINT
 10992  *TOD_TO_UINT
  1489  */
 10993  */
  1490     case function_sint_to_uint :
 10994     case function_tod_to_uint :
  1491     {
 10995     {
  1492         symbol_c *last_type_symbol = NULL;
 10996         symbol_c *last_type_symbol = NULL;
  1493 
 10997 
  1494         {
 10998         {
  1495             identifier_c param_name("IN");
 10999             identifier_c param_name("IN");
  1496             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11000             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1498             
 11002             
  1499             /* Get the value from a foo(<param_value>) style call */
 11003             /* Get the value from a foo(<param_value>) style call */
  1500             if (IN_param_value == NULL)
 11004             if (IN_param_value == NULL)
  1501               IN_param_value = function_call_param_iterator.next();
 11005               IN_param_value = function_call_param_iterator.next();
  1502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1504             
 11008             
  1505             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11009             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1506             {
 11010             {
  1507         
 11011         
  1508                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1509                 return return_type_symbol;
 11013                 return return_type_symbol;
  1510                 
 11014                 
  1511             }
 11015             }
  1512             
 11016             
  1513             ERROR;
 11017             ERROR;
  1514         }
 11018         }
  1515         
 11019         
  1516     }/*function_sint_to_uint*/
 11020     }/*function_tod_to_uint*/
  1517     break;
 11021     break;
  1518 
 11022 
  1519 /****
 11023 /****
  1520  *SINT_TO_UDINT
 11024  *TOD_TO_UDINT
  1521  */
 11025  */
  1522     case function_sint_to_udint :
 11026     case function_tod_to_udint :
  1523     {
 11027     {
  1524         symbol_c *last_type_symbol = NULL;
 11028         symbol_c *last_type_symbol = NULL;
  1525 
 11029 
  1526         {
 11030         {
  1527             identifier_c param_name("IN");
 11031             identifier_c param_name("IN");
  1528             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11032             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1530             
 11034             
  1531             /* Get the value from a foo(<param_value>) style call */
 11035             /* Get the value from a foo(<param_value>) style call */
  1532             if (IN_param_value == NULL)
 11036             if (IN_param_value == NULL)
  1533               IN_param_value = function_call_param_iterator.next();
 11037               IN_param_value = function_call_param_iterator.next();
  1534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1536             
 11040             
  1537             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11041             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1538             {
 11042             {
  1539         
 11043         
  1540                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 11044                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1541                 return return_type_symbol;
 11045                 return return_type_symbol;
  1542                 
 11046                 
  1543             }
 11047             }
  1544             
 11048             
  1545             ERROR;
 11049             ERROR;
  1546         }
 11050         }
  1547         
 11051         
  1548     }/*function_sint_to_udint*/
 11052     }/*function_tod_to_udint*/
  1549     break;
 11053     break;
  1550 
 11054 
  1551 /****
 11055 /****
  1552  *SINT_TO_ULINT
 11056  *TOD_TO_ULINT
  1553  */
 11057  */
  1554     case function_sint_to_ulint :
 11058     case function_tod_to_ulint :
  1555     {
 11059     {
  1556         symbol_c *last_type_symbol = NULL;
 11060         symbol_c *last_type_symbol = NULL;
  1557 
 11061 
  1558         {
 11062         {
  1559             identifier_c param_name("IN");
 11063             identifier_c param_name("IN");
  1560             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11064             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1562             
 11066             
  1563             /* Get the value from a foo(<param_value>) style call */
 11067             /* Get the value from a foo(<param_value>) style call */
  1564             if (IN_param_value == NULL)
 11068             if (IN_param_value == NULL)
  1565               IN_param_value = function_call_param_iterator.next();
 11069               IN_param_value = function_call_param_iterator.next();
  1566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1568             
 11072             
  1569             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11073             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1570             {
 11074             {
  1571         
 11075         
  1572                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 11076                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1573                 return return_type_symbol;
 11077                 return return_type_symbol;
  1574                 
 11078                 
  1575             }
 11079             }
  1576             
 11080             
  1577             ERROR;
 11081             ERROR;
  1578         }
 11082         }
  1579         
 11083         
  1580     }/*function_sint_to_ulint*/
 11084     }/*function_tod_to_ulint*/
  1581     break;
 11085     break;
  1582 
 11086 
  1583 /****
 11087 /****
  1584  *SINT_TO_TIME
 11088  *TOD_TO_BOOL
  1585  */
 11089  */
  1586     case function_sint_to_time :
 11090     case function_tod_to_bool :
  1587     {
 11091     {
  1588         symbol_c *last_type_symbol = NULL;
 11092         symbol_c *last_type_symbol = NULL;
  1589 
 11093 
  1590         {
 11094         {
  1591             identifier_c param_name("IN");
 11095             identifier_c param_name("IN");
  1592             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11096             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1594             
 11098             
  1595             /* Get the value from a foo(<param_value>) style call */
 11099             /* Get the value from a foo(<param_value>) style call */
  1596             if (IN_param_value == NULL)
 11100             if (IN_param_value == NULL)
  1597               IN_param_value = function_call_param_iterator.next();
 11101               IN_param_value = function_call_param_iterator.next();
  1598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1600             
 11104             
  1601             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11105             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1602             {
       
  1603         
       
  1604                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1605                 return return_type_symbol;
       
  1606                 
       
  1607             }
       
  1608             
       
  1609             ERROR;
       
  1610         }
       
  1611         
       
  1612     }/*function_sint_to_time*/
       
  1613     break;
       
  1614 
       
  1615 /****
       
  1616  *SINT_TO_BOOL
       
  1617  */
       
  1618     case function_sint_to_bool :
       
  1619     {
       
  1620         symbol_c *last_type_symbol = NULL;
       
  1621 
       
  1622         {
       
  1623             identifier_c param_name("IN");
       
  1624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1626             
       
  1627             /* Get the value from a foo(<param_value>) style call */
       
  1628             if (IN_param_value == NULL)
       
  1629               IN_param_value = function_call_param_iterator.next();
       
  1630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1632             
       
  1633             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1634             {
 11106             {
  1635         
 11107         
  1636                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 11108                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1637                 return return_type_symbol;
 11109                 return return_type_symbol;
  1638                 
 11110                 
  1639             }
 11111             }
  1640             
 11112             
  1641             ERROR;
 11113             ERROR;
  1642         }
 11114         }
  1643         
 11115         
  1644     }/*function_sint_to_bool*/
 11116     }/*function_tod_to_bool*/
  1645     break;
 11117     break;
  1646 
 11118 
  1647 /****
 11119 /****
  1648  *SINT_TO_BYTE
 11120  *TOD_TO_BYTE
  1649  */
 11121  */
  1650     case function_sint_to_byte :
 11122     case function_tod_to_byte :
  1651     {
 11123     {
  1652         symbol_c *last_type_symbol = NULL;
 11124         symbol_c *last_type_symbol = NULL;
  1653 
 11125 
  1654         {
 11126         {
  1655             identifier_c param_name("IN");
 11127             identifier_c param_name("IN");
  1656             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11128             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1658             
 11130             
  1659             /* Get the value from a foo(<param_value>) style call */
 11131             /* Get the value from a foo(<param_value>) style call */
  1660             if (IN_param_value == NULL)
 11132             if (IN_param_value == NULL)
  1661               IN_param_value = function_call_param_iterator.next();
 11133               IN_param_value = function_call_param_iterator.next();
  1662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1664             
 11136             
  1665             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11137             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1666             {
 11138             {
  1667         
 11139         
  1668                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 11140                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1669                 return return_type_symbol;
 11141                 return return_type_symbol;
  1670                 
 11142                 
  1671             }
 11143             }
  1672             
 11144             
  1673             ERROR;
 11145             ERROR;
  1674         }
 11146         }
  1675         
 11147         
  1676     }/*function_sint_to_byte*/
 11148     }/*function_tod_to_byte*/
  1677     break;
 11149     break;
  1678 
 11150 
  1679 /****
 11151 /****
  1680  *SINT_TO_WORD
 11152  *TOD_TO_WORD
  1681  */
 11153  */
  1682     case function_sint_to_word :
 11154     case function_tod_to_word :
  1683     {
 11155     {
  1684         symbol_c *last_type_symbol = NULL;
 11156         symbol_c *last_type_symbol = NULL;
  1685 
 11157 
  1686         {
 11158         {
  1687             identifier_c param_name("IN");
 11159             identifier_c param_name("IN");
  1688             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11160             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1690             
 11162             
  1691             /* Get the value from a foo(<param_value>) style call */
 11163             /* Get the value from a foo(<param_value>) style call */
  1692             if (IN_param_value == NULL)
 11164             if (IN_param_value == NULL)
  1693               IN_param_value = function_call_param_iterator.next();
 11165               IN_param_value = function_call_param_iterator.next();
  1694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1696             
 11168             
  1697             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11169             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1698             {
 11170             {
  1699         
 11171         
  1700                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 11172                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1701                 return return_type_symbol;
 11173                 return return_type_symbol;
  1702                 
 11174                 
  1703             }
 11175             }
  1704             
 11176             
  1705             ERROR;
 11177             ERROR;
  1706         }
 11178         }
  1707         
 11179         
  1708     }/*function_sint_to_word*/
 11180     }/*function_tod_to_word*/
  1709     break;
 11181     break;
  1710 
 11182 
  1711 /****
 11183 /****
  1712  *SINT_TO_DWORD
 11184  *TOD_TO_DWORD
  1713  */
 11185  */
  1714     case function_sint_to_dword :
 11186     case function_tod_to_dword :
  1715     {
 11187     {
  1716         symbol_c *last_type_symbol = NULL;
 11188         symbol_c *last_type_symbol = NULL;
  1717 
 11189 
  1718         {
 11190         {
  1719             identifier_c param_name("IN");
 11191             identifier_c param_name("IN");
  1720             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11192             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1722             
 11194             
  1723             /* Get the value from a foo(<param_value>) style call */
 11195             /* Get the value from a foo(<param_value>) style call */
  1724             if (IN_param_value == NULL)
 11196             if (IN_param_value == NULL)
  1725               IN_param_value = function_call_param_iterator.next();
 11197               IN_param_value = function_call_param_iterator.next();
  1726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1728             
 11200             
  1729             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11201             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1730             {
 11202             {
  1731         
 11203         
  1732                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 11204                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1733                 return return_type_symbol;
 11205                 return return_type_symbol;
  1734                 
 11206                 
  1735             }
 11207             }
  1736             
 11208             
  1737             ERROR;
 11209             ERROR;
  1738         }
 11210         }
  1739         
 11211         
  1740     }/*function_sint_to_dword*/
 11212     }/*function_tod_to_dword*/
  1741     break;
 11213     break;
  1742 
 11214 
  1743 /****
 11215 /****
  1744  *SINT_TO_LWORD
 11216  *TOD_TO_LWORD
  1745  */
 11217  */
  1746     case function_sint_to_lword :
 11218     case function_tod_to_lword :
  1747     {
 11219     {
  1748         symbol_c *last_type_symbol = NULL;
 11220         symbol_c *last_type_symbol = NULL;
  1749 
 11221 
  1750         {
 11222         {
  1751             identifier_c param_name("IN");
 11223             identifier_c param_name("IN");
  1752             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11224             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1754             
 11226             
  1755             /* Get the value from a foo(<param_value>) style call */
 11227             /* Get the value from a foo(<param_value>) style call */
  1756             if (IN_param_value == NULL)
 11228             if (IN_param_value == NULL)
  1757               IN_param_value = function_call_param_iterator.next();
 11229               IN_param_value = function_call_param_iterator.next();
  1758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1760             
 11232             
  1761             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11233             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1762             {
 11234             {
  1763         
 11235         
  1764                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 11236                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1765                 return return_type_symbol;
 11237                 return return_type_symbol;
  1766                 
 11238                 
  1767             }
 11239             }
  1768             
 11240             
  1769             ERROR;
 11241             ERROR;
  1770         }
 11242         }
  1771         
 11243         
  1772     }/*function_sint_to_lword*/
 11244     }/*function_tod_to_lword*/
  1773     break;
 11245     break;
  1774 
 11246 
  1775 /****
 11247 /****
  1776  *SINT_TO_STRING
 11248  *TOD_TO_STRING
  1777  */
 11249  */
  1778     case function_sint_to_string :
 11250     case function_tod_to_string :
  1779     {
 11251     {
  1780         symbol_c *last_type_symbol = NULL;
 11252         symbol_c *last_type_symbol = NULL;
  1781 
 11253 
  1782         {
 11254         {
  1783             identifier_c param_name("IN");
 11255             identifier_c param_name("IN");
  1784             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11256             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1786             
 11258             
  1787             /* Get the value from a foo(<param_value>) style call */
 11259             /* Get the value from a foo(<param_value>) style call */
  1788             if (IN_param_value == NULL)
 11260             if (IN_param_value == NULL)
  1789               IN_param_value = function_call_param_iterator.next();
 11261               IN_param_value = function_call_param_iterator.next();
  1790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1792             
 11264             
  1793             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11265             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
  1794             {
 11266             {
  1795         
 11267         
  1796                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 11268                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1797                 return return_type_symbol;
 11269                 return return_type_symbol;
  1798                 
 11270                 
  1799             }
 11271             }
  1800             
 11272             
  1801             ERROR;
 11273             ERROR;
  1802         }
 11274         }
  1803         
 11275         
  1804     }/*function_sint_to_string*/
 11276     }/*function_tod_to_string*/
  1805     break;
 11277     break;
  1806 
 11278 
  1807 /****
 11279 /****
  1808  *SINT_TO_WSTRING
 11280  *DT_TO_REAL
  1809  */
 11281  */
  1810     case function_sint_to_wstring :
 11282     case function_dt_to_real :
  1811     {
 11283     {
  1812         symbol_c *last_type_symbol = NULL;
 11284         symbol_c *last_type_symbol = NULL;
  1813 
 11285 
  1814         {
 11286         {
  1815             identifier_c param_name("IN");
 11287             identifier_c param_name("IN");
  1816             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11288             /* Get the value from a foo(<param_name> = <param_value>) style call */
  1817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1818             
 11290             
  1819             /* Get the value from a foo(<param_value>) style call */
 11291             /* Get the value from a foo(<param_value>) style call */
  1820             if (IN_param_value == NULL)
 11292             if (IN_param_value == NULL)
  1821               IN_param_value = function_call_param_iterator.next();
 11293               IN_param_value = function_call_param_iterator.next();
  1822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1824             
 11296             
  1825             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 11297             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  1826             {
       
  1827         
       
  1828                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  1829                 return return_type_symbol;
       
  1830                 
       
  1831             }
       
  1832             
       
  1833             ERROR;
       
  1834         }
       
  1835         
       
  1836     }/*function_sint_to_wstring*/
       
  1837     break;
       
  1838 
       
  1839 /****
       
  1840  *SINT_TO_DATE
       
  1841  */
       
  1842     case function_sint_to_date :
       
  1843     {
       
  1844         symbol_c *last_type_symbol = NULL;
       
  1845 
       
  1846         {
       
  1847             identifier_c param_name("IN");
       
  1848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1850             
       
  1851             /* Get the value from a foo(<param_value>) style call */
       
  1852             if (IN_param_value == NULL)
       
  1853               IN_param_value = function_call_param_iterator.next();
       
  1854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1856             
       
  1857             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1858             {
       
  1859         
       
  1860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1861                 return return_type_symbol;
       
  1862                 
       
  1863             }
       
  1864             
       
  1865             ERROR;
       
  1866         }
       
  1867         
       
  1868     }/*function_sint_to_date*/
       
  1869     break;
       
  1870 
       
  1871 /****
       
  1872  *SINT_TO_TOD
       
  1873  */
       
  1874     case function_sint_to_tod :
       
  1875     {
       
  1876         symbol_c *last_type_symbol = NULL;
       
  1877 
       
  1878         {
       
  1879             identifier_c param_name("IN");
       
  1880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1882             
       
  1883             /* Get the value from a foo(<param_value>) style call */
       
  1884             if (IN_param_value == NULL)
       
  1885               IN_param_value = function_call_param_iterator.next();
       
  1886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1888             
       
  1889             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1890             {
       
  1891         
       
  1892                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1893                 return return_type_symbol;
       
  1894                 
       
  1895             }
       
  1896             
       
  1897             ERROR;
       
  1898         }
       
  1899         
       
  1900     }/*function_sint_to_tod*/
       
  1901     break;
       
  1902 
       
  1903 /****
       
  1904  *SINT_TO_DT
       
  1905  */
       
  1906     case function_sint_to_dt :
       
  1907     {
       
  1908         symbol_c *last_type_symbol = NULL;
       
  1909 
       
  1910         {
       
  1911             identifier_c param_name("IN");
       
  1912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1914             
       
  1915             /* Get the value from a foo(<param_value>) style call */
       
  1916             if (IN_param_value == NULL)
       
  1917               IN_param_value = function_call_param_iterator.next();
       
  1918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1920             
       
  1921             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
  1922             {
       
  1923         
       
  1924                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1925                 return return_type_symbol;
       
  1926                 
       
  1927             }
       
  1928             
       
  1929             ERROR;
       
  1930         }
       
  1931         
       
  1932     }/*function_sint_to_dt*/
       
  1933     break;
       
  1934 
       
  1935 /****
       
  1936  *INT_TO_REAL
       
  1937  */
       
  1938     case function_int_to_real :
       
  1939     {
       
  1940         symbol_c *last_type_symbol = NULL;
       
  1941 
       
  1942         {
       
  1943             identifier_c param_name("IN");
       
  1944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1946             
       
  1947             /* Get the value from a foo(<param_value>) style call */
       
  1948             if (IN_param_value == NULL)
       
  1949               IN_param_value = function_call_param_iterator.next();
       
  1950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1952             
       
  1953             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  1954             {
 11298             {
  1955         
 11299         
  1956                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 11300                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1957                 return return_type_symbol;
 11301                 return return_type_symbol;
  1958                 
 11302                 
  1959             }
 11303             }
  1960             
 11304             
  1961             ERROR;
 11305             ERROR;
  1962         }
 11306         }
  1963         
 11307         
  1964     }/*function_int_to_real*/
 11308     }/*function_dt_to_real*/
  1965     break;
 11309     break;
  1966 
 11310 
  1967 /****
 11311 /****
  1968  *INT_TO_LREAL
 11312  *DT_TO_LREAL
  1969  */
 11313  */
  1970     case function_int_to_lreal :
 11314     case function_dt_to_lreal :
  1971     {
 11315     {
  1972         symbol_c *last_type_symbol = NULL;
 11316         symbol_c *last_type_symbol = NULL;
  1973 
 11317 
  1974         {
 11318         {
  1975             identifier_c param_name("IN");
 11319             identifier_c param_name("IN");
  1976             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11320             /* 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);
 11321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  1978             
 11322             
  1979             /* Get the value from a foo(<param_value>) style call */
 11323             /* Get the value from a foo(<param_value>) style call */
  1980             if (IN_param_value == NULL)
 11324             if (IN_param_value == NULL)
  1981               IN_param_value = function_call_param_iterator.next();
 11325               IN_param_value = function_call_param_iterator.next();
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11326             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 ;
 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 ;
  1984             
 11328             
  1985             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11329             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  1986             {
 11330             {
  1987         
 11331         
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1989                 return return_type_symbol;
 11333                 return return_type_symbol;
  1990                 
 11334                 
  1991             }
 11335             }
  1992             
 11336             
  1993             ERROR;
 11337             ERROR;
  1994         }
 11338         }
  1995         
 11339         
  1996     }/*function_int_to_lreal*/
 11340     }/*function_dt_to_lreal*/
  1997     break;
 11341     break;
  1998 
 11342 
  1999 /****
 11343 /****
  2000  *INT_TO_SINT
 11344  *DT_TO_SINT
  2001  */
 11345  */
  2002     case function_int_to_sint :
 11346     case function_dt_to_sint :
  2003     {
 11347     {
  2004         symbol_c *last_type_symbol = NULL;
 11348         symbol_c *last_type_symbol = NULL;
  2005 
 11349 
  2006         {
 11350         {
  2007             identifier_c param_name("IN");
 11351             identifier_c param_name("IN");
  2008             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11352             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2010             
 11354             
  2011             /* Get the value from a foo(<param_value>) style call */
 11355             /* Get the value from a foo(<param_value>) style call */
  2012             if (IN_param_value == NULL)
 11356             if (IN_param_value == NULL)
  2013               IN_param_value = function_call_param_iterator.next();
 11357               IN_param_value = function_call_param_iterator.next();
  2014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2016             
 11360             
  2017             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11361             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2018             {
 11362             {
  2019         
 11363         
  2020                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2021                 return return_type_symbol;
 11365                 return return_type_symbol;
  2022                 
 11366                 
  2023             }
 11367             }
  2024             
 11368             
  2025             ERROR;
 11369             ERROR;
  2026         }
 11370         }
  2027         
 11371         
  2028     }/*function_int_to_sint*/
 11372     }/*function_dt_to_sint*/
  2029     break;
 11373     break;
  2030 
 11374 
  2031 /****
 11375 /****
  2032  *INT_TO_DINT
 11376  *DT_TO_INT
  2033  */
 11377  */
  2034     case function_int_to_dint :
 11378     case function_dt_to_int :
  2035     {
 11379     {
  2036         symbol_c *last_type_symbol = NULL;
 11380         symbol_c *last_type_symbol = NULL;
  2037 
 11381 
  2038         {
 11382         {
  2039             identifier_c param_name("IN");
 11383             identifier_c param_name("IN");
  2040             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11384             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2042             
 11386             
  2043             /* Get the value from a foo(<param_value>) style call */
 11387             /* Get the value from a foo(<param_value>) style call */
  2044             if (IN_param_value == NULL)
 11388             if (IN_param_value == NULL)
  2045               IN_param_value = function_call_param_iterator.next();
 11389               IN_param_value = function_call_param_iterator.next();
  2046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2048             
 11392             
  2049             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11393             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 11394             {
       
 11395         
       
 11396                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11397                 return return_type_symbol;
       
 11398                 
       
 11399             }
       
 11400             
       
 11401             ERROR;
       
 11402         }
       
 11403         
       
 11404     }/*function_dt_to_int*/
       
 11405     break;
       
 11406 
       
 11407 /****
       
 11408  *DT_TO_DINT
       
 11409  */
       
 11410     case function_dt_to_dint :
       
 11411     {
       
 11412         symbol_c *last_type_symbol = NULL;
       
 11413 
       
 11414         {
       
 11415             identifier_c param_name("IN");
       
 11416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11418             
       
 11419             /* Get the value from a foo(<param_value>) style call */
       
 11420             if (IN_param_value == NULL)
       
 11421               IN_param_value = function_call_param_iterator.next();
       
 11422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11424             
       
 11425             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2050             {
 11426             {
  2051         
 11427         
  2052                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 11428                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2053                 return return_type_symbol;
 11429                 return return_type_symbol;
  2054                 
 11430                 
  2055             }
 11431             }
  2056             
 11432             
  2057             ERROR;
 11433             ERROR;
  2058         }
 11434         }
  2059         
 11435         
  2060     }/*function_int_to_dint*/
 11436     }/*function_dt_to_dint*/
  2061     break;
 11437     break;
  2062 
 11438 
  2063 /****
 11439 /****
  2064  *INT_TO_LINT
 11440  *DT_TO_LINT
  2065  */
 11441  */
  2066     case function_int_to_lint :
 11442     case function_dt_to_lint :
  2067     {
 11443     {
  2068         symbol_c *last_type_symbol = NULL;
 11444         symbol_c *last_type_symbol = NULL;
  2069 
 11445 
  2070         {
 11446         {
  2071             identifier_c param_name("IN");
 11447             identifier_c param_name("IN");
  2072             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11448             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2074             
 11450             
  2075             /* Get the value from a foo(<param_value>) style call */
 11451             /* Get the value from a foo(<param_value>) style call */
  2076             if (IN_param_value == NULL)
 11452             if (IN_param_value == NULL)
  2077               IN_param_value = function_call_param_iterator.next();
 11453               IN_param_value = function_call_param_iterator.next();
  2078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2080             
 11456             
  2081             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11457             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2082             {
 11458             {
  2083         
 11459         
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 11460                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  2085                 return return_type_symbol;
 11461                 return return_type_symbol;
  2086                 
 11462                 
  2087             }
 11463             }
  2088             
 11464             
  2089             ERROR;
 11465             ERROR;
  2090         }
 11466         }
  2091         
 11467         
  2092     }/*function_int_to_lint*/
 11468     }/*function_dt_to_lint*/
  2093     break;
 11469     break;
  2094 
 11470 
  2095 /****
 11471 /****
  2096  *INT_TO_USINT
 11472  *DT_TO_USINT
  2097  */
 11473  */
  2098     case function_int_to_usint :
 11474     case function_dt_to_usint :
  2099     {
 11475     {
  2100         symbol_c *last_type_symbol = NULL;
 11476         symbol_c *last_type_symbol = NULL;
  2101 
 11477 
  2102         {
 11478         {
  2103             identifier_c param_name("IN");
 11479             identifier_c param_name("IN");
  2104             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11480             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2106             
 11482             
  2107             /* Get the value from a foo(<param_value>) style call */
 11483             /* Get the value from a foo(<param_value>) style call */
  2108             if (IN_param_value == NULL)
 11484             if (IN_param_value == NULL)
  2109               IN_param_value = function_call_param_iterator.next();
 11485               IN_param_value = function_call_param_iterator.next();
  2110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2112             
 11488             
  2113             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11489             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2114             {
 11490             {
  2115         
 11491         
  2116                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 11492                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2117                 return return_type_symbol;
 11493                 return return_type_symbol;
  2118                 
 11494                 
  2119             }
 11495             }
  2120             
 11496             
  2121             ERROR;
 11497             ERROR;
  2122         }
 11498         }
  2123         
 11499         
  2124     }/*function_int_to_usint*/
 11500     }/*function_dt_to_usint*/
  2125     break;
 11501     break;
  2126 
 11502 
  2127 /****
 11503 /****
  2128  *INT_TO_UINT
 11504  *DT_TO_UINT
  2129  */
 11505  */
  2130     case function_int_to_uint :
 11506     case function_dt_to_uint :
  2131     {
 11507     {
  2132         symbol_c *last_type_symbol = NULL;
 11508         symbol_c *last_type_symbol = NULL;
  2133 
 11509 
  2134         {
 11510         {
  2135             identifier_c param_name("IN");
 11511             identifier_c param_name("IN");
  2136             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11512             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2138             
 11514             
  2139             /* Get the value from a foo(<param_value>) style call */
 11515             /* Get the value from a foo(<param_value>) style call */
  2140             if (IN_param_value == NULL)
 11516             if (IN_param_value == NULL)
  2141               IN_param_value = function_call_param_iterator.next();
 11517               IN_param_value = function_call_param_iterator.next();
  2142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2144             
 11520             
  2145             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11521             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2146             {
 11522             {
  2147         
 11523         
  2148                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2149                 return return_type_symbol;
 11525                 return return_type_symbol;
  2150                 
 11526                 
  2151             }
 11527             }
  2152             
 11528             
  2153             ERROR;
 11529             ERROR;
  2154         }
 11530         }
  2155         
 11531         
  2156     }/*function_int_to_uint*/
 11532     }/*function_dt_to_uint*/
  2157     break;
 11533     break;
  2158 
 11534 
  2159 /****
 11535 /****
  2160  *INT_TO_UDINT
 11536  *DT_TO_UDINT
  2161  */
 11537  */
  2162     case function_int_to_udint :
 11538     case function_dt_to_udint :
  2163     {
 11539     {
  2164         symbol_c *last_type_symbol = NULL;
 11540         symbol_c *last_type_symbol = NULL;
  2165 
 11541 
  2166         {
 11542         {
  2167             identifier_c param_name("IN");
 11543             identifier_c param_name("IN");
  2168             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11544             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2170             
 11546             
  2171             /* Get the value from a foo(<param_value>) style call */
 11547             /* Get the value from a foo(<param_value>) style call */
  2172             if (IN_param_value == NULL)
 11548             if (IN_param_value == NULL)
  2173               IN_param_value = function_call_param_iterator.next();
 11549               IN_param_value = function_call_param_iterator.next();
  2174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2176             
 11552             
  2177             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11553             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2178             {
 11554             {
  2179         
 11555         
  2180                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 11556                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2181                 return return_type_symbol;
 11557                 return return_type_symbol;
  2182                 
 11558                 
  2183             }
 11559             }
  2184             
 11560             
  2185             ERROR;
 11561             ERROR;
  2186         }
 11562         }
  2187         
 11563         
  2188     }/*function_int_to_udint*/
 11564     }/*function_dt_to_udint*/
  2189     break;
 11565     break;
  2190 
 11566 
  2191 /****
 11567 /****
  2192  *INT_TO_ULINT
 11568  *DT_TO_ULINT
  2193  */
 11569  */
  2194     case function_int_to_ulint :
 11570     case function_dt_to_ulint :
  2195     {
 11571     {
  2196         symbol_c *last_type_symbol = NULL;
 11572         symbol_c *last_type_symbol = NULL;
  2197 
 11573 
  2198         {
 11574         {
  2199             identifier_c param_name("IN");
 11575             identifier_c param_name("IN");
  2200             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11576             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2202             
 11578             
  2203             /* Get the value from a foo(<param_value>) style call */
 11579             /* Get the value from a foo(<param_value>) style call */
  2204             if (IN_param_value == NULL)
 11580             if (IN_param_value == NULL)
  2205               IN_param_value = function_call_param_iterator.next();
 11581               IN_param_value = function_call_param_iterator.next();
  2206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2208             
 11584             
  2209             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11585             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2210             {
 11586             {
  2211         
 11587         
  2212                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2213                 return return_type_symbol;
 11589                 return return_type_symbol;
  2214                 
 11590                 
  2215             }
 11591             }
  2216             
 11592             
  2217             ERROR;
 11593             ERROR;
  2218         }
 11594         }
  2219         
 11595         
  2220     }/*function_int_to_ulint*/
 11596     }/*function_dt_to_ulint*/
  2221     break;
 11597     break;
  2222 
 11598 
  2223 /****
 11599 /****
  2224  *INT_TO_TIME
 11600  *DT_TO_BOOL
  2225  */
 11601  */
  2226     case function_int_to_time :
 11602     case function_dt_to_bool :
  2227     {
 11603     {
  2228         symbol_c *last_type_symbol = NULL;
 11604         symbol_c *last_type_symbol = NULL;
  2229 
 11605 
  2230         {
 11606         {
  2231             identifier_c param_name("IN");
 11607             identifier_c param_name("IN");
  2232             /* 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 */
  2233             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);
  2234             
 11610             
  2235             /* Get the value from a foo(<param_value>) style call */
 11611             /* Get the value from a foo(<param_value>) style call */
  2236             if (IN_param_value == NULL)
 11612             if (IN_param_value == NULL)
  2237               IN_param_value = function_call_param_iterator.next();
 11613               IN_param_value = function_call_param_iterator.next();
  2238             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);
  2239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  2240             
 11616             
  2241             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11617             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2242             {
       
  2243         
       
  2244                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2245                 return return_type_symbol;
       
  2246                 
       
  2247             }
       
  2248             
       
  2249             ERROR;
       
  2250         }
       
  2251         
       
  2252     }/*function_int_to_time*/
       
  2253     break;
       
  2254 
       
  2255 /****
       
  2256  *INT_TO_BOOL
       
  2257  */
       
  2258     case function_int_to_bool :
       
  2259     {
       
  2260         symbol_c *last_type_symbol = NULL;
       
  2261 
       
  2262         {
       
  2263             identifier_c param_name("IN");
       
  2264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2266             
       
  2267             /* Get the value from a foo(<param_value>) style call */
       
  2268             if (IN_param_value == NULL)
       
  2269               IN_param_value = function_call_param_iterator.next();
       
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2272             
       
  2273             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2274             {
 11618             {
  2275         
 11619         
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2277                 return return_type_symbol;
 11621                 return return_type_symbol;
  2278                 
 11622                 
  2279             }
 11623             }
  2280             
 11624             
  2281             ERROR;
 11625             ERROR;
  2282         }
 11626         }
  2283         
 11627         
  2284     }/*function_int_to_bool*/
 11628     }/*function_dt_to_bool*/
  2285     break;
 11629     break;
  2286 
 11630 
  2287 /****
 11631 /****
  2288  *INT_TO_BYTE
 11632  *DT_TO_BYTE
  2289  */
 11633  */
  2290     case function_int_to_byte :
 11634     case function_dt_to_byte :
  2291     {
 11635     {
  2292         symbol_c *last_type_symbol = NULL;
 11636         symbol_c *last_type_symbol = NULL;
  2293 
 11637 
  2294         {
 11638         {
  2295             identifier_c param_name("IN");
 11639             identifier_c param_name("IN");
  2296             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11640             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2298             
 11642             
  2299             /* Get the value from a foo(<param_value>) style call */
 11643             /* Get the value from a foo(<param_value>) style call */
  2300             if (IN_param_value == NULL)
 11644             if (IN_param_value == NULL)
  2301               IN_param_value = function_call_param_iterator.next();
 11645               IN_param_value = function_call_param_iterator.next();
  2302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2304             
 11648             
  2305             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11649             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2306             {
 11650             {
  2307         
 11651         
  2308                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2309                 return return_type_symbol;
 11653                 return return_type_symbol;
  2310                 
 11654                 
  2311             }
 11655             }
  2312             
 11656             
  2313             ERROR;
 11657             ERROR;
  2314         }
 11658         }
  2315         
 11659         
  2316     }/*function_int_to_byte*/
 11660     }/*function_dt_to_byte*/
  2317     break;
 11661     break;
  2318 
 11662 
  2319 /****
 11663 /****
  2320  *INT_TO_WORD
 11664  *DT_TO_WORD
  2321  */
 11665  */
  2322     case function_int_to_word :
 11666     case function_dt_to_word :
  2323     {
 11667     {
  2324         symbol_c *last_type_symbol = NULL;
 11668         symbol_c *last_type_symbol = NULL;
  2325 
 11669 
  2326         {
 11670         {
  2327             identifier_c param_name("IN");
 11671             identifier_c param_name("IN");
  2328             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11672             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2330             
 11674             
  2331             /* Get the value from a foo(<param_value>) style call */
 11675             /* Get the value from a foo(<param_value>) style call */
  2332             if (IN_param_value == NULL)
 11676             if (IN_param_value == NULL)
  2333               IN_param_value = function_call_param_iterator.next();
 11677               IN_param_value = function_call_param_iterator.next();
  2334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2336             
 11680             
  2337             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11681             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2338             {
 11682             {
  2339         
 11683         
  2340                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 11684                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2341                 return return_type_symbol;
 11685                 return return_type_symbol;
  2342                 
 11686                 
  2343             }
 11687             }
  2344             
 11688             
  2345             ERROR;
 11689             ERROR;
  2346         }
 11690         }
  2347         
 11691         
  2348     }/*function_int_to_word*/
 11692     }/*function_dt_to_word*/
  2349     break;
 11693     break;
  2350 
 11694 
  2351 /****
 11695 /****
  2352  *INT_TO_DWORD
 11696  *DT_TO_DWORD
  2353  */
 11697  */
  2354     case function_int_to_dword :
 11698     case function_dt_to_dword :
  2355     {
 11699     {
  2356         symbol_c *last_type_symbol = NULL;
 11700         symbol_c *last_type_symbol = NULL;
  2357 
 11701 
  2358         {
 11702         {
  2359             identifier_c param_name("IN");
 11703             identifier_c param_name("IN");
  2360             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11704             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2362             
 11706             
  2363             /* Get the value from a foo(<param_value>) style call */
 11707             /* Get the value from a foo(<param_value>) style call */
  2364             if (IN_param_value == NULL)
 11708             if (IN_param_value == NULL)
  2365               IN_param_value = function_call_param_iterator.next();
 11709               IN_param_value = function_call_param_iterator.next();
  2366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2368             
 11712             
  2369             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11713             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2370             {
 11714             {
  2371         
 11715         
  2372                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 11716                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2373                 return return_type_symbol;
 11717                 return return_type_symbol;
  2374                 
 11718                 
  2375             }
 11719             }
  2376             
 11720             
  2377             ERROR;
 11721             ERROR;
  2378         }
 11722         }
  2379         
 11723         
  2380     }/*function_int_to_dword*/
 11724     }/*function_dt_to_dword*/
  2381     break;
 11725     break;
  2382 
 11726 
  2383 /****
 11727 /****
  2384  *INT_TO_LWORD
 11728  *DT_TO_LWORD
  2385  */
 11729  */
  2386     case function_int_to_lword :
 11730     case function_dt_to_lword :
  2387     {
 11731     {
  2388         symbol_c *last_type_symbol = NULL;
 11732         symbol_c *last_type_symbol = NULL;
  2389 
 11733 
  2390         {
 11734         {
  2391             identifier_c param_name("IN");
 11735             identifier_c param_name("IN");
  2392             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11736             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2394             
 11738             
  2395             /* Get the value from a foo(<param_value>) style call */
 11739             /* Get the value from a foo(<param_value>) style call */
  2396             if (IN_param_value == NULL)
 11740             if (IN_param_value == NULL)
  2397               IN_param_value = function_call_param_iterator.next();
 11741               IN_param_value = function_call_param_iterator.next();
  2398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2400             
 11744             
  2401             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11745             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2402             {
 11746             {
  2403         
 11747         
  2404                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 11748                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2405                 return return_type_symbol;
 11749                 return return_type_symbol;
  2406                 
 11750                 
  2407             }
 11751             }
  2408             
 11752             
  2409             ERROR;
 11753             ERROR;
  2410         }
 11754         }
  2411         
 11755         
  2412     }/*function_int_to_lword*/
 11756     }/*function_dt_to_lword*/
  2413     break;
 11757     break;
  2414 
 11758 
  2415 /****
 11759 /****
  2416  *INT_TO_STRING
 11760  *DT_TO_STRING
  2417  */
 11761  */
  2418     case function_int_to_string :
 11762     case function_dt_to_string :
  2419     {
 11763     {
  2420         symbol_c *last_type_symbol = NULL;
 11764         symbol_c *last_type_symbol = NULL;
  2421 
 11765 
  2422         {
 11766         {
  2423             identifier_c param_name("IN");
 11767             identifier_c param_name("IN");
  2424             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11768             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2426             
 11770             
  2427             /* Get the value from a foo(<param_value>) style call */
 11771             /* Get the value from a foo(<param_value>) style call */
  2428             if (IN_param_value == NULL)
 11772             if (IN_param_value == NULL)
  2429               IN_param_value = function_call_param_iterator.next();
 11773               IN_param_value = function_call_param_iterator.next();
  2430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2432             
 11776             
  2433             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11777             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
  2434             {
 11778             {
  2435         
 11779         
  2436                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 11780                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2437                 return return_type_symbol;
 11781                 return return_type_symbol;
  2438                 
 11782                 
  2439             }
 11783             }
  2440             
 11784             
  2441             ERROR;
 11785             ERROR;
  2442         }
 11786         }
  2443         
 11787         
  2444     }/*function_int_to_string*/
 11788     }/*function_dt_to_string*/
  2445     break;
 11789     break;
  2446 
 11790 
  2447 /****
 11791 /****
  2448  *INT_TO_WSTRING
 11792  *TRUNC
  2449  */
 11793  */
  2450     case function_int_to_wstring :
 11794     case function_trunc :
  2451     {
 11795     {
  2452         symbol_c *last_type_symbol = NULL;
 11796         symbol_c *last_type_symbol = NULL;
  2453 
 11797 
  2454         {
 11798         {
  2455             identifier_c param_name("IN");
 11799             identifier_c param_name("IN");
  2456             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11800             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2458             
 11802             
  2459             /* Get the value from a foo(<param_value>) style call */
 11803             /* Get the value from a foo(<param_value>) style call */
  2460             if (IN_param_value == NULL)
 11804             if (IN_param_value == NULL)
  2461               IN_param_value = function_call_param_iterator.next();
 11805               IN_param_value = function_call_param_iterator.next();
  2462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2464             
 11808             
  2465             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11809             if(search_expression_type->is_real_type(IN_type_symbol))
  2466             {
 11810             {
  2467         
 11811         
  2468                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 11812                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  2469                 return return_type_symbol;
 11813                 return return_type_symbol;
  2470                 
 11814                 
  2471             }
 11815             }
  2472             
 11816             
  2473             ERROR;
 11817             ERROR;
  2474         }
 11818         }
  2475         
 11819         
  2476     }/*function_int_to_wstring*/
 11820     }/*function_trunc*/
  2477     break;
 11821     break;
  2478 
 11822 
  2479 /****
 11823 /****
  2480  *INT_TO_DATE
 11824  *BCD_TO_USINT
  2481  */
 11825  */
  2482     case function_int_to_date :
 11826     case function_bcd_to_usint :
  2483     {
 11827     {
  2484         symbol_c *last_type_symbol = NULL;
 11828         symbol_c *last_type_symbol = NULL;
  2485 
 11829 
  2486         {
 11830         {
  2487             identifier_c param_name("IN");
 11831             identifier_c param_name("IN");
  2488             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11832             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2490             
 11834             
  2491             /* Get the value from a foo(<param_value>) style call */
 11835             /* Get the value from a foo(<param_value>) style call */
  2492             if (IN_param_value == NULL)
 11836             if (IN_param_value == NULL)
  2493               IN_param_value = function_call_param_iterator.next();
 11837               IN_param_value = function_call_param_iterator.next();
  2494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 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 ;
  2496             
 11840             
  2497             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 11841             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
  2498             {
       
  2499         
       
  2500                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2501                 return return_type_symbol;
       
  2502                 
       
  2503             }
       
  2504             
       
  2505             ERROR;
       
  2506         }
       
  2507         
       
  2508     }/*function_int_to_date*/
       
  2509     break;
       
  2510 
       
  2511 /****
       
  2512  *INT_TO_TOD
       
  2513  */
       
  2514     case function_int_to_tod :
       
  2515     {
       
  2516         symbol_c *last_type_symbol = NULL;
       
  2517 
       
  2518         {
       
  2519             identifier_c param_name("IN");
       
  2520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2522             
       
  2523             /* Get the value from a foo(<param_value>) style call */
       
  2524             if (IN_param_value == NULL)
       
  2525               IN_param_value = function_call_param_iterator.next();
       
  2526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2528             
       
  2529             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2530             {
       
  2531         
       
  2532                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2533                 return return_type_symbol;
       
  2534                 
       
  2535             }
       
  2536             
       
  2537             ERROR;
       
  2538         }
       
  2539         
       
  2540     }/*function_int_to_tod*/
       
  2541     break;
       
  2542 
       
  2543 /****
       
  2544  *INT_TO_DT
       
  2545  */
       
  2546     case function_int_to_dt :
       
  2547     {
       
  2548         symbol_c *last_type_symbol = NULL;
       
  2549 
       
  2550         {
       
  2551             identifier_c param_name("IN");
       
  2552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2554             
       
  2555             /* Get the value from a foo(<param_value>) style call */
       
  2556             if (IN_param_value == NULL)
       
  2557               IN_param_value = function_call_param_iterator.next();
       
  2558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2560             
       
  2561             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
  2562             {
       
  2563         
       
  2564                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2565                 return return_type_symbol;
       
  2566                 
       
  2567             }
       
  2568             
       
  2569             ERROR;
       
  2570         }
       
  2571         
       
  2572     }/*function_int_to_dt*/
       
  2573     break;
       
  2574 
       
  2575 /****
       
  2576  *DINT_TO_REAL
       
  2577  */
       
  2578     case function_dint_to_real :
       
  2579     {
       
  2580         symbol_c *last_type_symbol = NULL;
       
  2581 
       
  2582         {
       
  2583             identifier_c param_name("IN");
       
  2584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2586             
       
  2587             /* Get the value from a foo(<param_value>) style call */
       
  2588             if (IN_param_value == NULL)
       
  2589               IN_param_value = function_call_param_iterator.next();
       
  2590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2592             
       
  2593             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2594             {
       
  2595         
       
  2596                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2597                 return return_type_symbol;
       
  2598                 
       
  2599             }
       
  2600             
       
  2601             ERROR;
       
  2602         }
       
  2603         
       
  2604     }/*function_dint_to_real*/
       
  2605     break;
       
  2606 
       
  2607 /****
       
  2608  *DINT_TO_LREAL
       
  2609  */
       
  2610     case function_dint_to_lreal :
       
  2611     {
       
  2612         symbol_c *last_type_symbol = NULL;
       
  2613 
       
  2614         {
       
  2615             identifier_c param_name("IN");
       
  2616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2618             
       
  2619             /* Get the value from a foo(<param_value>) style call */
       
  2620             if (IN_param_value == NULL)
       
  2621               IN_param_value = function_call_param_iterator.next();
       
  2622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2624             
       
  2625             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2626             {
       
  2627         
       
  2628                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2629                 return return_type_symbol;
       
  2630                 
       
  2631             }
       
  2632             
       
  2633             ERROR;
       
  2634         }
       
  2635         
       
  2636     }/*function_dint_to_lreal*/
       
  2637     break;
       
  2638 
       
  2639 /****
       
  2640  *DINT_TO_SINT
       
  2641  */
       
  2642     case function_dint_to_sint :
       
  2643     {
       
  2644         symbol_c *last_type_symbol = NULL;
       
  2645 
       
  2646         {
       
  2647             identifier_c param_name("IN");
       
  2648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2650             
       
  2651             /* Get the value from a foo(<param_value>) style call */
       
  2652             if (IN_param_value == NULL)
       
  2653               IN_param_value = function_call_param_iterator.next();
       
  2654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2656             
       
  2657             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2658             {
       
  2659         
       
  2660                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2661                 return return_type_symbol;
       
  2662                 
       
  2663             }
       
  2664             
       
  2665             ERROR;
       
  2666         }
       
  2667         
       
  2668     }/*function_dint_to_sint*/
       
  2669     break;
       
  2670 
       
  2671 /****
       
  2672  *DINT_TO_INT
       
  2673  */
       
  2674     case function_dint_to_int :
       
  2675     {
       
  2676         symbol_c *last_type_symbol = NULL;
       
  2677 
       
  2678         {
       
  2679             identifier_c param_name("IN");
       
  2680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2682             
       
  2683             /* Get the value from a foo(<param_value>) style call */
       
  2684             if (IN_param_value == NULL)
       
  2685               IN_param_value = function_call_param_iterator.next();
       
  2686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2688             
       
  2689             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2690             {
       
  2691         
       
  2692                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2693                 return return_type_symbol;
       
  2694                 
       
  2695             }
       
  2696             
       
  2697             ERROR;
       
  2698         }
       
  2699         
       
  2700     }/*function_dint_to_int*/
       
  2701     break;
       
  2702 
       
  2703 /****
       
  2704  *DINT_TO_LINT
       
  2705  */
       
  2706     case function_dint_to_lint :
       
  2707     {
       
  2708         symbol_c *last_type_symbol = NULL;
       
  2709 
       
  2710         {
       
  2711             identifier_c param_name("IN");
       
  2712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2714             
       
  2715             /* Get the value from a foo(<param_value>) style call */
       
  2716             if (IN_param_value == NULL)
       
  2717               IN_param_value = function_call_param_iterator.next();
       
  2718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2720             
       
  2721             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2722             {
       
  2723         
       
  2724                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2725                 return return_type_symbol;
       
  2726                 
       
  2727             }
       
  2728             
       
  2729             ERROR;
       
  2730         }
       
  2731         
       
  2732     }/*function_dint_to_lint*/
       
  2733     break;
       
  2734 
       
  2735 /****
       
  2736  *DINT_TO_USINT
       
  2737  */
       
  2738     case function_dint_to_usint :
       
  2739     {
       
  2740         symbol_c *last_type_symbol = NULL;
       
  2741 
       
  2742         {
       
  2743             identifier_c param_name("IN");
       
  2744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2746             
       
  2747             /* Get the value from a foo(<param_value>) style call */
       
  2748             if (IN_param_value == NULL)
       
  2749               IN_param_value = function_call_param_iterator.next();
       
  2750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2752             
       
  2753             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2754             {
 11842             {
  2755         
 11843         
  2756                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2757                 return return_type_symbol;
 11845                 return return_type_symbol;
  2758                 
 11846                 
  2759             }
 11847             }
  2760             
 11848             
  2761             ERROR;
 11849             ERROR;
  2762         }
 11850         }
  2763         
 11851         
  2764     }/*function_dint_to_usint*/
 11852     }/*function_bcd_to_usint*/
  2765     break;
 11853     break;
  2766 
 11854 
  2767 /****
 11855 /****
  2768  *DINT_TO_UINT
 11856  *BCD_TO_UINT
  2769  */
 11857  */
  2770     case function_dint_to_uint :
 11858     case function_bcd_to_uint :
  2771     {
 11859     {
  2772         symbol_c *last_type_symbol = NULL;
 11860         symbol_c *last_type_symbol = NULL;
  2773 
 11861 
  2774         {
 11862         {
  2775             identifier_c param_name("IN");
 11863             identifier_c param_name("IN");
  2776             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11864             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2778             
 11866             
  2779             /* Get the value from a foo(<param_value>) style call */
 11867             /* Get the value from a foo(<param_value>) style call */
  2780             if (IN_param_value == NULL)
 11868             if (IN_param_value == NULL)
  2781               IN_param_value = function_call_param_iterator.next();
 11869               IN_param_value = function_call_param_iterator.next();
  2782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2784             
 11872             
  2785             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 11873             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
  2786             {
 11874             {
  2787         
 11875         
  2788                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 11876                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2789                 return return_type_symbol;
 11877                 return return_type_symbol;
  2790                 
 11878                 
  2791             }
 11879             }
  2792             
 11880             
  2793             ERROR;
 11881             ERROR;
  2794         }
 11882         }
  2795         
 11883         
  2796     }/*function_dint_to_uint*/
 11884     }/*function_bcd_to_uint*/
  2797     break;
 11885     break;
  2798 
 11886 
  2799 /****
 11887 /****
  2800  *DINT_TO_UDINT
 11888  *BCD_TO_UDINT
  2801  */
 11889  */
  2802     case function_dint_to_udint :
 11890     case function_bcd_to_udint :
  2803     {
 11891     {
  2804         symbol_c *last_type_symbol = NULL;
 11892         symbol_c *last_type_symbol = NULL;
  2805 
 11893 
  2806         {
 11894         {
  2807             identifier_c param_name("IN");
 11895             identifier_c param_name("IN");
  2808             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11896             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2810             
 11898             
  2811             /* Get the value from a foo(<param_value>) style call */
 11899             /* Get the value from a foo(<param_value>) style call */
  2812             if (IN_param_value == NULL)
 11900             if (IN_param_value == NULL)
  2813               IN_param_value = function_call_param_iterator.next();
 11901               IN_param_value = function_call_param_iterator.next();
  2814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2816             
 11904             
  2817             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 11905             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
  2818             {
 11906             {
  2819         
 11907         
  2820                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 11908                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2821                 return return_type_symbol;
 11909                 return return_type_symbol;
  2822                 
 11910                 
  2823             }
 11911             }
  2824             
 11912             
  2825             ERROR;
 11913             ERROR;
  2826         }
 11914         }
  2827         
 11915         
  2828     }/*function_dint_to_udint*/
 11916     }/*function_bcd_to_udint*/
  2829     break;
 11917     break;
  2830 
 11918 
  2831 /****
 11919 /****
  2832  *DINT_TO_ULINT
 11920  *BCD_TO_ULINT
  2833  */
 11921  */
  2834     case function_dint_to_ulint :
 11922     case function_bcd_to_ulint :
  2835     {
 11923     {
  2836         symbol_c *last_type_symbol = NULL;
 11924         symbol_c *last_type_symbol = NULL;
  2837 
 11925 
  2838         {
 11926         {
  2839             identifier_c param_name("IN");
 11927             identifier_c param_name("IN");
  2840             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11928             /* Get the value from a foo(<param_name> = <param_value>) style call */
  2841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  2842             
 11930             
  2843             /* Get the value from a foo(<param_value>) style call */
 11931             /* Get the value from a foo(<param_value>) style call */
  2844             if (IN_param_value == NULL)
 11932             if (IN_param_value == NULL)
  2845               IN_param_value = function_call_param_iterator.next();
 11933               IN_param_value = function_call_param_iterator.next();
  2846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2848             
 11936             
  2849             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 11937             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
  2850             {
 11938             {
  2851         
 11939         
  2852                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 11940                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2853                 return return_type_symbol;
 11941                 return return_type_symbol;
  2854                 
 11942                 
  2855             }
 11943             }
  2856             
 11944             
  2857             ERROR;
 11945             ERROR;
  2858         }
 11946         }
  2859         
 11947         
  2860     }/*function_dint_to_ulint*/
       
  2861     break;
       
  2862 
       
  2863 /****
       
  2864  *DINT_TO_TIME
       
  2865  */
       
  2866     case function_dint_to_time :
       
  2867     {
       
  2868         symbol_c *last_type_symbol = NULL;
       
  2869 
       
  2870         {
       
  2871             identifier_c param_name("IN");
       
  2872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2874             
       
  2875             /* Get the value from a foo(<param_value>) style call */
       
  2876             if (IN_param_value == NULL)
       
  2877               IN_param_value = function_call_param_iterator.next();
       
  2878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2880             
       
  2881             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2882             {
       
  2883         
       
  2884                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2885                 return return_type_symbol;
       
  2886                 
       
  2887             }
       
  2888             
       
  2889             ERROR;
       
  2890         }
       
  2891         
       
  2892     }/*function_dint_to_time*/
       
  2893     break;
       
  2894 
       
  2895 /****
       
  2896  *DINT_TO_BOOL
       
  2897  */
       
  2898     case function_dint_to_bool :
       
  2899     {
       
  2900         symbol_c *last_type_symbol = NULL;
       
  2901 
       
  2902         {
       
  2903             identifier_c param_name("IN");
       
  2904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2906             
       
  2907             /* Get the value from a foo(<param_value>) style call */
       
  2908             if (IN_param_value == NULL)
       
  2909               IN_param_value = function_call_param_iterator.next();
       
  2910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2912             
       
  2913             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2914             {
       
  2915         
       
  2916                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2917                 return return_type_symbol;
       
  2918                 
       
  2919             }
       
  2920             
       
  2921             ERROR;
       
  2922         }
       
  2923         
       
  2924     }/*function_dint_to_bool*/
       
  2925     break;
       
  2926 
       
  2927 /****
       
  2928  *DINT_TO_BYTE
       
  2929  */
       
  2930     case function_dint_to_byte :
       
  2931     {
       
  2932         symbol_c *last_type_symbol = NULL;
       
  2933 
       
  2934         {
       
  2935             identifier_c param_name("IN");
       
  2936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2938             
       
  2939             /* Get the value from a foo(<param_value>) style call */
       
  2940             if (IN_param_value == NULL)
       
  2941               IN_param_value = function_call_param_iterator.next();
       
  2942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2944             
       
  2945             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2946             {
       
  2947         
       
  2948                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2949                 return return_type_symbol;
       
  2950                 
       
  2951             }
       
  2952             
       
  2953             ERROR;
       
  2954         }
       
  2955         
       
  2956     }/*function_dint_to_byte*/
       
  2957     break;
       
  2958 
       
  2959 /****
       
  2960  *DINT_TO_WORD
       
  2961  */
       
  2962     case function_dint_to_word :
       
  2963     {
       
  2964         symbol_c *last_type_symbol = NULL;
       
  2965 
       
  2966         {
       
  2967             identifier_c param_name("IN");
       
  2968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2970             
       
  2971             /* Get the value from a foo(<param_value>) style call */
       
  2972             if (IN_param_value == NULL)
       
  2973               IN_param_value = function_call_param_iterator.next();
       
  2974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2976             
       
  2977             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  2978             {
       
  2979         
       
  2980                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2981                 return return_type_symbol;
       
  2982                 
       
  2983             }
       
  2984             
       
  2985             ERROR;
       
  2986         }
       
  2987         
       
  2988     }/*function_dint_to_word*/
       
  2989     break;
       
  2990 
       
  2991 /****
       
  2992  *DINT_TO_DWORD
       
  2993  */
       
  2994     case function_dint_to_dword :
       
  2995     {
       
  2996         symbol_c *last_type_symbol = NULL;
       
  2997 
       
  2998         {
       
  2999             identifier_c param_name("IN");
       
  3000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3002             
       
  3003             /* Get the value from a foo(<param_value>) style call */
       
  3004             if (IN_param_value == NULL)
       
  3005               IN_param_value = function_call_param_iterator.next();
       
  3006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3008             
       
  3009             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3010             {
       
  3011         
       
  3012                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3013                 return return_type_symbol;
       
  3014                 
       
  3015             }
       
  3016             
       
  3017             ERROR;
       
  3018         }
       
  3019         
       
  3020     }/*function_dint_to_dword*/
       
  3021     break;
       
  3022 
       
  3023 /****
       
  3024  *DINT_TO_LWORD
       
  3025  */
       
  3026     case function_dint_to_lword :
       
  3027     {
       
  3028         symbol_c *last_type_symbol = NULL;
       
  3029 
       
  3030         {
       
  3031             identifier_c param_name("IN");
       
  3032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3034             
       
  3035             /* Get the value from a foo(<param_value>) style call */
       
  3036             if (IN_param_value == NULL)
       
  3037               IN_param_value = function_call_param_iterator.next();
       
  3038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3040             
       
  3041             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3042             {
       
  3043         
       
  3044                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3045                 return return_type_symbol;
       
  3046                 
       
  3047             }
       
  3048             
       
  3049             ERROR;
       
  3050         }
       
  3051         
       
  3052     }/*function_dint_to_lword*/
       
  3053     break;
       
  3054 
       
  3055 /****
       
  3056  *DINT_TO_STRING
       
  3057  */
       
  3058     case function_dint_to_string :
       
  3059     {
       
  3060         symbol_c *last_type_symbol = NULL;
       
  3061 
       
  3062         {
       
  3063             identifier_c param_name("IN");
       
  3064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3066             
       
  3067             /* Get the value from a foo(<param_value>) style call */
       
  3068             if (IN_param_value == NULL)
       
  3069               IN_param_value = function_call_param_iterator.next();
       
  3070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3072             
       
  3073             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3074             {
       
  3075         
       
  3076                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3077                 return return_type_symbol;
       
  3078                 
       
  3079             }
       
  3080             
       
  3081             ERROR;
       
  3082         }
       
  3083         
       
  3084     }/*function_dint_to_string*/
       
  3085     break;
       
  3086 
       
  3087 /****
       
  3088  *DINT_TO_WSTRING
       
  3089  */
       
  3090     case function_dint_to_wstring :
       
  3091     {
       
  3092         symbol_c *last_type_symbol = NULL;
       
  3093 
       
  3094         {
       
  3095             identifier_c param_name("IN");
       
  3096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3098             
       
  3099             /* Get the value from a foo(<param_value>) style call */
       
  3100             if (IN_param_value == NULL)
       
  3101               IN_param_value = function_call_param_iterator.next();
       
  3102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3104             
       
  3105             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3106             {
       
  3107         
       
  3108                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3109                 return return_type_symbol;
       
  3110                 
       
  3111             }
       
  3112             
       
  3113             ERROR;
       
  3114         }
       
  3115         
       
  3116     }/*function_dint_to_wstring*/
       
  3117     break;
       
  3118 
       
  3119 /****
       
  3120  *DINT_TO_DATE
       
  3121  */
       
  3122     case function_dint_to_date :
       
  3123     {
       
  3124         symbol_c *last_type_symbol = NULL;
       
  3125 
       
  3126         {
       
  3127             identifier_c param_name("IN");
       
  3128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3130             
       
  3131             /* Get the value from a foo(<param_value>) style call */
       
  3132             if (IN_param_value == NULL)
       
  3133               IN_param_value = function_call_param_iterator.next();
       
  3134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3136             
       
  3137             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3138             {
       
  3139         
       
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3141                 return return_type_symbol;
       
  3142                 
       
  3143             }
       
  3144             
       
  3145             ERROR;
       
  3146         }
       
  3147         
       
  3148     }/*function_dint_to_date*/
       
  3149     break;
       
  3150 
       
  3151 /****
       
  3152  *DINT_TO_TOD
       
  3153  */
       
  3154     case function_dint_to_tod :
       
  3155     {
       
  3156         symbol_c *last_type_symbol = NULL;
       
  3157 
       
  3158         {
       
  3159             identifier_c param_name("IN");
       
  3160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3162             
       
  3163             /* Get the value from a foo(<param_value>) style call */
       
  3164             if (IN_param_value == NULL)
       
  3165               IN_param_value = function_call_param_iterator.next();
       
  3166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3168             
       
  3169             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3170             {
       
  3171         
       
  3172                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3173                 return return_type_symbol;
       
  3174                 
       
  3175             }
       
  3176             
       
  3177             ERROR;
       
  3178         }
       
  3179         
       
  3180     }/*function_dint_to_tod*/
       
  3181     break;
       
  3182 
       
  3183 /****
       
  3184  *DINT_TO_DT
       
  3185  */
       
  3186     case function_dint_to_dt :
       
  3187     {
       
  3188         symbol_c *last_type_symbol = NULL;
       
  3189 
       
  3190         {
       
  3191             identifier_c param_name("IN");
       
  3192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3194             
       
  3195             /* Get the value from a foo(<param_value>) style call */
       
  3196             if (IN_param_value == NULL)
       
  3197               IN_param_value = function_call_param_iterator.next();
       
  3198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3200             
       
  3201             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
  3202             {
       
  3203         
       
  3204                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3205                 return return_type_symbol;
       
  3206                 
       
  3207             }
       
  3208             
       
  3209             ERROR;
       
  3210         }
       
  3211         
       
  3212     }/*function_dint_to_dt*/
       
  3213     break;
       
  3214 
       
  3215 /****
       
  3216  *LINT_TO_REAL
       
  3217  */
       
  3218     case function_lint_to_real :
       
  3219     {
       
  3220         symbol_c *last_type_symbol = NULL;
       
  3221 
       
  3222         {
       
  3223             identifier_c param_name("IN");
       
  3224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3226             
       
  3227             /* Get the value from a foo(<param_value>) style call */
       
  3228             if (IN_param_value == NULL)
       
  3229               IN_param_value = function_call_param_iterator.next();
       
  3230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3232             
       
  3233             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3234             {
       
  3235         
       
  3236                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3237                 return return_type_symbol;
       
  3238                 
       
  3239             }
       
  3240             
       
  3241             ERROR;
       
  3242         }
       
  3243         
       
  3244     }/*function_lint_to_real*/
       
  3245     break;
       
  3246 
       
  3247 /****
       
  3248  *LINT_TO_LREAL
       
  3249  */
       
  3250     case function_lint_to_lreal :
       
  3251     {
       
  3252         symbol_c *last_type_symbol = NULL;
       
  3253 
       
  3254         {
       
  3255             identifier_c param_name("IN");
       
  3256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3258             
       
  3259             /* Get the value from a foo(<param_value>) style call */
       
  3260             if (IN_param_value == NULL)
       
  3261               IN_param_value = function_call_param_iterator.next();
       
  3262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3264             
       
  3265             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3266             {
       
  3267         
       
  3268                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3269                 return return_type_symbol;
       
  3270                 
       
  3271             }
       
  3272             
       
  3273             ERROR;
       
  3274         }
       
  3275         
       
  3276     }/*function_lint_to_lreal*/
       
  3277     break;
       
  3278 
       
  3279 /****
       
  3280  *LINT_TO_SINT
       
  3281  */
       
  3282     case function_lint_to_sint :
       
  3283     {
       
  3284         symbol_c *last_type_symbol = NULL;
       
  3285 
       
  3286         {
       
  3287             identifier_c param_name("IN");
       
  3288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3290             
       
  3291             /* Get the value from a foo(<param_value>) style call */
       
  3292             if (IN_param_value == NULL)
       
  3293               IN_param_value = function_call_param_iterator.next();
       
  3294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3296             
       
  3297             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3298             {
       
  3299         
       
  3300                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3301                 return return_type_symbol;
       
  3302                 
       
  3303             }
       
  3304             
       
  3305             ERROR;
       
  3306         }
       
  3307         
       
  3308     }/*function_lint_to_sint*/
       
  3309     break;
       
  3310 
       
  3311 /****
       
  3312  *LINT_TO_INT
       
  3313  */
       
  3314     case function_lint_to_int :
       
  3315     {
       
  3316         symbol_c *last_type_symbol = NULL;
       
  3317 
       
  3318         {
       
  3319             identifier_c param_name("IN");
       
  3320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3322             
       
  3323             /* Get the value from a foo(<param_value>) style call */
       
  3324             if (IN_param_value == NULL)
       
  3325               IN_param_value = function_call_param_iterator.next();
       
  3326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3328             
       
  3329             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3330             {
       
  3331         
       
  3332                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3333                 return return_type_symbol;
       
  3334                 
       
  3335             }
       
  3336             
       
  3337             ERROR;
       
  3338         }
       
  3339         
       
  3340     }/*function_lint_to_int*/
       
  3341     break;
       
  3342 
       
  3343 /****
       
  3344  *LINT_TO_DINT
       
  3345  */
       
  3346     case function_lint_to_dint :
       
  3347     {
       
  3348         symbol_c *last_type_symbol = NULL;
       
  3349 
       
  3350         {
       
  3351             identifier_c param_name("IN");
       
  3352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3354             
       
  3355             /* Get the value from a foo(<param_value>) style call */
       
  3356             if (IN_param_value == NULL)
       
  3357               IN_param_value = function_call_param_iterator.next();
       
  3358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3360             
       
  3361             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3362             {
       
  3363         
       
  3364                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3365                 return return_type_symbol;
       
  3366                 
       
  3367             }
       
  3368             
       
  3369             ERROR;
       
  3370         }
       
  3371         
       
  3372     }/*function_lint_to_dint*/
       
  3373     break;
       
  3374 
       
  3375 /****
       
  3376  *LINT_TO_USINT
       
  3377  */
       
  3378     case function_lint_to_usint :
       
  3379     {
       
  3380         symbol_c *last_type_symbol = NULL;
       
  3381 
       
  3382         {
       
  3383             identifier_c param_name("IN");
       
  3384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3386             
       
  3387             /* Get the value from a foo(<param_value>) style call */
       
  3388             if (IN_param_value == NULL)
       
  3389               IN_param_value = function_call_param_iterator.next();
       
  3390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3392             
       
  3393             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3394             {
       
  3395         
       
  3396                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3397                 return return_type_symbol;
       
  3398                 
       
  3399             }
       
  3400             
       
  3401             ERROR;
       
  3402         }
       
  3403         
       
  3404     }/*function_lint_to_usint*/
       
  3405     break;
       
  3406 
       
  3407 /****
       
  3408  *LINT_TO_UINT
       
  3409  */
       
  3410     case function_lint_to_uint :
       
  3411     {
       
  3412         symbol_c *last_type_symbol = NULL;
       
  3413 
       
  3414         {
       
  3415             identifier_c param_name("IN");
       
  3416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3418             
       
  3419             /* Get the value from a foo(<param_value>) style call */
       
  3420             if (IN_param_value == NULL)
       
  3421               IN_param_value = function_call_param_iterator.next();
       
  3422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3424             
       
  3425             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3426             {
       
  3427         
       
  3428                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3429                 return return_type_symbol;
       
  3430                 
       
  3431             }
       
  3432             
       
  3433             ERROR;
       
  3434         }
       
  3435         
       
  3436     }/*function_lint_to_uint*/
       
  3437     break;
       
  3438 
       
  3439 /****
       
  3440  *LINT_TO_UDINT
       
  3441  */
       
  3442     case function_lint_to_udint :
       
  3443     {
       
  3444         symbol_c *last_type_symbol = NULL;
       
  3445 
       
  3446         {
       
  3447             identifier_c param_name("IN");
       
  3448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3450             
       
  3451             /* Get the value from a foo(<param_value>) style call */
       
  3452             if (IN_param_value == NULL)
       
  3453               IN_param_value = function_call_param_iterator.next();
       
  3454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3456             
       
  3457             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3458             {
       
  3459         
       
  3460                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3461                 return return_type_symbol;
       
  3462                 
       
  3463             }
       
  3464             
       
  3465             ERROR;
       
  3466         }
       
  3467         
       
  3468     }/*function_lint_to_udint*/
       
  3469     break;
       
  3470 
       
  3471 /****
       
  3472  *LINT_TO_ULINT
       
  3473  */
       
  3474     case function_lint_to_ulint :
       
  3475     {
       
  3476         symbol_c *last_type_symbol = NULL;
       
  3477 
       
  3478         {
       
  3479             identifier_c param_name("IN");
       
  3480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3482             
       
  3483             /* Get the value from a foo(<param_value>) style call */
       
  3484             if (IN_param_value == NULL)
       
  3485               IN_param_value = function_call_param_iterator.next();
       
  3486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3488             
       
  3489             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3490             {
       
  3491         
       
  3492                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3493                 return return_type_symbol;
       
  3494                 
       
  3495             }
       
  3496             
       
  3497             ERROR;
       
  3498         }
       
  3499         
       
  3500     }/*function_lint_to_ulint*/
       
  3501     break;
       
  3502 
       
  3503 /****
       
  3504  *LINT_TO_TIME
       
  3505  */
       
  3506     case function_lint_to_time :
       
  3507     {
       
  3508         symbol_c *last_type_symbol = NULL;
       
  3509 
       
  3510         {
       
  3511             identifier_c param_name("IN");
       
  3512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3514             
       
  3515             /* Get the value from a foo(<param_value>) style call */
       
  3516             if (IN_param_value == NULL)
       
  3517               IN_param_value = function_call_param_iterator.next();
       
  3518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3520             
       
  3521             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3522             {
       
  3523         
       
  3524                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3525                 return return_type_symbol;
       
  3526                 
       
  3527             }
       
  3528             
       
  3529             ERROR;
       
  3530         }
       
  3531         
       
  3532     }/*function_lint_to_time*/
       
  3533     break;
       
  3534 
       
  3535 /****
       
  3536  *LINT_TO_BOOL
       
  3537  */
       
  3538     case function_lint_to_bool :
       
  3539     {
       
  3540         symbol_c *last_type_symbol = NULL;
       
  3541 
       
  3542         {
       
  3543             identifier_c param_name("IN");
       
  3544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3546             
       
  3547             /* Get the value from a foo(<param_value>) style call */
       
  3548             if (IN_param_value == NULL)
       
  3549               IN_param_value = function_call_param_iterator.next();
       
  3550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3552             
       
  3553             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3554             {
       
  3555         
       
  3556                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3557                 return return_type_symbol;
       
  3558                 
       
  3559             }
       
  3560             
       
  3561             ERROR;
       
  3562         }
       
  3563         
       
  3564     }/*function_lint_to_bool*/
       
  3565     break;
       
  3566 
       
  3567 /****
       
  3568  *LINT_TO_BYTE
       
  3569  */
       
  3570     case function_lint_to_byte :
       
  3571     {
       
  3572         symbol_c *last_type_symbol = NULL;
       
  3573 
       
  3574         {
       
  3575             identifier_c param_name("IN");
       
  3576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3578             
       
  3579             /* Get the value from a foo(<param_value>) style call */
       
  3580             if (IN_param_value == NULL)
       
  3581               IN_param_value = function_call_param_iterator.next();
       
  3582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3584             
       
  3585             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3586             {
       
  3587         
       
  3588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3589                 return return_type_symbol;
       
  3590                 
       
  3591             }
       
  3592             
       
  3593             ERROR;
       
  3594         }
       
  3595         
       
  3596     }/*function_lint_to_byte*/
       
  3597     break;
       
  3598 
       
  3599 /****
       
  3600  *LINT_TO_WORD
       
  3601  */
       
  3602     case function_lint_to_word :
       
  3603     {
       
  3604         symbol_c *last_type_symbol = NULL;
       
  3605 
       
  3606         {
       
  3607             identifier_c param_name("IN");
       
  3608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3610             
       
  3611             /* Get the value from a foo(<param_value>) style call */
       
  3612             if (IN_param_value == NULL)
       
  3613               IN_param_value = function_call_param_iterator.next();
       
  3614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3616             
       
  3617             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3618             {
       
  3619         
       
  3620                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3621                 return return_type_symbol;
       
  3622                 
       
  3623             }
       
  3624             
       
  3625             ERROR;
       
  3626         }
       
  3627         
       
  3628     }/*function_lint_to_word*/
       
  3629     break;
       
  3630 
       
  3631 /****
       
  3632  *LINT_TO_DWORD
       
  3633  */
       
  3634     case function_lint_to_dword :
       
  3635     {
       
  3636         symbol_c *last_type_symbol = NULL;
       
  3637 
       
  3638         {
       
  3639             identifier_c param_name("IN");
       
  3640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3642             
       
  3643             /* Get the value from a foo(<param_value>) style call */
       
  3644             if (IN_param_value == NULL)
       
  3645               IN_param_value = function_call_param_iterator.next();
       
  3646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3648             
       
  3649             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3650             {
       
  3651         
       
  3652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3653                 return return_type_symbol;
       
  3654                 
       
  3655             }
       
  3656             
       
  3657             ERROR;
       
  3658         }
       
  3659         
       
  3660     }/*function_lint_to_dword*/
       
  3661     break;
       
  3662 
       
  3663 /****
       
  3664  *LINT_TO_LWORD
       
  3665  */
       
  3666     case function_lint_to_lword :
       
  3667     {
       
  3668         symbol_c *last_type_symbol = NULL;
       
  3669 
       
  3670         {
       
  3671             identifier_c param_name("IN");
       
  3672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3674             
       
  3675             /* Get the value from a foo(<param_value>) style call */
       
  3676             if (IN_param_value == NULL)
       
  3677               IN_param_value = function_call_param_iterator.next();
       
  3678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3680             
       
  3681             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3682             {
       
  3683         
       
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3685                 return return_type_symbol;
       
  3686                 
       
  3687             }
       
  3688             
       
  3689             ERROR;
       
  3690         }
       
  3691         
       
  3692     }/*function_lint_to_lword*/
       
  3693     break;
       
  3694 
       
  3695 /****
       
  3696  *LINT_TO_STRING
       
  3697  */
       
  3698     case function_lint_to_string :
       
  3699     {
       
  3700         symbol_c *last_type_symbol = NULL;
       
  3701 
       
  3702         {
       
  3703             identifier_c param_name("IN");
       
  3704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3706             
       
  3707             /* Get the value from a foo(<param_value>) style call */
       
  3708             if (IN_param_value == NULL)
       
  3709               IN_param_value = function_call_param_iterator.next();
       
  3710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3712             
       
  3713             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3714             {
       
  3715         
       
  3716                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3717                 return return_type_symbol;
       
  3718                 
       
  3719             }
       
  3720             
       
  3721             ERROR;
       
  3722         }
       
  3723         
       
  3724     }/*function_lint_to_string*/
       
  3725     break;
       
  3726 
       
  3727 /****
       
  3728  *LINT_TO_WSTRING
       
  3729  */
       
  3730     case function_lint_to_wstring :
       
  3731     {
       
  3732         symbol_c *last_type_symbol = NULL;
       
  3733 
       
  3734         {
       
  3735             identifier_c param_name("IN");
       
  3736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3738             
       
  3739             /* Get the value from a foo(<param_value>) style call */
       
  3740             if (IN_param_value == NULL)
       
  3741               IN_param_value = function_call_param_iterator.next();
       
  3742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3744             
       
  3745             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3746             {
       
  3747         
       
  3748                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  3749                 return return_type_symbol;
       
  3750                 
       
  3751             }
       
  3752             
       
  3753             ERROR;
       
  3754         }
       
  3755         
       
  3756     }/*function_lint_to_wstring*/
       
  3757     break;
       
  3758 
       
  3759 /****
       
  3760  *LINT_TO_DATE
       
  3761  */
       
  3762     case function_lint_to_date :
       
  3763     {
       
  3764         symbol_c *last_type_symbol = NULL;
       
  3765 
       
  3766         {
       
  3767             identifier_c param_name("IN");
       
  3768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3770             
       
  3771             /* Get the value from a foo(<param_value>) style call */
       
  3772             if (IN_param_value == NULL)
       
  3773               IN_param_value = function_call_param_iterator.next();
       
  3774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3776             
       
  3777             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3778             {
       
  3779         
       
  3780                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3781                 return return_type_symbol;
       
  3782                 
       
  3783             }
       
  3784             
       
  3785             ERROR;
       
  3786         }
       
  3787         
       
  3788     }/*function_lint_to_date*/
       
  3789     break;
       
  3790 
       
  3791 /****
       
  3792  *LINT_TO_TOD
       
  3793  */
       
  3794     case function_lint_to_tod :
       
  3795     {
       
  3796         symbol_c *last_type_symbol = NULL;
       
  3797 
       
  3798         {
       
  3799             identifier_c param_name("IN");
       
  3800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3802             
       
  3803             /* Get the value from a foo(<param_value>) style call */
       
  3804             if (IN_param_value == NULL)
       
  3805               IN_param_value = function_call_param_iterator.next();
       
  3806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3808             
       
  3809             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3810             {
       
  3811         
       
  3812                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3813                 return return_type_symbol;
       
  3814                 
       
  3815             }
       
  3816             
       
  3817             ERROR;
       
  3818         }
       
  3819         
       
  3820     }/*function_lint_to_tod*/
       
  3821     break;
       
  3822 
       
  3823 /****
       
  3824  *LINT_TO_DT
       
  3825  */
       
  3826     case function_lint_to_dt :
       
  3827     {
       
  3828         symbol_c *last_type_symbol = NULL;
       
  3829 
       
  3830         {
       
  3831             identifier_c param_name("IN");
       
  3832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3834             
       
  3835             /* Get the value from a foo(<param_value>) style call */
       
  3836             if (IN_param_value == NULL)
       
  3837               IN_param_value = function_call_param_iterator.next();
       
  3838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3840             
       
  3841             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
  3842             {
       
  3843         
       
  3844                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3845                 return return_type_symbol;
       
  3846                 
       
  3847             }
       
  3848             
       
  3849             ERROR;
       
  3850         }
       
  3851         
       
  3852     }/*function_lint_to_dt*/
       
  3853     break;
       
  3854 
       
  3855 /****
       
  3856  *USINT_TO_REAL
       
  3857  */
       
  3858     case function_usint_to_real :
       
  3859     {
       
  3860         symbol_c *last_type_symbol = NULL;
       
  3861 
       
  3862         {
       
  3863             identifier_c param_name("IN");
       
  3864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3866             
       
  3867             /* Get the value from a foo(<param_value>) style call */
       
  3868             if (IN_param_value == NULL)
       
  3869               IN_param_value = function_call_param_iterator.next();
       
  3870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3872             
       
  3873             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3874             {
       
  3875         
       
  3876                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3877                 return return_type_symbol;
       
  3878                 
       
  3879             }
       
  3880             
       
  3881             ERROR;
       
  3882         }
       
  3883         
       
  3884     }/*function_usint_to_real*/
       
  3885     break;
       
  3886 
       
  3887 /****
       
  3888  *USINT_TO_LREAL
       
  3889  */
       
  3890     case function_usint_to_lreal :
       
  3891     {
       
  3892         symbol_c *last_type_symbol = NULL;
       
  3893 
       
  3894         {
       
  3895             identifier_c param_name("IN");
       
  3896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3898             
       
  3899             /* Get the value from a foo(<param_value>) style call */
       
  3900             if (IN_param_value == NULL)
       
  3901               IN_param_value = function_call_param_iterator.next();
       
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3904             
       
  3905             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3906             {
       
  3907         
       
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3909                 return return_type_symbol;
       
  3910                 
       
  3911             }
       
  3912             
       
  3913             ERROR;
       
  3914         }
       
  3915         
       
  3916     }/*function_usint_to_lreal*/
       
  3917     break;
       
  3918 
       
  3919 /****
       
  3920  *USINT_TO_SINT
       
  3921  */
       
  3922     case function_usint_to_sint :
       
  3923     {
       
  3924         symbol_c *last_type_symbol = NULL;
       
  3925 
       
  3926         {
       
  3927             identifier_c param_name("IN");
       
  3928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3930             
       
  3931             /* Get the value from a foo(<param_value>) style call */
       
  3932             if (IN_param_value == NULL)
       
  3933               IN_param_value = function_call_param_iterator.next();
       
  3934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3936             
       
  3937             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3938             {
       
  3939         
       
  3940                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3941                 return return_type_symbol;
       
  3942                 
       
  3943             }
       
  3944             
       
  3945             ERROR;
       
  3946         }
       
  3947         
       
  3948     }/*function_usint_to_sint*/
       
  3949     break;
       
  3950 
       
  3951 /****
       
  3952  *USINT_TO_INT
       
  3953  */
       
  3954     case function_usint_to_int :
       
  3955     {
       
  3956         symbol_c *last_type_symbol = NULL;
       
  3957 
       
  3958         {
       
  3959             identifier_c param_name("IN");
       
  3960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3962             
       
  3963             /* Get the value from a foo(<param_value>) style call */
       
  3964             if (IN_param_value == NULL)
       
  3965               IN_param_value = function_call_param_iterator.next();
       
  3966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3968             
       
  3969             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  3970             {
       
  3971         
       
  3972                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3973                 return return_type_symbol;
       
  3974                 
       
  3975             }
       
  3976             
       
  3977             ERROR;
       
  3978         }
       
  3979         
       
  3980     }/*function_usint_to_int*/
       
  3981     break;
       
  3982 
       
  3983 /****
       
  3984  *USINT_TO_DINT
       
  3985  */
       
  3986     case function_usint_to_dint :
       
  3987     {
       
  3988         symbol_c *last_type_symbol = NULL;
       
  3989 
       
  3990         {
       
  3991             identifier_c param_name("IN");
       
  3992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3994             
       
  3995             /* Get the value from a foo(<param_value>) style call */
       
  3996             if (IN_param_value == NULL)
       
  3997               IN_param_value = function_call_param_iterator.next();
       
  3998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4000             
       
  4001             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4002             {
       
  4003         
       
  4004                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4005                 return return_type_symbol;
       
  4006                 
       
  4007             }
       
  4008             
       
  4009             ERROR;
       
  4010         }
       
  4011         
       
  4012     }/*function_usint_to_dint*/
       
  4013     break;
       
  4014 
       
  4015 /****
       
  4016  *USINT_TO_LINT
       
  4017  */
       
  4018     case function_usint_to_lint :
       
  4019     {
       
  4020         symbol_c *last_type_symbol = NULL;
       
  4021 
       
  4022         {
       
  4023             identifier_c param_name("IN");
       
  4024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4026             
       
  4027             /* Get the value from a foo(<param_value>) style call */
       
  4028             if (IN_param_value == NULL)
       
  4029               IN_param_value = function_call_param_iterator.next();
       
  4030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4032             
       
  4033             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4034             {
       
  4035         
       
  4036                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4037                 return return_type_symbol;
       
  4038                 
       
  4039             }
       
  4040             
       
  4041             ERROR;
       
  4042         }
       
  4043         
       
  4044     }/*function_usint_to_lint*/
       
  4045     break;
       
  4046 
       
  4047 /****
       
  4048  *USINT_TO_UINT
       
  4049  */
       
  4050     case function_usint_to_uint :
       
  4051     {
       
  4052         symbol_c *last_type_symbol = NULL;
       
  4053 
       
  4054         {
       
  4055             identifier_c param_name("IN");
       
  4056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4058             
       
  4059             /* Get the value from a foo(<param_value>) style call */
       
  4060             if (IN_param_value == NULL)
       
  4061               IN_param_value = function_call_param_iterator.next();
       
  4062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4064             
       
  4065             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4066             {
       
  4067         
       
  4068                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4069                 return return_type_symbol;
       
  4070                 
       
  4071             }
       
  4072             
       
  4073             ERROR;
       
  4074         }
       
  4075         
       
  4076     }/*function_usint_to_uint*/
       
  4077     break;
       
  4078 
       
  4079 /****
       
  4080  *USINT_TO_UDINT
       
  4081  */
       
  4082     case function_usint_to_udint :
       
  4083     {
       
  4084         symbol_c *last_type_symbol = NULL;
       
  4085 
       
  4086         {
       
  4087             identifier_c param_name("IN");
       
  4088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4090             
       
  4091             /* Get the value from a foo(<param_value>) style call */
       
  4092             if (IN_param_value == NULL)
       
  4093               IN_param_value = function_call_param_iterator.next();
       
  4094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4096             
       
  4097             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4098             {
       
  4099         
       
  4100                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4101                 return return_type_symbol;
       
  4102                 
       
  4103             }
       
  4104             
       
  4105             ERROR;
       
  4106         }
       
  4107         
       
  4108     }/*function_usint_to_udint*/
       
  4109     break;
       
  4110 
       
  4111 /****
       
  4112  *USINT_TO_ULINT
       
  4113  */
       
  4114     case function_usint_to_ulint :
       
  4115     {
       
  4116         symbol_c *last_type_symbol = NULL;
       
  4117 
       
  4118         {
       
  4119             identifier_c param_name("IN");
       
  4120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4122             
       
  4123             /* Get the value from a foo(<param_value>) style call */
       
  4124             if (IN_param_value == NULL)
       
  4125               IN_param_value = function_call_param_iterator.next();
       
  4126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4128             
       
  4129             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4130             {
       
  4131         
       
  4132                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4133                 return return_type_symbol;
       
  4134                 
       
  4135             }
       
  4136             
       
  4137             ERROR;
       
  4138         }
       
  4139         
       
  4140     }/*function_usint_to_ulint*/
       
  4141     break;
       
  4142 
       
  4143 /****
       
  4144  *USINT_TO_TIME
       
  4145  */
       
  4146     case function_usint_to_time :
       
  4147     {
       
  4148         symbol_c *last_type_symbol = NULL;
       
  4149 
       
  4150         {
       
  4151             identifier_c param_name("IN");
       
  4152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4154             
       
  4155             /* Get the value from a foo(<param_value>) style call */
       
  4156             if (IN_param_value == NULL)
       
  4157               IN_param_value = function_call_param_iterator.next();
       
  4158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4160             
       
  4161             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4162             {
       
  4163         
       
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4165                 return return_type_symbol;
       
  4166                 
       
  4167             }
       
  4168             
       
  4169             ERROR;
       
  4170         }
       
  4171         
       
  4172     }/*function_usint_to_time*/
       
  4173     break;
       
  4174 
       
  4175 /****
       
  4176  *USINT_TO_BOOL
       
  4177  */
       
  4178     case function_usint_to_bool :
       
  4179     {
       
  4180         symbol_c *last_type_symbol = NULL;
       
  4181 
       
  4182         {
       
  4183             identifier_c param_name("IN");
       
  4184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4186             
       
  4187             /* Get the value from a foo(<param_value>) style call */
       
  4188             if (IN_param_value == NULL)
       
  4189               IN_param_value = function_call_param_iterator.next();
       
  4190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4192             
       
  4193             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4194             {
       
  4195         
       
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4197                 return return_type_symbol;
       
  4198                 
       
  4199             }
       
  4200             
       
  4201             ERROR;
       
  4202         }
       
  4203         
       
  4204     }/*function_usint_to_bool*/
       
  4205     break;
       
  4206 
       
  4207 /****
       
  4208  *USINT_TO_BYTE
       
  4209  */
       
  4210     case function_usint_to_byte :
       
  4211     {
       
  4212         symbol_c *last_type_symbol = NULL;
       
  4213 
       
  4214         {
       
  4215             identifier_c param_name("IN");
       
  4216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4218             
       
  4219             /* Get the value from a foo(<param_value>) style call */
       
  4220             if (IN_param_value == NULL)
       
  4221               IN_param_value = function_call_param_iterator.next();
       
  4222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4224             
       
  4225             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4226             {
       
  4227         
       
  4228                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4229                 return return_type_symbol;
       
  4230                 
       
  4231             }
       
  4232             
       
  4233             ERROR;
       
  4234         }
       
  4235         
       
  4236     }/*function_usint_to_byte*/
       
  4237     break;
       
  4238 
       
  4239 /****
       
  4240  *USINT_TO_WORD
       
  4241  */
       
  4242     case function_usint_to_word :
       
  4243     {
       
  4244         symbol_c *last_type_symbol = NULL;
       
  4245 
       
  4246         {
       
  4247             identifier_c param_name("IN");
       
  4248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4250             
       
  4251             /* Get the value from a foo(<param_value>) style call */
       
  4252             if (IN_param_value == NULL)
       
  4253               IN_param_value = function_call_param_iterator.next();
       
  4254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4256             
       
  4257             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4258             {
       
  4259         
       
  4260                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4261                 return return_type_symbol;
       
  4262                 
       
  4263             }
       
  4264             
       
  4265             ERROR;
       
  4266         }
       
  4267         
       
  4268     }/*function_usint_to_word*/
       
  4269     break;
       
  4270 
       
  4271 /****
       
  4272  *USINT_TO_DWORD
       
  4273  */
       
  4274     case function_usint_to_dword :
       
  4275     {
       
  4276         symbol_c *last_type_symbol = NULL;
       
  4277 
       
  4278         {
       
  4279             identifier_c param_name("IN");
       
  4280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4282             
       
  4283             /* Get the value from a foo(<param_value>) style call */
       
  4284             if (IN_param_value == NULL)
       
  4285               IN_param_value = function_call_param_iterator.next();
       
  4286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4288             
       
  4289             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4290             {
       
  4291         
       
  4292                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4293                 return return_type_symbol;
       
  4294                 
       
  4295             }
       
  4296             
       
  4297             ERROR;
       
  4298         }
       
  4299         
       
  4300     }/*function_usint_to_dword*/
       
  4301     break;
       
  4302 
       
  4303 /****
       
  4304  *USINT_TO_LWORD
       
  4305  */
       
  4306     case function_usint_to_lword :
       
  4307     {
       
  4308         symbol_c *last_type_symbol = NULL;
       
  4309 
       
  4310         {
       
  4311             identifier_c param_name("IN");
       
  4312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4314             
       
  4315             /* Get the value from a foo(<param_value>) style call */
       
  4316             if (IN_param_value == NULL)
       
  4317               IN_param_value = function_call_param_iterator.next();
       
  4318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4320             
       
  4321             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4322             {
       
  4323         
       
  4324                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4325                 return return_type_symbol;
       
  4326                 
       
  4327             }
       
  4328             
       
  4329             ERROR;
       
  4330         }
       
  4331         
       
  4332     }/*function_usint_to_lword*/
       
  4333     break;
       
  4334 
       
  4335 /****
       
  4336  *USINT_TO_STRING
       
  4337  */
       
  4338     case function_usint_to_string :
       
  4339     {
       
  4340         symbol_c *last_type_symbol = NULL;
       
  4341 
       
  4342         {
       
  4343             identifier_c param_name("IN");
       
  4344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4346             
       
  4347             /* Get the value from a foo(<param_value>) style call */
       
  4348             if (IN_param_value == NULL)
       
  4349               IN_param_value = function_call_param_iterator.next();
       
  4350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4352             
       
  4353             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4354             {
       
  4355         
       
  4356                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4357                 return return_type_symbol;
       
  4358                 
       
  4359             }
       
  4360             
       
  4361             ERROR;
       
  4362         }
       
  4363         
       
  4364     }/*function_usint_to_string*/
       
  4365     break;
       
  4366 
       
  4367 /****
       
  4368  *USINT_TO_WSTRING
       
  4369  */
       
  4370     case function_usint_to_wstring :
       
  4371     {
       
  4372         symbol_c *last_type_symbol = NULL;
       
  4373 
       
  4374         {
       
  4375             identifier_c param_name("IN");
       
  4376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4378             
       
  4379             /* Get the value from a foo(<param_value>) style call */
       
  4380             if (IN_param_value == NULL)
       
  4381               IN_param_value = function_call_param_iterator.next();
       
  4382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4384             
       
  4385             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4386             {
       
  4387         
       
  4388                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  4389                 return return_type_symbol;
       
  4390                 
       
  4391             }
       
  4392             
       
  4393             ERROR;
       
  4394         }
       
  4395         
       
  4396     }/*function_usint_to_wstring*/
       
  4397     break;
       
  4398 
       
  4399 /****
       
  4400  *USINT_TO_DATE
       
  4401  */
       
  4402     case function_usint_to_date :
       
  4403     {
       
  4404         symbol_c *last_type_symbol = NULL;
       
  4405 
       
  4406         {
       
  4407             identifier_c param_name("IN");
       
  4408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4410             
       
  4411             /* Get the value from a foo(<param_value>) style call */
       
  4412             if (IN_param_value == NULL)
       
  4413               IN_param_value = function_call_param_iterator.next();
       
  4414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4416             
       
  4417             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4418             {
       
  4419         
       
  4420                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4421                 return return_type_symbol;
       
  4422                 
       
  4423             }
       
  4424             
       
  4425             ERROR;
       
  4426         }
       
  4427         
       
  4428     }/*function_usint_to_date*/
       
  4429     break;
       
  4430 
       
  4431 /****
       
  4432  *USINT_TO_TOD
       
  4433  */
       
  4434     case function_usint_to_tod :
       
  4435     {
       
  4436         symbol_c *last_type_symbol = NULL;
       
  4437 
       
  4438         {
       
  4439             identifier_c param_name("IN");
       
  4440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4442             
       
  4443             /* Get the value from a foo(<param_value>) style call */
       
  4444             if (IN_param_value == NULL)
       
  4445               IN_param_value = function_call_param_iterator.next();
       
  4446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4448             
       
  4449             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4450             {
       
  4451         
       
  4452                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4453                 return return_type_symbol;
       
  4454                 
       
  4455             }
       
  4456             
       
  4457             ERROR;
       
  4458         }
       
  4459         
       
  4460     }/*function_usint_to_tod*/
       
  4461     break;
       
  4462 
       
  4463 /****
       
  4464  *USINT_TO_DT
       
  4465  */
       
  4466     case function_usint_to_dt :
       
  4467     {
       
  4468         symbol_c *last_type_symbol = NULL;
       
  4469 
       
  4470         {
       
  4471             identifier_c param_name("IN");
       
  4472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4474             
       
  4475             /* Get the value from a foo(<param_value>) style call */
       
  4476             if (IN_param_value == NULL)
       
  4477               IN_param_value = function_call_param_iterator.next();
       
  4478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4480             
       
  4481             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
  4482             {
       
  4483         
       
  4484                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4485                 return return_type_symbol;
       
  4486                 
       
  4487             }
       
  4488             
       
  4489             ERROR;
       
  4490         }
       
  4491         
       
  4492     }/*function_usint_to_dt*/
       
  4493     break;
       
  4494 
       
  4495 /****
       
  4496  *UINT_TO_REAL
       
  4497  */
       
  4498     case function_uint_to_real :
       
  4499     {
       
  4500         symbol_c *last_type_symbol = NULL;
       
  4501 
       
  4502         {
       
  4503             identifier_c param_name("IN");
       
  4504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4506             
       
  4507             /* Get the value from a foo(<param_value>) style call */
       
  4508             if (IN_param_value == NULL)
       
  4509               IN_param_value = function_call_param_iterator.next();
       
  4510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4512             
       
  4513             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4514             {
       
  4515         
       
  4516                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4517                 return return_type_symbol;
       
  4518                 
       
  4519             }
       
  4520             
       
  4521             ERROR;
       
  4522         }
       
  4523         
       
  4524     }/*function_uint_to_real*/
       
  4525     break;
       
  4526 
       
  4527 /****
       
  4528  *UINT_TO_LREAL
       
  4529  */
       
  4530     case function_uint_to_lreal :
       
  4531     {
       
  4532         symbol_c *last_type_symbol = NULL;
       
  4533 
       
  4534         {
       
  4535             identifier_c param_name("IN");
       
  4536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4538             
       
  4539             /* Get the value from a foo(<param_value>) style call */
       
  4540             if (IN_param_value == NULL)
       
  4541               IN_param_value = function_call_param_iterator.next();
       
  4542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4544             
       
  4545             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4546             {
       
  4547         
       
  4548                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4549                 return return_type_symbol;
       
  4550                 
       
  4551             }
       
  4552             
       
  4553             ERROR;
       
  4554         }
       
  4555         
       
  4556     }/*function_uint_to_lreal*/
       
  4557     break;
       
  4558 
       
  4559 /****
       
  4560  *UINT_TO_SINT
       
  4561  */
       
  4562     case function_uint_to_sint :
       
  4563     {
       
  4564         symbol_c *last_type_symbol = NULL;
       
  4565 
       
  4566         {
       
  4567             identifier_c param_name("IN");
       
  4568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4570             
       
  4571             /* Get the value from a foo(<param_value>) style call */
       
  4572             if (IN_param_value == NULL)
       
  4573               IN_param_value = function_call_param_iterator.next();
       
  4574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4576             
       
  4577             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4578             {
       
  4579         
       
  4580                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4581                 return return_type_symbol;
       
  4582                 
       
  4583             }
       
  4584             
       
  4585             ERROR;
       
  4586         }
       
  4587         
       
  4588     }/*function_uint_to_sint*/
       
  4589     break;
       
  4590 
       
  4591 /****
       
  4592  *UINT_TO_INT
       
  4593  */
       
  4594     case function_uint_to_int :
       
  4595     {
       
  4596         symbol_c *last_type_symbol = NULL;
       
  4597 
       
  4598         {
       
  4599             identifier_c param_name("IN");
       
  4600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4602             
       
  4603             /* Get the value from a foo(<param_value>) style call */
       
  4604             if (IN_param_value == NULL)
       
  4605               IN_param_value = function_call_param_iterator.next();
       
  4606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4608             
       
  4609             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4610             {
       
  4611         
       
  4612                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4613                 return return_type_symbol;
       
  4614                 
       
  4615             }
       
  4616             
       
  4617             ERROR;
       
  4618         }
       
  4619         
       
  4620     }/*function_uint_to_int*/
       
  4621     break;
       
  4622 
       
  4623 /****
       
  4624  *UINT_TO_DINT
       
  4625  */
       
  4626     case function_uint_to_dint :
       
  4627     {
       
  4628         symbol_c *last_type_symbol = NULL;
       
  4629 
       
  4630         {
       
  4631             identifier_c param_name("IN");
       
  4632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4634             
       
  4635             /* Get the value from a foo(<param_value>) style call */
       
  4636             if (IN_param_value == NULL)
       
  4637               IN_param_value = function_call_param_iterator.next();
       
  4638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4640             
       
  4641             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4642             {
       
  4643         
       
  4644                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4645                 return return_type_symbol;
       
  4646                 
       
  4647             }
       
  4648             
       
  4649             ERROR;
       
  4650         }
       
  4651         
       
  4652     }/*function_uint_to_dint*/
       
  4653     break;
       
  4654 
       
  4655 /****
       
  4656  *UINT_TO_LINT
       
  4657  */
       
  4658     case function_uint_to_lint :
       
  4659     {
       
  4660         symbol_c *last_type_symbol = NULL;
       
  4661 
       
  4662         {
       
  4663             identifier_c param_name("IN");
       
  4664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4666             
       
  4667             /* Get the value from a foo(<param_value>) style call */
       
  4668             if (IN_param_value == NULL)
       
  4669               IN_param_value = function_call_param_iterator.next();
       
  4670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4672             
       
  4673             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4674             {
       
  4675         
       
  4676                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4677                 return return_type_symbol;
       
  4678                 
       
  4679             }
       
  4680             
       
  4681             ERROR;
       
  4682         }
       
  4683         
       
  4684     }/*function_uint_to_lint*/
       
  4685     break;
       
  4686 
       
  4687 /****
       
  4688  *UINT_TO_USINT
       
  4689  */
       
  4690     case function_uint_to_usint :
       
  4691     {
       
  4692         symbol_c *last_type_symbol = NULL;
       
  4693 
       
  4694         {
       
  4695             identifier_c param_name("IN");
       
  4696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4698             
       
  4699             /* Get the value from a foo(<param_value>) style call */
       
  4700             if (IN_param_value == NULL)
       
  4701               IN_param_value = function_call_param_iterator.next();
       
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4704             
       
  4705             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4706             {
       
  4707         
       
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4709                 return return_type_symbol;
       
  4710                 
       
  4711             }
       
  4712             
       
  4713             ERROR;
       
  4714         }
       
  4715         
       
  4716     }/*function_uint_to_usint*/
       
  4717     break;
       
  4718 
       
  4719 /****
       
  4720  *UINT_TO_UDINT
       
  4721  */
       
  4722     case function_uint_to_udint :
       
  4723     {
       
  4724         symbol_c *last_type_symbol = NULL;
       
  4725 
       
  4726         {
       
  4727             identifier_c param_name("IN");
       
  4728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4730             
       
  4731             /* Get the value from a foo(<param_value>) style call */
       
  4732             if (IN_param_value == NULL)
       
  4733               IN_param_value = function_call_param_iterator.next();
       
  4734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4736             
       
  4737             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4738             {
       
  4739         
       
  4740                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4741                 return return_type_symbol;
       
  4742                 
       
  4743             }
       
  4744             
       
  4745             ERROR;
       
  4746         }
       
  4747         
       
  4748     }/*function_uint_to_udint*/
       
  4749     break;
       
  4750 
       
  4751 /****
       
  4752  *UINT_TO_ULINT
       
  4753  */
       
  4754     case function_uint_to_ulint :
       
  4755     {
       
  4756         symbol_c *last_type_symbol = NULL;
       
  4757 
       
  4758         {
       
  4759             identifier_c param_name("IN");
       
  4760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4762             
       
  4763             /* Get the value from a foo(<param_value>) style call */
       
  4764             if (IN_param_value == NULL)
       
  4765               IN_param_value = function_call_param_iterator.next();
       
  4766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4768             
       
  4769             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4770             {
       
  4771         
       
  4772                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4773                 return return_type_symbol;
       
  4774                 
       
  4775             }
       
  4776             
       
  4777             ERROR;
       
  4778         }
       
  4779         
       
  4780     }/*function_uint_to_ulint*/
       
  4781     break;
       
  4782 
       
  4783 /****
       
  4784  *UINT_TO_TIME
       
  4785  */
       
  4786     case function_uint_to_time :
       
  4787     {
       
  4788         symbol_c *last_type_symbol = NULL;
       
  4789 
       
  4790         {
       
  4791             identifier_c param_name("IN");
       
  4792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4794             
       
  4795             /* Get the value from a foo(<param_value>) style call */
       
  4796             if (IN_param_value == NULL)
       
  4797               IN_param_value = function_call_param_iterator.next();
       
  4798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4800             
       
  4801             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4802             {
       
  4803         
       
  4804                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4805                 return return_type_symbol;
       
  4806                 
       
  4807             }
       
  4808             
       
  4809             ERROR;
       
  4810         }
       
  4811         
       
  4812     }/*function_uint_to_time*/
       
  4813     break;
       
  4814 
       
  4815 /****
       
  4816  *UINT_TO_BOOL
       
  4817  */
       
  4818     case function_uint_to_bool :
       
  4819     {
       
  4820         symbol_c *last_type_symbol = NULL;
       
  4821 
       
  4822         {
       
  4823             identifier_c param_name("IN");
       
  4824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4826             
       
  4827             /* Get the value from a foo(<param_value>) style call */
       
  4828             if (IN_param_value == NULL)
       
  4829               IN_param_value = function_call_param_iterator.next();
       
  4830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4832             
       
  4833             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4834             {
       
  4835         
       
  4836                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4837                 return return_type_symbol;
       
  4838                 
       
  4839             }
       
  4840             
       
  4841             ERROR;
       
  4842         }
       
  4843         
       
  4844     }/*function_uint_to_bool*/
       
  4845     break;
       
  4846 
       
  4847 /****
       
  4848  *UINT_TO_BYTE
       
  4849  */
       
  4850     case function_uint_to_byte :
       
  4851     {
       
  4852         symbol_c *last_type_symbol = NULL;
       
  4853 
       
  4854         {
       
  4855             identifier_c param_name("IN");
       
  4856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4858             
       
  4859             /* Get the value from a foo(<param_value>) style call */
       
  4860             if (IN_param_value == NULL)
       
  4861               IN_param_value = function_call_param_iterator.next();
       
  4862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4864             
       
  4865             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4866             {
       
  4867         
       
  4868                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4869                 return return_type_symbol;
       
  4870                 
       
  4871             }
       
  4872             
       
  4873             ERROR;
       
  4874         }
       
  4875         
       
  4876     }/*function_uint_to_byte*/
       
  4877     break;
       
  4878 
       
  4879 /****
       
  4880  *UINT_TO_WORD
       
  4881  */
       
  4882     case function_uint_to_word :
       
  4883     {
       
  4884         symbol_c *last_type_symbol = NULL;
       
  4885 
       
  4886         {
       
  4887             identifier_c param_name("IN");
       
  4888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4890             
       
  4891             /* Get the value from a foo(<param_value>) style call */
       
  4892             if (IN_param_value == NULL)
       
  4893               IN_param_value = function_call_param_iterator.next();
       
  4894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4896             
       
  4897             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4898             {
       
  4899         
       
  4900                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4901                 return return_type_symbol;
       
  4902                 
       
  4903             }
       
  4904             
       
  4905             ERROR;
       
  4906         }
       
  4907         
       
  4908     }/*function_uint_to_word*/
       
  4909     break;
       
  4910 
       
  4911 /****
       
  4912  *UINT_TO_DWORD
       
  4913  */
       
  4914     case function_uint_to_dword :
       
  4915     {
       
  4916         symbol_c *last_type_symbol = NULL;
       
  4917 
       
  4918         {
       
  4919             identifier_c param_name("IN");
       
  4920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4922             
       
  4923             /* Get the value from a foo(<param_value>) style call */
       
  4924             if (IN_param_value == NULL)
       
  4925               IN_param_value = function_call_param_iterator.next();
       
  4926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4928             
       
  4929             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4930             {
       
  4931         
       
  4932                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4933                 return return_type_symbol;
       
  4934                 
       
  4935             }
       
  4936             
       
  4937             ERROR;
       
  4938         }
       
  4939         
       
  4940     }/*function_uint_to_dword*/
       
  4941     break;
       
  4942 
       
  4943 /****
       
  4944  *UINT_TO_LWORD
       
  4945  */
       
  4946     case function_uint_to_lword :
       
  4947     {
       
  4948         symbol_c *last_type_symbol = NULL;
       
  4949 
       
  4950         {
       
  4951             identifier_c param_name("IN");
       
  4952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4954             
       
  4955             /* Get the value from a foo(<param_value>) style call */
       
  4956             if (IN_param_value == NULL)
       
  4957               IN_param_value = function_call_param_iterator.next();
       
  4958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4960             
       
  4961             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4962             {
       
  4963         
       
  4964                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4965                 return return_type_symbol;
       
  4966                 
       
  4967             }
       
  4968             
       
  4969             ERROR;
       
  4970         }
       
  4971         
       
  4972     }/*function_uint_to_lword*/
       
  4973     break;
       
  4974 
       
  4975 /****
       
  4976  *UINT_TO_STRING
       
  4977  */
       
  4978     case function_uint_to_string :
       
  4979     {
       
  4980         symbol_c *last_type_symbol = NULL;
       
  4981 
       
  4982         {
       
  4983             identifier_c param_name("IN");
       
  4984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4986             
       
  4987             /* Get the value from a foo(<param_value>) style call */
       
  4988             if (IN_param_value == NULL)
       
  4989               IN_param_value = function_call_param_iterator.next();
       
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4992             
       
  4993             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  4994             {
       
  4995         
       
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4997                 return return_type_symbol;
       
  4998                 
       
  4999             }
       
  5000             
       
  5001             ERROR;
       
  5002         }
       
  5003         
       
  5004     }/*function_uint_to_string*/
       
  5005     break;
       
  5006 
       
  5007 /****
       
  5008  *UINT_TO_WSTRING
       
  5009  */
       
  5010     case function_uint_to_wstring :
       
  5011     {
       
  5012         symbol_c *last_type_symbol = NULL;
       
  5013 
       
  5014         {
       
  5015             identifier_c param_name("IN");
       
  5016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5018             
       
  5019             /* Get the value from a foo(<param_value>) style call */
       
  5020             if (IN_param_value == NULL)
       
  5021               IN_param_value = function_call_param_iterator.next();
       
  5022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5024             
       
  5025             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5026             {
       
  5027         
       
  5028                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5029                 return return_type_symbol;
       
  5030                 
       
  5031             }
       
  5032             
       
  5033             ERROR;
       
  5034         }
       
  5035         
       
  5036     }/*function_uint_to_wstring*/
       
  5037     break;
       
  5038 
       
  5039 /****
       
  5040  *UINT_TO_DATE
       
  5041  */
       
  5042     case function_uint_to_date :
       
  5043     {
       
  5044         symbol_c *last_type_symbol = NULL;
       
  5045 
       
  5046         {
       
  5047             identifier_c param_name("IN");
       
  5048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5050             
       
  5051             /* Get the value from a foo(<param_value>) style call */
       
  5052             if (IN_param_value == NULL)
       
  5053               IN_param_value = function_call_param_iterator.next();
       
  5054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5056             
       
  5057             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5058             {
       
  5059         
       
  5060                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5061                 return return_type_symbol;
       
  5062                 
       
  5063             }
       
  5064             
       
  5065             ERROR;
       
  5066         }
       
  5067         
       
  5068     }/*function_uint_to_date*/
       
  5069     break;
       
  5070 
       
  5071 /****
       
  5072  *UINT_TO_TOD
       
  5073  */
       
  5074     case function_uint_to_tod :
       
  5075     {
       
  5076         symbol_c *last_type_symbol = NULL;
       
  5077 
       
  5078         {
       
  5079             identifier_c param_name("IN");
       
  5080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5082             
       
  5083             /* Get the value from a foo(<param_value>) style call */
       
  5084             if (IN_param_value == NULL)
       
  5085               IN_param_value = function_call_param_iterator.next();
       
  5086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5088             
       
  5089             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5090             {
       
  5091         
       
  5092                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5093                 return return_type_symbol;
       
  5094                 
       
  5095             }
       
  5096             
       
  5097             ERROR;
       
  5098         }
       
  5099         
       
  5100     }/*function_uint_to_tod*/
       
  5101     break;
       
  5102 
       
  5103 /****
       
  5104  *UINT_TO_DT
       
  5105  */
       
  5106     case function_uint_to_dt :
       
  5107     {
       
  5108         symbol_c *last_type_symbol = NULL;
       
  5109 
       
  5110         {
       
  5111             identifier_c param_name("IN");
       
  5112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5114             
       
  5115             /* Get the value from a foo(<param_value>) style call */
       
  5116             if (IN_param_value == NULL)
       
  5117               IN_param_value = function_call_param_iterator.next();
       
  5118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5120             
       
  5121             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
  5122             {
       
  5123         
       
  5124                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5125                 return return_type_symbol;
       
  5126                 
       
  5127             }
       
  5128             
       
  5129             ERROR;
       
  5130         }
       
  5131         
       
  5132     }/*function_uint_to_dt*/
       
  5133     break;
       
  5134 
       
  5135 /****
       
  5136  *UDINT_TO_REAL
       
  5137  */
       
  5138     case function_udint_to_real :
       
  5139     {
       
  5140         symbol_c *last_type_symbol = NULL;
       
  5141 
       
  5142         {
       
  5143             identifier_c param_name("IN");
       
  5144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5146             
       
  5147             /* Get the value from a foo(<param_value>) style call */
       
  5148             if (IN_param_value == NULL)
       
  5149               IN_param_value = function_call_param_iterator.next();
       
  5150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5152             
       
  5153             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5154             {
       
  5155         
       
  5156                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5157                 return return_type_symbol;
       
  5158                 
       
  5159             }
       
  5160             
       
  5161             ERROR;
       
  5162         }
       
  5163         
       
  5164     }/*function_udint_to_real*/
       
  5165     break;
       
  5166 
       
  5167 /****
       
  5168  *UDINT_TO_LREAL
       
  5169  */
       
  5170     case function_udint_to_lreal :
       
  5171     {
       
  5172         symbol_c *last_type_symbol = NULL;
       
  5173 
       
  5174         {
       
  5175             identifier_c param_name("IN");
       
  5176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5178             
       
  5179             /* Get the value from a foo(<param_value>) style call */
       
  5180             if (IN_param_value == NULL)
       
  5181               IN_param_value = function_call_param_iterator.next();
       
  5182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5184             
       
  5185             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5186             {
       
  5187         
       
  5188                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5189                 return return_type_symbol;
       
  5190                 
       
  5191             }
       
  5192             
       
  5193             ERROR;
       
  5194         }
       
  5195         
       
  5196     }/*function_udint_to_lreal*/
       
  5197     break;
       
  5198 
       
  5199 /****
       
  5200  *UDINT_TO_SINT
       
  5201  */
       
  5202     case function_udint_to_sint :
       
  5203     {
       
  5204         symbol_c *last_type_symbol = NULL;
       
  5205 
       
  5206         {
       
  5207             identifier_c param_name("IN");
       
  5208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5210             
       
  5211             /* Get the value from a foo(<param_value>) style call */
       
  5212             if (IN_param_value == NULL)
       
  5213               IN_param_value = function_call_param_iterator.next();
       
  5214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5216             
       
  5217             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5218             {
       
  5219         
       
  5220                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5221                 return return_type_symbol;
       
  5222                 
       
  5223             }
       
  5224             
       
  5225             ERROR;
       
  5226         }
       
  5227         
       
  5228     }/*function_udint_to_sint*/
       
  5229     break;
       
  5230 
       
  5231 /****
       
  5232  *UDINT_TO_INT
       
  5233  */
       
  5234     case function_udint_to_int :
       
  5235     {
       
  5236         symbol_c *last_type_symbol = NULL;
       
  5237 
       
  5238         {
       
  5239             identifier_c param_name("IN");
       
  5240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5242             
       
  5243             /* Get the value from a foo(<param_value>) style call */
       
  5244             if (IN_param_value == NULL)
       
  5245               IN_param_value = function_call_param_iterator.next();
       
  5246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5248             
       
  5249             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5250             {
       
  5251         
       
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5253                 return return_type_symbol;
       
  5254                 
       
  5255             }
       
  5256             
       
  5257             ERROR;
       
  5258         }
       
  5259         
       
  5260     }/*function_udint_to_int*/
       
  5261     break;
       
  5262 
       
  5263 /****
       
  5264  *UDINT_TO_DINT
       
  5265  */
       
  5266     case function_udint_to_dint :
       
  5267     {
       
  5268         symbol_c *last_type_symbol = NULL;
       
  5269 
       
  5270         {
       
  5271             identifier_c param_name("IN");
       
  5272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5274             
       
  5275             /* Get the value from a foo(<param_value>) style call */
       
  5276             if (IN_param_value == NULL)
       
  5277               IN_param_value = function_call_param_iterator.next();
       
  5278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5280             
       
  5281             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5282             {
       
  5283         
       
  5284                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5285                 return return_type_symbol;
       
  5286                 
       
  5287             }
       
  5288             
       
  5289             ERROR;
       
  5290         }
       
  5291         
       
  5292     }/*function_udint_to_dint*/
       
  5293     break;
       
  5294 
       
  5295 /****
       
  5296  *UDINT_TO_LINT
       
  5297  */
       
  5298     case function_udint_to_lint :
       
  5299     {
       
  5300         symbol_c *last_type_symbol = NULL;
       
  5301 
       
  5302         {
       
  5303             identifier_c param_name("IN");
       
  5304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5306             
       
  5307             /* Get the value from a foo(<param_value>) style call */
       
  5308             if (IN_param_value == NULL)
       
  5309               IN_param_value = function_call_param_iterator.next();
       
  5310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5312             
       
  5313             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5314             {
       
  5315         
       
  5316                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5317                 return return_type_symbol;
       
  5318                 
       
  5319             }
       
  5320             
       
  5321             ERROR;
       
  5322         }
       
  5323         
       
  5324     }/*function_udint_to_lint*/
       
  5325     break;
       
  5326 
       
  5327 /****
       
  5328  *UDINT_TO_USINT
       
  5329  */
       
  5330     case function_udint_to_usint :
       
  5331     {
       
  5332         symbol_c *last_type_symbol = NULL;
       
  5333 
       
  5334         {
       
  5335             identifier_c param_name("IN");
       
  5336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5338             
       
  5339             /* Get the value from a foo(<param_value>) style call */
       
  5340             if (IN_param_value == NULL)
       
  5341               IN_param_value = function_call_param_iterator.next();
       
  5342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5344             
       
  5345             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5346             {
       
  5347         
       
  5348                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5349                 return return_type_symbol;
       
  5350                 
       
  5351             }
       
  5352             
       
  5353             ERROR;
       
  5354         }
       
  5355         
       
  5356     }/*function_udint_to_usint*/
       
  5357     break;
       
  5358 
       
  5359 /****
       
  5360  *UDINT_TO_UINT
       
  5361  */
       
  5362     case function_udint_to_uint :
       
  5363     {
       
  5364         symbol_c *last_type_symbol = NULL;
       
  5365 
       
  5366         {
       
  5367             identifier_c param_name("IN");
       
  5368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5370             
       
  5371             /* Get the value from a foo(<param_value>) style call */
       
  5372             if (IN_param_value == NULL)
       
  5373               IN_param_value = function_call_param_iterator.next();
       
  5374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5376             
       
  5377             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5378             {
       
  5379         
       
  5380                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5381                 return return_type_symbol;
       
  5382                 
       
  5383             }
       
  5384             
       
  5385             ERROR;
       
  5386         }
       
  5387         
       
  5388     }/*function_udint_to_uint*/
       
  5389     break;
       
  5390 
       
  5391 /****
       
  5392  *UDINT_TO_ULINT
       
  5393  */
       
  5394     case function_udint_to_ulint :
       
  5395     {
       
  5396         symbol_c *last_type_symbol = NULL;
       
  5397 
       
  5398         {
       
  5399             identifier_c param_name("IN");
       
  5400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5402             
       
  5403             /* Get the value from a foo(<param_value>) style call */
       
  5404             if (IN_param_value == NULL)
       
  5405               IN_param_value = function_call_param_iterator.next();
       
  5406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5408             
       
  5409             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5410             {
       
  5411         
       
  5412                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5413                 return return_type_symbol;
       
  5414                 
       
  5415             }
       
  5416             
       
  5417             ERROR;
       
  5418         }
       
  5419         
       
  5420     }/*function_udint_to_ulint*/
       
  5421     break;
       
  5422 
       
  5423 /****
       
  5424  *UDINT_TO_TIME
       
  5425  */
       
  5426     case function_udint_to_time :
       
  5427     {
       
  5428         symbol_c *last_type_symbol = NULL;
       
  5429 
       
  5430         {
       
  5431             identifier_c param_name("IN");
       
  5432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5434             
       
  5435             /* Get the value from a foo(<param_value>) style call */
       
  5436             if (IN_param_value == NULL)
       
  5437               IN_param_value = function_call_param_iterator.next();
       
  5438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5440             
       
  5441             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5442             {
       
  5443         
       
  5444                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5445                 return return_type_symbol;
       
  5446                 
       
  5447             }
       
  5448             
       
  5449             ERROR;
       
  5450         }
       
  5451         
       
  5452     }/*function_udint_to_time*/
       
  5453     break;
       
  5454 
       
  5455 /****
       
  5456  *UDINT_TO_BOOL
       
  5457  */
       
  5458     case function_udint_to_bool :
       
  5459     {
       
  5460         symbol_c *last_type_symbol = NULL;
       
  5461 
       
  5462         {
       
  5463             identifier_c param_name("IN");
       
  5464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5466             
       
  5467             /* Get the value from a foo(<param_value>) style call */
       
  5468             if (IN_param_value == NULL)
       
  5469               IN_param_value = function_call_param_iterator.next();
       
  5470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5472             
       
  5473             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5474             {
       
  5475         
       
  5476                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5477                 return return_type_symbol;
       
  5478                 
       
  5479             }
       
  5480             
       
  5481             ERROR;
       
  5482         }
       
  5483         
       
  5484     }/*function_udint_to_bool*/
       
  5485     break;
       
  5486 
       
  5487 /****
       
  5488  *UDINT_TO_BYTE
       
  5489  */
       
  5490     case function_udint_to_byte :
       
  5491     {
       
  5492         symbol_c *last_type_symbol = NULL;
       
  5493 
       
  5494         {
       
  5495             identifier_c param_name("IN");
       
  5496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5498             
       
  5499             /* Get the value from a foo(<param_value>) style call */
       
  5500             if (IN_param_value == NULL)
       
  5501               IN_param_value = function_call_param_iterator.next();
       
  5502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5504             
       
  5505             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5506             {
       
  5507         
       
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5509                 return return_type_symbol;
       
  5510                 
       
  5511             }
       
  5512             
       
  5513             ERROR;
       
  5514         }
       
  5515         
       
  5516     }/*function_udint_to_byte*/
       
  5517     break;
       
  5518 
       
  5519 /****
       
  5520  *UDINT_TO_WORD
       
  5521  */
       
  5522     case function_udint_to_word :
       
  5523     {
       
  5524         symbol_c *last_type_symbol = NULL;
       
  5525 
       
  5526         {
       
  5527             identifier_c param_name("IN");
       
  5528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5530             
       
  5531             /* Get the value from a foo(<param_value>) style call */
       
  5532             if (IN_param_value == NULL)
       
  5533               IN_param_value = function_call_param_iterator.next();
       
  5534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5536             
       
  5537             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5538             {
       
  5539         
       
  5540                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5541                 return return_type_symbol;
       
  5542                 
       
  5543             }
       
  5544             
       
  5545             ERROR;
       
  5546         }
       
  5547         
       
  5548     }/*function_udint_to_word*/
       
  5549     break;
       
  5550 
       
  5551 /****
       
  5552  *UDINT_TO_DWORD
       
  5553  */
       
  5554     case function_udint_to_dword :
       
  5555     {
       
  5556         symbol_c *last_type_symbol = NULL;
       
  5557 
       
  5558         {
       
  5559             identifier_c param_name("IN");
       
  5560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5562             
       
  5563             /* Get the value from a foo(<param_value>) style call */
       
  5564             if (IN_param_value == NULL)
       
  5565               IN_param_value = function_call_param_iterator.next();
       
  5566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5568             
       
  5569             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5570             {
       
  5571         
       
  5572                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5573                 return return_type_symbol;
       
  5574                 
       
  5575             }
       
  5576             
       
  5577             ERROR;
       
  5578         }
       
  5579         
       
  5580     }/*function_udint_to_dword*/
       
  5581     break;
       
  5582 
       
  5583 /****
       
  5584  *UDINT_TO_LWORD
       
  5585  */
       
  5586     case function_udint_to_lword :
       
  5587     {
       
  5588         symbol_c *last_type_symbol = NULL;
       
  5589 
       
  5590         {
       
  5591             identifier_c param_name("IN");
       
  5592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5594             
       
  5595             /* Get the value from a foo(<param_value>) style call */
       
  5596             if (IN_param_value == NULL)
       
  5597               IN_param_value = function_call_param_iterator.next();
       
  5598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5600             
       
  5601             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5602             {
       
  5603         
       
  5604                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5605                 return return_type_symbol;
       
  5606                 
       
  5607             }
       
  5608             
       
  5609             ERROR;
       
  5610         }
       
  5611         
       
  5612     }/*function_udint_to_lword*/
       
  5613     break;
       
  5614 
       
  5615 /****
       
  5616  *UDINT_TO_STRING
       
  5617  */
       
  5618     case function_udint_to_string :
       
  5619     {
       
  5620         symbol_c *last_type_symbol = NULL;
       
  5621 
       
  5622         {
       
  5623             identifier_c param_name("IN");
       
  5624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5626             
       
  5627             /* Get the value from a foo(<param_value>) style call */
       
  5628             if (IN_param_value == NULL)
       
  5629               IN_param_value = function_call_param_iterator.next();
       
  5630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5632             
       
  5633             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5634             {
       
  5635         
       
  5636                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5637                 return return_type_symbol;
       
  5638                 
       
  5639             }
       
  5640             
       
  5641             ERROR;
       
  5642         }
       
  5643         
       
  5644     }/*function_udint_to_string*/
       
  5645     break;
       
  5646 
       
  5647 /****
       
  5648  *UDINT_TO_WSTRING
       
  5649  */
       
  5650     case function_udint_to_wstring :
       
  5651     {
       
  5652         symbol_c *last_type_symbol = NULL;
       
  5653 
       
  5654         {
       
  5655             identifier_c param_name("IN");
       
  5656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5658             
       
  5659             /* Get the value from a foo(<param_value>) style call */
       
  5660             if (IN_param_value == NULL)
       
  5661               IN_param_value = function_call_param_iterator.next();
       
  5662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5664             
       
  5665             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5666             {
       
  5667         
       
  5668                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  5669                 return return_type_symbol;
       
  5670                 
       
  5671             }
       
  5672             
       
  5673             ERROR;
       
  5674         }
       
  5675         
       
  5676     }/*function_udint_to_wstring*/
       
  5677     break;
       
  5678 
       
  5679 /****
       
  5680  *UDINT_TO_DATE
       
  5681  */
       
  5682     case function_udint_to_date :
       
  5683     {
       
  5684         symbol_c *last_type_symbol = NULL;
       
  5685 
       
  5686         {
       
  5687             identifier_c param_name("IN");
       
  5688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5690             
       
  5691             /* Get the value from a foo(<param_value>) style call */
       
  5692             if (IN_param_value == NULL)
       
  5693               IN_param_value = function_call_param_iterator.next();
       
  5694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5696             
       
  5697             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5698             {
       
  5699         
       
  5700                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5701                 return return_type_symbol;
       
  5702                 
       
  5703             }
       
  5704             
       
  5705             ERROR;
       
  5706         }
       
  5707         
       
  5708     }/*function_udint_to_date*/
       
  5709     break;
       
  5710 
       
  5711 /****
       
  5712  *UDINT_TO_TOD
       
  5713  */
       
  5714     case function_udint_to_tod :
       
  5715     {
       
  5716         symbol_c *last_type_symbol = NULL;
       
  5717 
       
  5718         {
       
  5719             identifier_c param_name("IN");
       
  5720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5722             
       
  5723             /* Get the value from a foo(<param_value>) style call */
       
  5724             if (IN_param_value == NULL)
       
  5725               IN_param_value = function_call_param_iterator.next();
       
  5726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5728             
       
  5729             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5730             {
       
  5731         
       
  5732                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5733                 return return_type_symbol;
       
  5734                 
       
  5735             }
       
  5736             
       
  5737             ERROR;
       
  5738         }
       
  5739         
       
  5740     }/*function_udint_to_tod*/
       
  5741     break;
       
  5742 
       
  5743 /****
       
  5744  *UDINT_TO_DT
       
  5745  */
       
  5746     case function_udint_to_dt :
       
  5747     {
       
  5748         symbol_c *last_type_symbol = NULL;
       
  5749 
       
  5750         {
       
  5751             identifier_c param_name("IN");
       
  5752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5754             
       
  5755             /* Get the value from a foo(<param_value>) style call */
       
  5756             if (IN_param_value == NULL)
       
  5757               IN_param_value = function_call_param_iterator.next();
       
  5758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5760             
       
  5761             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
  5762             {
       
  5763         
       
  5764                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5765                 return return_type_symbol;
       
  5766                 
       
  5767             }
       
  5768             
       
  5769             ERROR;
       
  5770         }
       
  5771         
       
  5772     }/*function_udint_to_dt*/
       
  5773     break;
       
  5774 
       
  5775 /****
       
  5776  *ULINT_TO_REAL
       
  5777  */
       
  5778     case function_ulint_to_real :
       
  5779     {
       
  5780         symbol_c *last_type_symbol = NULL;
       
  5781 
       
  5782         {
       
  5783             identifier_c param_name("IN");
       
  5784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5786             
       
  5787             /* Get the value from a foo(<param_value>) style call */
       
  5788             if (IN_param_value == NULL)
       
  5789               IN_param_value = function_call_param_iterator.next();
       
  5790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5792             
       
  5793             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5794             {
       
  5795         
       
  5796                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5797                 return return_type_symbol;
       
  5798                 
       
  5799             }
       
  5800             
       
  5801             ERROR;
       
  5802         }
       
  5803         
       
  5804     }/*function_ulint_to_real*/
       
  5805     break;
       
  5806 
       
  5807 /****
       
  5808  *ULINT_TO_LREAL
       
  5809  */
       
  5810     case function_ulint_to_lreal :
       
  5811     {
       
  5812         symbol_c *last_type_symbol = NULL;
       
  5813 
       
  5814         {
       
  5815             identifier_c param_name("IN");
       
  5816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5818             
       
  5819             /* Get the value from a foo(<param_value>) style call */
       
  5820             if (IN_param_value == NULL)
       
  5821               IN_param_value = function_call_param_iterator.next();
       
  5822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5824             
       
  5825             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5826             {
       
  5827         
       
  5828                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5829                 return return_type_symbol;
       
  5830                 
       
  5831             }
       
  5832             
       
  5833             ERROR;
       
  5834         }
       
  5835         
       
  5836     }/*function_ulint_to_lreal*/
       
  5837     break;
       
  5838 
       
  5839 /****
       
  5840  *ULINT_TO_SINT
       
  5841  */
       
  5842     case function_ulint_to_sint :
       
  5843     {
       
  5844         symbol_c *last_type_symbol = NULL;
       
  5845 
       
  5846         {
       
  5847             identifier_c param_name("IN");
       
  5848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5850             
       
  5851             /* Get the value from a foo(<param_value>) style call */
       
  5852             if (IN_param_value == NULL)
       
  5853               IN_param_value = function_call_param_iterator.next();
       
  5854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5856             
       
  5857             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5858             {
       
  5859         
       
  5860                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5861                 return return_type_symbol;
       
  5862                 
       
  5863             }
       
  5864             
       
  5865             ERROR;
       
  5866         }
       
  5867         
       
  5868     }/*function_ulint_to_sint*/
       
  5869     break;
       
  5870 
       
  5871 /****
       
  5872  *ULINT_TO_INT
       
  5873  */
       
  5874     case function_ulint_to_int :
       
  5875     {
       
  5876         symbol_c *last_type_symbol = NULL;
       
  5877 
       
  5878         {
       
  5879             identifier_c param_name("IN");
       
  5880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5882             
       
  5883             /* Get the value from a foo(<param_value>) style call */
       
  5884             if (IN_param_value == NULL)
       
  5885               IN_param_value = function_call_param_iterator.next();
       
  5886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5888             
       
  5889             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5890             {
       
  5891         
       
  5892                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5893                 return return_type_symbol;
       
  5894                 
       
  5895             }
       
  5896             
       
  5897             ERROR;
       
  5898         }
       
  5899         
       
  5900     }/*function_ulint_to_int*/
       
  5901     break;
       
  5902 
       
  5903 /****
       
  5904  *ULINT_TO_DINT
       
  5905  */
       
  5906     case function_ulint_to_dint :
       
  5907     {
       
  5908         symbol_c *last_type_symbol = NULL;
       
  5909 
       
  5910         {
       
  5911             identifier_c param_name("IN");
       
  5912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5914             
       
  5915             /* Get the value from a foo(<param_value>) style call */
       
  5916             if (IN_param_value == NULL)
       
  5917               IN_param_value = function_call_param_iterator.next();
       
  5918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5920             
       
  5921             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5922             {
       
  5923         
       
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5925                 return return_type_symbol;
       
  5926                 
       
  5927             }
       
  5928             
       
  5929             ERROR;
       
  5930         }
       
  5931         
       
  5932     }/*function_ulint_to_dint*/
       
  5933     break;
       
  5934 
       
  5935 /****
       
  5936  *ULINT_TO_LINT
       
  5937  */
       
  5938     case function_ulint_to_lint :
       
  5939     {
       
  5940         symbol_c *last_type_symbol = NULL;
       
  5941 
       
  5942         {
       
  5943             identifier_c param_name("IN");
       
  5944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5946             
       
  5947             /* Get the value from a foo(<param_value>) style call */
       
  5948             if (IN_param_value == NULL)
       
  5949               IN_param_value = function_call_param_iterator.next();
       
  5950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5952             
       
  5953             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5954             {
       
  5955         
       
  5956                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5957                 return return_type_symbol;
       
  5958                 
       
  5959             }
       
  5960             
       
  5961             ERROR;
       
  5962         }
       
  5963         
       
  5964     }/*function_ulint_to_lint*/
       
  5965     break;
       
  5966 
       
  5967 /****
       
  5968  *ULINT_TO_USINT
       
  5969  */
       
  5970     case function_ulint_to_usint :
       
  5971     {
       
  5972         symbol_c *last_type_symbol = NULL;
       
  5973 
       
  5974         {
       
  5975             identifier_c param_name("IN");
       
  5976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5978             
       
  5979             /* Get the value from a foo(<param_value>) style call */
       
  5980             if (IN_param_value == NULL)
       
  5981               IN_param_value = function_call_param_iterator.next();
       
  5982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5984             
       
  5985             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  5986             {
       
  5987         
       
  5988                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5989                 return return_type_symbol;
       
  5990                 
       
  5991             }
       
  5992             
       
  5993             ERROR;
       
  5994         }
       
  5995         
       
  5996     }/*function_ulint_to_usint*/
       
  5997     break;
       
  5998 
       
  5999 /****
       
  6000  *ULINT_TO_UINT
       
  6001  */
       
  6002     case function_ulint_to_uint :
       
  6003     {
       
  6004         symbol_c *last_type_symbol = NULL;
       
  6005 
       
  6006         {
       
  6007             identifier_c param_name("IN");
       
  6008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6010             
       
  6011             /* Get the value from a foo(<param_value>) style call */
       
  6012             if (IN_param_value == NULL)
       
  6013               IN_param_value = function_call_param_iterator.next();
       
  6014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6016             
       
  6017             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6018             {
       
  6019         
       
  6020                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6021                 return return_type_symbol;
       
  6022                 
       
  6023             }
       
  6024             
       
  6025             ERROR;
       
  6026         }
       
  6027         
       
  6028     }/*function_ulint_to_uint*/
       
  6029     break;
       
  6030 
       
  6031 /****
       
  6032  *ULINT_TO_UDINT
       
  6033  */
       
  6034     case function_ulint_to_udint :
       
  6035     {
       
  6036         symbol_c *last_type_symbol = NULL;
       
  6037 
       
  6038         {
       
  6039             identifier_c param_name("IN");
       
  6040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6042             
       
  6043             /* Get the value from a foo(<param_value>) style call */
       
  6044             if (IN_param_value == NULL)
       
  6045               IN_param_value = function_call_param_iterator.next();
       
  6046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6048             
       
  6049             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6050             {
       
  6051         
       
  6052                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6053                 return return_type_symbol;
       
  6054                 
       
  6055             }
       
  6056             
       
  6057             ERROR;
       
  6058         }
       
  6059         
       
  6060     }/*function_ulint_to_udint*/
       
  6061     break;
       
  6062 
       
  6063 /****
       
  6064  *ULINT_TO_TIME
       
  6065  */
       
  6066     case function_ulint_to_time :
       
  6067     {
       
  6068         symbol_c *last_type_symbol = NULL;
       
  6069 
       
  6070         {
       
  6071             identifier_c param_name("IN");
       
  6072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6074             
       
  6075             /* Get the value from a foo(<param_value>) style call */
       
  6076             if (IN_param_value == NULL)
       
  6077               IN_param_value = function_call_param_iterator.next();
       
  6078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6080             
       
  6081             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6082             {
       
  6083         
       
  6084                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6085                 return return_type_symbol;
       
  6086                 
       
  6087             }
       
  6088             
       
  6089             ERROR;
       
  6090         }
       
  6091         
       
  6092     }/*function_ulint_to_time*/
       
  6093     break;
       
  6094 
       
  6095 /****
       
  6096  *ULINT_TO_BOOL
       
  6097  */
       
  6098     case function_ulint_to_bool :
       
  6099     {
       
  6100         symbol_c *last_type_symbol = NULL;
       
  6101 
       
  6102         {
       
  6103             identifier_c param_name("IN");
       
  6104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6106             
       
  6107             /* Get the value from a foo(<param_value>) style call */
       
  6108             if (IN_param_value == NULL)
       
  6109               IN_param_value = function_call_param_iterator.next();
       
  6110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6112             
       
  6113             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6114             {
       
  6115         
       
  6116                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6117                 return return_type_symbol;
       
  6118                 
       
  6119             }
       
  6120             
       
  6121             ERROR;
       
  6122         }
       
  6123         
       
  6124     }/*function_ulint_to_bool*/
       
  6125     break;
       
  6126 
       
  6127 /****
       
  6128  *ULINT_TO_BYTE
       
  6129  */
       
  6130     case function_ulint_to_byte :
       
  6131     {
       
  6132         symbol_c *last_type_symbol = NULL;
       
  6133 
       
  6134         {
       
  6135             identifier_c param_name("IN");
       
  6136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6138             
       
  6139             /* Get the value from a foo(<param_value>) style call */
       
  6140             if (IN_param_value == NULL)
       
  6141               IN_param_value = function_call_param_iterator.next();
       
  6142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6144             
       
  6145             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6146             {
       
  6147         
       
  6148                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6149                 return return_type_symbol;
       
  6150                 
       
  6151             }
       
  6152             
       
  6153             ERROR;
       
  6154         }
       
  6155         
       
  6156     }/*function_ulint_to_byte*/
       
  6157     break;
       
  6158 
       
  6159 /****
       
  6160  *ULINT_TO_WORD
       
  6161  */
       
  6162     case function_ulint_to_word :
       
  6163     {
       
  6164         symbol_c *last_type_symbol = NULL;
       
  6165 
       
  6166         {
       
  6167             identifier_c param_name("IN");
       
  6168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6170             
       
  6171             /* Get the value from a foo(<param_value>) style call */
       
  6172             if (IN_param_value == NULL)
       
  6173               IN_param_value = function_call_param_iterator.next();
       
  6174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6176             
       
  6177             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6178             {
       
  6179         
       
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6181                 return return_type_symbol;
       
  6182                 
       
  6183             }
       
  6184             
       
  6185             ERROR;
       
  6186         }
       
  6187         
       
  6188     }/*function_ulint_to_word*/
       
  6189     break;
       
  6190 
       
  6191 /****
       
  6192  *ULINT_TO_DWORD
       
  6193  */
       
  6194     case function_ulint_to_dword :
       
  6195     {
       
  6196         symbol_c *last_type_symbol = NULL;
       
  6197 
       
  6198         {
       
  6199             identifier_c param_name("IN");
       
  6200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6202             
       
  6203             /* Get the value from a foo(<param_value>) style call */
       
  6204             if (IN_param_value == NULL)
       
  6205               IN_param_value = function_call_param_iterator.next();
       
  6206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6208             
       
  6209             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6210             {
       
  6211         
       
  6212                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6213                 return return_type_symbol;
       
  6214                 
       
  6215             }
       
  6216             
       
  6217             ERROR;
       
  6218         }
       
  6219         
       
  6220     }/*function_ulint_to_dword*/
       
  6221     break;
       
  6222 
       
  6223 /****
       
  6224  *ULINT_TO_LWORD
       
  6225  */
       
  6226     case function_ulint_to_lword :
       
  6227     {
       
  6228         symbol_c *last_type_symbol = NULL;
       
  6229 
       
  6230         {
       
  6231             identifier_c param_name("IN");
       
  6232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6234             
       
  6235             /* Get the value from a foo(<param_value>) style call */
       
  6236             if (IN_param_value == NULL)
       
  6237               IN_param_value = function_call_param_iterator.next();
       
  6238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6240             
       
  6241             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6242             {
       
  6243         
       
  6244                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6245                 return return_type_symbol;
       
  6246                 
       
  6247             }
       
  6248             
       
  6249             ERROR;
       
  6250         }
       
  6251         
       
  6252     }/*function_ulint_to_lword*/
       
  6253     break;
       
  6254 
       
  6255 /****
       
  6256  *ULINT_TO_STRING
       
  6257  */
       
  6258     case function_ulint_to_string :
       
  6259     {
       
  6260         symbol_c *last_type_symbol = NULL;
       
  6261 
       
  6262         {
       
  6263             identifier_c param_name("IN");
       
  6264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6266             
       
  6267             /* Get the value from a foo(<param_value>) style call */
       
  6268             if (IN_param_value == NULL)
       
  6269               IN_param_value = function_call_param_iterator.next();
       
  6270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6272             
       
  6273             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6274             {
       
  6275         
       
  6276                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6277                 return return_type_symbol;
       
  6278                 
       
  6279             }
       
  6280             
       
  6281             ERROR;
       
  6282         }
       
  6283         
       
  6284     }/*function_ulint_to_string*/
       
  6285     break;
       
  6286 
       
  6287 /****
       
  6288  *ULINT_TO_WSTRING
       
  6289  */
       
  6290     case function_ulint_to_wstring :
       
  6291     {
       
  6292         symbol_c *last_type_symbol = NULL;
       
  6293 
       
  6294         {
       
  6295             identifier_c param_name("IN");
       
  6296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6298             
       
  6299             /* Get the value from a foo(<param_value>) style call */
       
  6300             if (IN_param_value == NULL)
       
  6301               IN_param_value = function_call_param_iterator.next();
       
  6302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6304             
       
  6305             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6306             {
       
  6307         
       
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6309                 return return_type_symbol;
       
  6310                 
       
  6311             }
       
  6312             
       
  6313             ERROR;
       
  6314         }
       
  6315         
       
  6316     }/*function_ulint_to_wstring*/
       
  6317     break;
       
  6318 
       
  6319 /****
       
  6320  *ULINT_TO_DATE
       
  6321  */
       
  6322     case function_ulint_to_date :
       
  6323     {
       
  6324         symbol_c *last_type_symbol = NULL;
       
  6325 
       
  6326         {
       
  6327             identifier_c param_name("IN");
       
  6328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6330             
       
  6331             /* Get the value from a foo(<param_value>) style call */
       
  6332             if (IN_param_value == NULL)
       
  6333               IN_param_value = function_call_param_iterator.next();
       
  6334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6336             
       
  6337             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6338             {
       
  6339         
       
  6340                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6341                 return return_type_symbol;
       
  6342                 
       
  6343             }
       
  6344             
       
  6345             ERROR;
       
  6346         }
       
  6347         
       
  6348     }/*function_ulint_to_date*/
       
  6349     break;
       
  6350 
       
  6351 /****
       
  6352  *ULINT_TO_TOD
       
  6353  */
       
  6354     case function_ulint_to_tod :
       
  6355     {
       
  6356         symbol_c *last_type_symbol = NULL;
       
  6357 
       
  6358         {
       
  6359             identifier_c param_name("IN");
       
  6360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next();
       
  6366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6368             
       
  6369             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6370             {
       
  6371         
       
  6372                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6373                 return return_type_symbol;
       
  6374                 
       
  6375             }
       
  6376             
       
  6377             ERROR;
       
  6378         }
       
  6379         
       
  6380     }/*function_ulint_to_tod*/
       
  6381     break;
       
  6382 
       
  6383 /****
       
  6384  *ULINT_TO_DT
       
  6385  */
       
  6386     case function_ulint_to_dt :
       
  6387     {
       
  6388         symbol_c *last_type_symbol = NULL;
       
  6389 
       
  6390         {
       
  6391             identifier_c param_name("IN");
       
  6392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6394             
       
  6395             /* Get the value from a foo(<param_value>) style call */
       
  6396             if (IN_param_value == NULL)
       
  6397               IN_param_value = function_call_param_iterator.next();
       
  6398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6400             
       
  6401             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
  6402             {
       
  6403         
       
  6404                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6405                 return return_type_symbol;
       
  6406                 
       
  6407             }
       
  6408             
       
  6409             ERROR;
       
  6410         }
       
  6411         
       
  6412     }/*function_ulint_to_dt*/
       
  6413     break;
       
  6414 
       
  6415 /****
       
  6416  *TIME_TO_REAL
       
  6417  */
       
  6418     case function_time_to_real :
       
  6419     {
       
  6420         symbol_c *last_type_symbol = NULL;
       
  6421 
       
  6422         {
       
  6423             identifier_c param_name("IN");
       
  6424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6426             
       
  6427             /* Get the value from a foo(<param_value>) style call */
       
  6428             if (IN_param_value == NULL)
       
  6429               IN_param_value = function_call_param_iterator.next();
       
  6430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6432             
       
  6433             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6434             {
       
  6435         
       
  6436                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6437                 return return_type_symbol;
       
  6438                 
       
  6439             }
       
  6440             
       
  6441             ERROR;
       
  6442         }
       
  6443         
       
  6444     }/*function_time_to_real*/
       
  6445     break;
       
  6446 
       
  6447 /****
       
  6448  *TIME_TO_LREAL
       
  6449  */
       
  6450     case function_time_to_lreal :
       
  6451     {
       
  6452         symbol_c *last_type_symbol = NULL;
       
  6453 
       
  6454         {
       
  6455             identifier_c param_name("IN");
       
  6456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6458             
       
  6459             /* Get the value from a foo(<param_value>) style call */
       
  6460             if (IN_param_value == NULL)
       
  6461               IN_param_value = function_call_param_iterator.next();
       
  6462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6464             
       
  6465             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6466             {
       
  6467         
       
  6468                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6469                 return return_type_symbol;
       
  6470                 
       
  6471             }
       
  6472             
       
  6473             ERROR;
       
  6474         }
       
  6475         
       
  6476     }/*function_time_to_lreal*/
       
  6477     break;
       
  6478 
       
  6479 /****
       
  6480  *TIME_TO_SINT
       
  6481  */
       
  6482     case function_time_to_sint :
       
  6483     {
       
  6484         symbol_c *last_type_symbol = NULL;
       
  6485 
       
  6486         {
       
  6487             identifier_c param_name("IN");
       
  6488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6490             
       
  6491             /* Get the value from a foo(<param_value>) style call */
       
  6492             if (IN_param_value == NULL)
       
  6493               IN_param_value = function_call_param_iterator.next();
       
  6494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6496             
       
  6497             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6498             {
       
  6499         
       
  6500                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6501                 return return_type_symbol;
       
  6502                 
       
  6503             }
       
  6504             
       
  6505             ERROR;
       
  6506         }
       
  6507         
       
  6508     }/*function_time_to_sint*/
       
  6509     break;
       
  6510 
       
  6511 /****
       
  6512  *TIME_TO_INT
       
  6513  */
       
  6514     case function_time_to_int :
       
  6515     {
       
  6516         symbol_c *last_type_symbol = NULL;
       
  6517 
       
  6518         {
       
  6519             identifier_c param_name("IN");
       
  6520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6522             
       
  6523             /* Get the value from a foo(<param_value>) style call */
       
  6524             if (IN_param_value == NULL)
       
  6525               IN_param_value = function_call_param_iterator.next();
       
  6526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6528             
       
  6529             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6530             {
       
  6531         
       
  6532                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6533                 return return_type_symbol;
       
  6534                 
       
  6535             }
       
  6536             
       
  6537             ERROR;
       
  6538         }
       
  6539         
       
  6540     }/*function_time_to_int*/
       
  6541     break;
       
  6542 
       
  6543 /****
       
  6544  *TIME_TO_DINT
       
  6545  */
       
  6546     case function_time_to_dint :
       
  6547     {
       
  6548         symbol_c *last_type_symbol = NULL;
       
  6549 
       
  6550         {
       
  6551             identifier_c param_name("IN");
       
  6552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6554             
       
  6555             /* Get the value from a foo(<param_value>) style call */
       
  6556             if (IN_param_value == NULL)
       
  6557               IN_param_value = function_call_param_iterator.next();
       
  6558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6560             
       
  6561             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6562             {
       
  6563         
       
  6564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6565                 return return_type_symbol;
       
  6566                 
       
  6567             }
       
  6568             
       
  6569             ERROR;
       
  6570         }
       
  6571         
       
  6572     }/*function_time_to_dint*/
       
  6573     break;
       
  6574 
       
  6575 /****
       
  6576  *TIME_TO_LINT
       
  6577  */
       
  6578     case function_time_to_lint :
       
  6579     {
       
  6580         symbol_c *last_type_symbol = NULL;
       
  6581 
       
  6582         {
       
  6583             identifier_c param_name("IN");
       
  6584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6586             
       
  6587             /* Get the value from a foo(<param_value>) style call */
       
  6588             if (IN_param_value == NULL)
       
  6589               IN_param_value = function_call_param_iterator.next();
       
  6590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6592             
       
  6593             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6594             {
       
  6595         
       
  6596                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6597                 return return_type_symbol;
       
  6598                 
       
  6599             }
       
  6600             
       
  6601             ERROR;
       
  6602         }
       
  6603         
       
  6604     }/*function_time_to_lint*/
       
  6605     break;
       
  6606 
       
  6607 /****
       
  6608  *TIME_TO_USINT
       
  6609  */
       
  6610     case function_time_to_usint :
       
  6611     {
       
  6612         symbol_c *last_type_symbol = NULL;
       
  6613 
       
  6614         {
       
  6615             identifier_c param_name("IN");
       
  6616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6618             
       
  6619             /* Get the value from a foo(<param_value>) style call */
       
  6620             if (IN_param_value == NULL)
       
  6621               IN_param_value = function_call_param_iterator.next();
       
  6622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6624             
       
  6625             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6626             {
       
  6627         
       
  6628                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6629                 return return_type_symbol;
       
  6630                 
       
  6631             }
       
  6632             
       
  6633             ERROR;
       
  6634         }
       
  6635         
       
  6636     }/*function_time_to_usint*/
       
  6637     break;
       
  6638 
       
  6639 /****
       
  6640  *TIME_TO_UINT
       
  6641  */
       
  6642     case function_time_to_uint :
       
  6643     {
       
  6644         symbol_c *last_type_symbol = NULL;
       
  6645 
       
  6646         {
       
  6647             identifier_c param_name("IN");
       
  6648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6650             
       
  6651             /* Get the value from a foo(<param_value>) style call */
       
  6652             if (IN_param_value == NULL)
       
  6653               IN_param_value = function_call_param_iterator.next();
       
  6654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6656             
       
  6657             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6658             {
       
  6659         
       
  6660                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6661                 return return_type_symbol;
       
  6662                 
       
  6663             }
       
  6664             
       
  6665             ERROR;
       
  6666         }
       
  6667         
       
  6668     }/*function_time_to_uint*/
       
  6669     break;
       
  6670 
       
  6671 /****
       
  6672  *TIME_TO_UDINT
       
  6673  */
       
  6674     case function_time_to_udint :
       
  6675     {
       
  6676         symbol_c *last_type_symbol = NULL;
       
  6677 
       
  6678         {
       
  6679             identifier_c param_name("IN");
       
  6680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6682             
       
  6683             /* Get the value from a foo(<param_value>) style call */
       
  6684             if (IN_param_value == NULL)
       
  6685               IN_param_value = function_call_param_iterator.next();
       
  6686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6688             
       
  6689             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6690             {
       
  6691         
       
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6693                 return return_type_symbol;
       
  6694                 
       
  6695             }
       
  6696             
       
  6697             ERROR;
       
  6698         }
       
  6699         
       
  6700     }/*function_time_to_udint*/
       
  6701     break;
       
  6702 
       
  6703 /****
       
  6704  *TIME_TO_ULINT
       
  6705  */
       
  6706     case function_time_to_ulint :
       
  6707     {
       
  6708         symbol_c *last_type_symbol = NULL;
       
  6709 
       
  6710         {
       
  6711             identifier_c param_name("IN");
       
  6712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6714             
       
  6715             /* Get the value from a foo(<param_value>) style call */
       
  6716             if (IN_param_value == NULL)
       
  6717               IN_param_value = function_call_param_iterator.next();
       
  6718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6720             
       
  6721             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6722             {
       
  6723         
       
  6724                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6725                 return return_type_symbol;
       
  6726                 
       
  6727             }
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_time_to_ulint*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *TIME_TO_BOOL
       
  6737  */
       
  6738     case function_time_to_bool :
       
  6739     {
       
  6740         symbol_c *last_type_symbol = NULL;
       
  6741 
       
  6742         {
       
  6743             identifier_c param_name("IN");
       
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6746             
       
  6747             /* Get the value from a foo(<param_value>) style call */
       
  6748             if (IN_param_value == NULL)
       
  6749               IN_param_value = function_call_param_iterator.next();
       
  6750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6752             
       
  6753             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6754             {
       
  6755         
       
  6756                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6757                 return return_type_symbol;
       
  6758                 
       
  6759             }
       
  6760             
       
  6761             ERROR;
       
  6762         }
       
  6763         
       
  6764     }/*function_time_to_bool*/
       
  6765     break;
       
  6766 
       
  6767 /****
       
  6768  *TIME_TO_BYTE
       
  6769  */
       
  6770     case function_time_to_byte :
       
  6771     {
       
  6772         symbol_c *last_type_symbol = NULL;
       
  6773 
       
  6774         {
       
  6775             identifier_c param_name("IN");
       
  6776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6778             
       
  6779             /* Get the value from a foo(<param_value>) style call */
       
  6780             if (IN_param_value == NULL)
       
  6781               IN_param_value = function_call_param_iterator.next();
       
  6782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6784             
       
  6785             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6786             {
       
  6787         
       
  6788                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6789                 return return_type_symbol;
       
  6790                 
       
  6791             }
       
  6792             
       
  6793             ERROR;
       
  6794         }
       
  6795         
       
  6796     }/*function_time_to_byte*/
       
  6797     break;
       
  6798 
       
  6799 /****
       
  6800  *TIME_TO_WORD
       
  6801  */
       
  6802     case function_time_to_word :
       
  6803     {
       
  6804         symbol_c *last_type_symbol = NULL;
       
  6805 
       
  6806         {
       
  6807             identifier_c param_name("IN");
       
  6808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6810             
       
  6811             /* Get the value from a foo(<param_value>) style call */
       
  6812             if (IN_param_value == NULL)
       
  6813               IN_param_value = function_call_param_iterator.next();
       
  6814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6816             
       
  6817             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6818             {
       
  6819         
       
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6821                 return return_type_symbol;
       
  6822                 
       
  6823             }
       
  6824             
       
  6825             ERROR;
       
  6826         }
       
  6827         
       
  6828     }/*function_time_to_word*/
       
  6829     break;
       
  6830 
       
  6831 /****
       
  6832  *TIME_TO_DWORD
       
  6833  */
       
  6834     case function_time_to_dword :
       
  6835     {
       
  6836         symbol_c *last_type_symbol = NULL;
       
  6837 
       
  6838         {
       
  6839             identifier_c param_name("IN");
       
  6840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6842             
       
  6843             /* Get the value from a foo(<param_value>) style call */
       
  6844             if (IN_param_value == NULL)
       
  6845               IN_param_value = function_call_param_iterator.next();
       
  6846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6848             
       
  6849             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6850             {
       
  6851         
       
  6852                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6853                 return return_type_symbol;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             ERROR;
       
  6858         }
       
  6859         
       
  6860     }/*function_time_to_dword*/
       
  6861     break;
       
  6862 
       
  6863 /****
       
  6864  *TIME_TO_LWORD
       
  6865  */
       
  6866     case function_time_to_lword :
       
  6867     {
       
  6868         symbol_c *last_type_symbol = NULL;
       
  6869 
       
  6870         {
       
  6871             identifier_c param_name("IN");
       
  6872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6874             
       
  6875             /* Get the value from a foo(<param_value>) style call */
       
  6876             if (IN_param_value == NULL)
       
  6877               IN_param_value = function_call_param_iterator.next();
       
  6878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6880             
       
  6881             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6882             {
       
  6883         
       
  6884                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6885                 return return_type_symbol;
       
  6886                 
       
  6887             }
       
  6888             
       
  6889             ERROR;
       
  6890         }
       
  6891         
       
  6892     }/*function_time_to_lword*/
       
  6893     break;
       
  6894 
       
  6895 /****
       
  6896  *TIME_TO_STRING
       
  6897  */
       
  6898     case function_time_to_string :
       
  6899     {
       
  6900         symbol_c *last_type_symbol = NULL;
       
  6901 
       
  6902         {
       
  6903             identifier_c param_name("IN");
       
  6904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6906             
       
  6907             /* Get the value from a foo(<param_value>) style call */
       
  6908             if (IN_param_value == NULL)
       
  6909               IN_param_value = function_call_param_iterator.next();
       
  6910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6912             
       
  6913             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6914             {
       
  6915         
       
  6916                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6917                 return return_type_symbol;
       
  6918                 
       
  6919             }
       
  6920             
       
  6921             ERROR;
       
  6922         }
       
  6923         
       
  6924     }/*function_time_to_string*/
       
  6925     break;
       
  6926 
       
  6927 /****
       
  6928  *TIME_TO_WSTRING
       
  6929  */
       
  6930     case function_time_to_wstring :
       
  6931     {
       
  6932         symbol_c *last_type_symbol = NULL;
       
  6933 
       
  6934         {
       
  6935             identifier_c param_name("IN");
       
  6936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6938             
       
  6939             /* Get the value from a foo(<param_value>) style call */
       
  6940             if (IN_param_value == NULL)
       
  6941               IN_param_value = function_call_param_iterator.next();
       
  6942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6944             
       
  6945             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
  6946             {
       
  6947         
       
  6948                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  6949                 return return_type_symbol;
       
  6950                 
       
  6951             }
       
  6952             
       
  6953             ERROR;
       
  6954         }
       
  6955         
       
  6956     }/*function_time_to_wstring*/
       
  6957     break;
       
  6958 
       
  6959 /****
       
  6960  *BOOL_TO_REAL
       
  6961  */
       
  6962     case function_bool_to_real :
       
  6963     {
       
  6964         symbol_c *last_type_symbol = NULL;
       
  6965 
       
  6966         {
       
  6967             identifier_c param_name("IN");
       
  6968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6970             
       
  6971             /* Get the value from a foo(<param_value>) style call */
       
  6972             if (IN_param_value == NULL)
       
  6973               IN_param_value = function_call_param_iterator.next();
       
  6974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6976             
       
  6977             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  6978             {
       
  6979         
       
  6980                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6981                 return return_type_symbol;
       
  6982                 
       
  6983             }
       
  6984             
       
  6985             ERROR;
       
  6986         }
       
  6987         
       
  6988     }/*function_bool_to_real*/
       
  6989     break;
       
  6990 
       
  6991 /****
       
  6992  *BOOL_TO_LREAL
       
  6993  */
       
  6994     case function_bool_to_lreal :
       
  6995     {
       
  6996         symbol_c *last_type_symbol = NULL;
       
  6997 
       
  6998         {
       
  6999             identifier_c param_name("IN");
       
  7000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7002             
       
  7003             /* Get the value from a foo(<param_value>) style call */
       
  7004             if (IN_param_value == NULL)
       
  7005               IN_param_value = function_call_param_iterator.next();
       
  7006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7008             
       
  7009             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7010             {
       
  7011         
       
  7012                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7013                 return return_type_symbol;
       
  7014                 
       
  7015             }
       
  7016             
       
  7017             ERROR;
       
  7018         }
       
  7019         
       
  7020     }/*function_bool_to_lreal*/
       
  7021     break;
       
  7022 
       
  7023 /****
       
  7024  *BOOL_TO_SINT
       
  7025  */
       
  7026     case function_bool_to_sint :
       
  7027     {
       
  7028         symbol_c *last_type_symbol = NULL;
       
  7029 
       
  7030         {
       
  7031             identifier_c param_name("IN");
       
  7032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7034             
       
  7035             /* Get the value from a foo(<param_value>) style call */
       
  7036             if (IN_param_value == NULL)
       
  7037               IN_param_value = function_call_param_iterator.next();
       
  7038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7040             
       
  7041             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7042             {
       
  7043         
       
  7044                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7045                 return return_type_symbol;
       
  7046                 
       
  7047             }
       
  7048             
       
  7049             ERROR;
       
  7050         }
       
  7051         
       
  7052     }/*function_bool_to_sint*/
       
  7053     break;
       
  7054 
       
  7055 /****
       
  7056  *BOOL_TO_INT
       
  7057  */
       
  7058     case function_bool_to_int :
       
  7059     {
       
  7060         symbol_c *last_type_symbol = NULL;
       
  7061 
       
  7062         {
       
  7063             identifier_c param_name("IN");
       
  7064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7066             
       
  7067             /* Get the value from a foo(<param_value>) style call */
       
  7068             if (IN_param_value == NULL)
       
  7069               IN_param_value = function_call_param_iterator.next();
       
  7070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7072             
       
  7073             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7074             {
       
  7075         
       
  7076                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7077                 return return_type_symbol;
       
  7078                 
       
  7079             }
       
  7080             
       
  7081             ERROR;
       
  7082         }
       
  7083         
       
  7084     }/*function_bool_to_int*/
       
  7085     break;
       
  7086 
       
  7087 /****
       
  7088  *BOOL_TO_DINT
       
  7089  */
       
  7090     case function_bool_to_dint :
       
  7091     {
       
  7092         symbol_c *last_type_symbol = NULL;
       
  7093 
       
  7094         {
       
  7095             identifier_c param_name("IN");
       
  7096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7098             
       
  7099             /* Get the value from a foo(<param_value>) style call */
       
  7100             if (IN_param_value == NULL)
       
  7101               IN_param_value = function_call_param_iterator.next();
       
  7102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7104             
       
  7105             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7106             {
       
  7107         
       
  7108                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7109                 return return_type_symbol;
       
  7110                 
       
  7111             }
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_bool_to_dint*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *BOOL_TO_LINT
       
  7121  */
       
  7122     case function_bool_to_lint :
       
  7123     {
       
  7124         symbol_c *last_type_symbol = NULL;
       
  7125 
       
  7126         {
       
  7127             identifier_c param_name("IN");
       
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7130             
       
  7131             /* Get the value from a foo(<param_value>) style call */
       
  7132             if (IN_param_value == NULL)
       
  7133               IN_param_value = function_call_param_iterator.next();
       
  7134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7136             
       
  7137             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7138             {
       
  7139         
       
  7140                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7141                 return return_type_symbol;
       
  7142                 
       
  7143             }
       
  7144             
       
  7145             ERROR;
       
  7146         }
       
  7147         
       
  7148     }/*function_bool_to_lint*/
       
  7149     break;
       
  7150 
       
  7151 /****
       
  7152  *BOOL_TO_USINT
       
  7153  */
       
  7154     case function_bool_to_usint :
       
  7155     {
       
  7156         symbol_c *last_type_symbol = NULL;
       
  7157 
       
  7158         {
       
  7159             identifier_c param_name("IN");
       
  7160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7162             
       
  7163             /* Get the value from a foo(<param_value>) style call */
       
  7164             if (IN_param_value == NULL)
       
  7165               IN_param_value = function_call_param_iterator.next();
       
  7166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7168             
       
  7169             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7170             {
       
  7171         
       
  7172                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7173                 return return_type_symbol;
       
  7174                 
       
  7175             }
       
  7176             
       
  7177             ERROR;
       
  7178         }
       
  7179         
       
  7180     }/*function_bool_to_usint*/
       
  7181     break;
       
  7182 
       
  7183 /****
       
  7184  *BOOL_TO_UINT
       
  7185  */
       
  7186     case function_bool_to_uint :
       
  7187     {
       
  7188         symbol_c *last_type_symbol = NULL;
       
  7189 
       
  7190         {
       
  7191             identifier_c param_name("IN");
       
  7192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7194             
       
  7195             /* Get the value from a foo(<param_value>) style call */
       
  7196             if (IN_param_value == NULL)
       
  7197               IN_param_value = function_call_param_iterator.next();
       
  7198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7200             
       
  7201             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7202             {
       
  7203         
       
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7205                 return return_type_symbol;
       
  7206                 
       
  7207             }
       
  7208             
       
  7209             ERROR;
       
  7210         }
       
  7211         
       
  7212     }/*function_bool_to_uint*/
       
  7213     break;
       
  7214 
       
  7215 /****
       
  7216  *BOOL_TO_UDINT
       
  7217  */
       
  7218     case function_bool_to_udint :
       
  7219     {
       
  7220         symbol_c *last_type_symbol = NULL;
       
  7221 
       
  7222         {
       
  7223             identifier_c param_name("IN");
       
  7224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7226             
       
  7227             /* Get the value from a foo(<param_value>) style call */
       
  7228             if (IN_param_value == NULL)
       
  7229               IN_param_value = function_call_param_iterator.next();
       
  7230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7232             
       
  7233             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7234             {
       
  7235         
       
  7236                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7237                 return return_type_symbol;
       
  7238                 
       
  7239             }
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_bool_to_udint*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *BOOL_TO_ULINT
       
  7249  */
       
  7250     case function_bool_to_ulint :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = NULL;
       
  7253 
       
  7254         {
       
  7255             identifier_c param_name("IN");
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7258             
       
  7259             /* Get the value from a foo(<param_value>) style call */
       
  7260             if (IN_param_value == NULL)
       
  7261               IN_param_value = function_call_param_iterator.next();
       
  7262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7264             
       
  7265             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7266             {
       
  7267         
       
  7268                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7269                 return return_type_symbol;
       
  7270                 
       
  7271             }
       
  7272             
       
  7273             ERROR;
       
  7274         }
       
  7275         
       
  7276     }/*function_bool_to_ulint*/
       
  7277     break;
       
  7278 
       
  7279 /****
       
  7280  *BOOL_TO_TIME
       
  7281  */
       
  7282     case function_bool_to_time :
       
  7283     {
       
  7284         symbol_c *last_type_symbol = NULL;
       
  7285 
       
  7286         {
       
  7287             identifier_c param_name("IN");
       
  7288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7290             
       
  7291             /* Get the value from a foo(<param_value>) style call */
       
  7292             if (IN_param_value == NULL)
       
  7293               IN_param_value = function_call_param_iterator.next();
       
  7294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7296             
       
  7297             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7298             {
       
  7299         
       
  7300                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7301                 return return_type_symbol;
       
  7302                 
       
  7303             }
       
  7304             
       
  7305             ERROR;
       
  7306         }
       
  7307         
       
  7308     }/*function_bool_to_time*/
       
  7309     break;
       
  7310 
       
  7311 /****
       
  7312  *BOOL_TO_BYTE
       
  7313  */
       
  7314     case function_bool_to_byte :
       
  7315     {
       
  7316         symbol_c *last_type_symbol = NULL;
       
  7317 
       
  7318         {
       
  7319             identifier_c param_name("IN");
       
  7320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7322             
       
  7323             /* Get the value from a foo(<param_value>) style call */
       
  7324             if (IN_param_value == NULL)
       
  7325               IN_param_value = function_call_param_iterator.next();
       
  7326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7328             
       
  7329             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7330             {
       
  7331         
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7333                 return return_type_symbol;
       
  7334                 
       
  7335             }
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_bool_to_byte*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *BOOL_TO_WORD
       
  7345  */
       
  7346     case function_bool_to_word :
       
  7347     {
       
  7348         symbol_c *last_type_symbol = NULL;
       
  7349 
       
  7350         {
       
  7351             identifier_c param_name("IN");
       
  7352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7354             
       
  7355             /* Get the value from a foo(<param_value>) style call */
       
  7356             if (IN_param_value == NULL)
       
  7357               IN_param_value = function_call_param_iterator.next();
       
  7358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7360             
       
  7361             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             ERROR;
       
  7370         }
       
  7371         
       
  7372     }/*function_bool_to_word*/
       
  7373     break;
       
  7374 
       
  7375 /****
       
  7376  *BOOL_TO_DWORD
       
  7377  */
       
  7378     case function_bool_to_dword :
       
  7379     {
       
  7380         symbol_c *last_type_symbol = NULL;
       
  7381 
       
  7382         {
       
  7383             identifier_c param_name("IN");
       
  7384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7386             
       
  7387             /* Get the value from a foo(<param_value>) style call */
       
  7388             if (IN_param_value == NULL)
       
  7389               IN_param_value = function_call_param_iterator.next();
       
  7390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7392             
       
  7393             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7394             {
       
  7395         
       
  7396                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7397                 return return_type_symbol;
       
  7398                 
       
  7399             }
       
  7400             
       
  7401             ERROR;
       
  7402         }
       
  7403         
       
  7404     }/*function_bool_to_dword*/
       
  7405     break;
       
  7406 
       
  7407 /****
       
  7408  *BOOL_TO_LWORD
       
  7409  */
       
  7410     case function_bool_to_lword :
       
  7411     {
       
  7412         symbol_c *last_type_symbol = NULL;
       
  7413 
       
  7414         {
       
  7415             identifier_c param_name("IN");
       
  7416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7418             
       
  7419             /* Get the value from a foo(<param_value>) style call */
       
  7420             if (IN_param_value == NULL)
       
  7421               IN_param_value = function_call_param_iterator.next();
       
  7422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7424             
       
  7425             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7426             {
       
  7427         
       
  7428                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7429                 return return_type_symbol;
       
  7430                 
       
  7431             }
       
  7432             
       
  7433             ERROR;
       
  7434         }
       
  7435         
       
  7436     }/*function_bool_to_lword*/
       
  7437     break;
       
  7438 
       
  7439 /****
       
  7440  *BOOL_TO_STRING
       
  7441  */
       
  7442     case function_bool_to_string :
       
  7443     {
       
  7444         symbol_c *last_type_symbol = NULL;
       
  7445 
       
  7446         {
       
  7447             identifier_c param_name("IN");
       
  7448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7450             
       
  7451             /* Get the value from a foo(<param_value>) style call */
       
  7452             if (IN_param_value == NULL)
       
  7453               IN_param_value = function_call_param_iterator.next();
       
  7454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7456             
       
  7457             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7458             {
       
  7459         
       
  7460                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7461                 return return_type_symbol;
       
  7462                 
       
  7463             }
       
  7464             
       
  7465             ERROR;
       
  7466         }
       
  7467         
       
  7468     }/*function_bool_to_string*/
       
  7469     break;
       
  7470 
       
  7471 /****
       
  7472  *BOOL_TO_WSTRING
       
  7473  */
       
  7474     case function_bool_to_wstring :
       
  7475     {
       
  7476         symbol_c *last_type_symbol = NULL;
       
  7477 
       
  7478         {
       
  7479             identifier_c param_name("IN");
       
  7480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7482             
       
  7483             /* Get the value from a foo(<param_value>) style call */
       
  7484             if (IN_param_value == NULL)
       
  7485               IN_param_value = function_call_param_iterator.next();
       
  7486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7488             
       
  7489             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7490             {
       
  7491         
       
  7492                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  7493                 return return_type_symbol;
       
  7494                 
       
  7495             }
       
  7496             
       
  7497             ERROR;
       
  7498         }
       
  7499         
       
  7500     }/*function_bool_to_wstring*/
       
  7501     break;
       
  7502 
       
  7503 /****
       
  7504  *BOOL_TO_DATE
       
  7505  */
       
  7506     case function_bool_to_date :
       
  7507     {
       
  7508         symbol_c *last_type_symbol = NULL;
       
  7509 
       
  7510         {
       
  7511             identifier_c param_name("IN");
       
  7512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7514             
       
  7515             /* Get the value from a foo(<param_value>) style call */
       
  7516             if (IN_param_value == NULL)
       
  7517               IN_param_value = function_call_param_iterator.next();
       
  7518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7520             
       
  7521             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7522             {
       
  7523         
       
  7524                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7525                 return return_type_symbol;
       
  7526                 
       
  7527             }
       
  7528             
       
  7529             ERROR;
       
  7530         }
       
  7531         
       
  7532     }/*function_bool_to_date*/
       
  7533     break;
       
  7534 
       
  7535 /****
       
  7536  *BOOL_TO_TOD
       
  7537  */
       
  7538     case function_bool_to_tod :
       
  7539     {
       
  7540         symbol_c *last_type_symbol = NULL;
       
  7541 
       
  7542         {
       
  7543             identifier_c param_name("IN");
       
  7544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7546             
       
  7547             /* Get the value from a foo(<param_value>) style call */
       
  7548             if (IN_param_value == NULL)
       
  7549               IN_param_value = function_call_param_iterator.next();
       
  7550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7552             
       
  7553             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7554             {
       
  7555         
       
  7556                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7557                 return return_type_symbol;
       
  7558                 
       
  7559             }
       
  7560             
       
  7561             ERROR;
       
  7562         }
       
  7563         
       
  7564     }/*function_bool_to_tod*/
       
  7565     break;
       
  7566 
       
  7567 /****
       
  7568  *BOOL_TO_DT
       
  7569  */
       
  7570     case function_bool_to_dt :
       
  7571     {
       
  7572         symbol_c *last_type_symbol = NULL;
       
  7573 
       
  7574         {
       
  7575             identifier_c param_name("IN");
       
  7576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7578             
       
  7579             /* Get the value from a foo(<param_value>) style call */
       
  7580             if (IN_param_value == NULL)
       
  7581               IN_param_value = function_call_param_iterator.next();
       
  7582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7584             
       
  7585             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
  7586             {
       
  7587         
       
  7588                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7589                 return return_type_symbol;
       
  7590                 
       
  7591             }
       
  7592             
       
  7593             ERROR;
       
  7594         }
       
  7595         
       
  7596     }/*function_bool_to_dt*/
       
  7597     break;
       
  7598 
       
  7599 /****
       
  7600  *BYTE_TO_REAL
       
  7601  */
       
  7602     case function_byte_to_real :
       
  7603     {
       
  7604         symbol_c *last_type_symbol = NULL;
       
  7605 
       
  7606         {
       
  7607             identifier_c param_name("IN");
       
  7608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7610             
       
  7611             /* Get the value from a foo(<param_value>) style call */
       
  7612             if (IN_param_value == NULL)
       
  7613               IN_param_value = function_call_param_iterator.next();
       
  7614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7616             
       
  7617             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7618             {
       
  7619         
       
  7620                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7621                 return return_type_symbol;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             ERROR;
       
  7626         }
       
  7627         
       
  7628     }/*function_byte_to_real*/
       
  7629     break;
       
  7630 
       
  7631 /****
       
  7632  *BYTE_TO_LREAL
       
  7633  */
       
  7634     case function_byte_to_lreal :
       
  7635     {
       
  7636         symbol_c *last_type_symbol = NULL;
       
  7637 
       
  7638         {
       
  7639             identifier_c param_name("IN");
       
  7640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7642             
       
  7643             /* Get the value from a foo(<param_value>) style call */
       
  7644             if (IN_param_value == NULL)
       
  7645               IN_param_value = function_call_param_iterator.next();
       
  7646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7648             
       
  7649             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7650             {
       
  7651         
       
  7652                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7653                 return return_type_symbol;
       
  7654                 
       
  7655             }
       
  7656             
       
  7657             ERROR;
       
  7658         }
       
  7659         
       
  7660     }/*function_byte_to_lreal*/
       
  7661     break;
       
  7662 
       
  7663 /****
       
  7664  *BYTE_TO_SINT
       
  7665  */
       
  7666     case function_byte_to_sint :
       
  7667     {
       
  7668         symbol_c *last_type_symbol = NULL;
       
  7669 
       
  7670         {
       
  7671             identifier_c param_name("IN");
       
  7672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7674             
       
  7675             /* Get the value from a foo(<param_value>) style call */
       
  7676             if (IN_param_value == NULL)
       
  7677               IN_param_value = function_call_param_iterator.next();
       
  7678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7680             
       
  7681             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7682             {
       
  7683         
       
  7684                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7685                 return return_type_symbol;
       
  7686                 
       
  7687             }
       
  7688             
       
  7689             ERROR;
       
  7690         }
       
  7691         
       
  7692     }/*function_byte_to_sint*/
       
  7693     break;
       
  7694 
       
  7695 /****
       
  7696  *BYTE_TO_INT
       
  7697  */
       
  7698     case function_byte_to_int :
       
  7699     {
       
  7700         symbol_c *last_type_symbol = NULL;
       
  7701 
       
  7702         {
       
  7703             identifier_c param_name("IN");
       
  7704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7706             
       
  7707             /* Get the value from a foo(<param_value>) style call */
       
  7708             if (IN_param_value == NULL)
       
  7709               IN_param_value = function_call_param_iterator.next();
       
  7710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7712             
       
  7713             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7714             {
       
  7715         
       
  7716                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7717                 return return_type_symbol;
       
  7718                 
       
  7719             }
       
  7720             
       
  7721             ERROR;
       
  7722         }
       
  7723         
       
  7724     }/*function_byte_to_int*/
       
  7725     break;
       
  7726 
       
  7727 /****
       
  7728  *BYTE_TO_DINT
       
  7729  */
       
  7730     case function_byte_to_dint :
       
  7731     {
       
  7732         symbol_c *last_type_symbol = NULL;
       
  7733 
       
  7734         {
       
  7735             identifier_c param_name("IN");
       
  7736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7738             
       
  7739             /* Get the value from a foo(<param_value>) style call */
       
  7740             if (IN_param_value == NULL)
       
  7741               IN_param_value = function_call_param_iterator.next();
       
  7742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7744             
       
  7745             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7746             {
       
  7747         
       
  7748                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7749                 return return_type_symbol;
       
  7750                 
       
  7751             }
       
  7752             
       
  7753             ERROR;
       
  7754         }
       
  7755         
       
  7756     }/*function_byte_to_dint*/
       
  7757     break;
       
  7758 
       
  7759 /****
       
  7760  *BYTE_TO_LINT
       
  7761  */
       
  7762     case function_byte_to_lint :
       
  7763     {
       
  7764         symbol_c *last_type_symbol = NULL;
       
  7765 
       
  7766         {
       
  7767             identifier_c param_name("IN");
       
  7768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next();
       
  7774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7776             
       
  7777             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7778             {
       
  7779         
       
  7780                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7781                 return return_type_symbol;
       
  7782                 
       
  7783             }
       
  7784             
       
  7785             ERROR;
       
  7786         }
       
  7787         
       
  7788     }/*function_byte_to_lint*/
       
  7789     break;
       
  7790 
       
  7791 /****
       
  7792  *BYTE_TO_USINT
       
  7793  */
       
  7794     case function_byte_to_usint :
       
  7795     {
       
  7796         symbol_c *last_type_symbol = NULL;
       
  7797 
       
  7798         {
       
  7799             identifier_c param_name("IN");
       
  7800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7802             
       
  7803             /* Get the value from a foo(<param_value>) style call */
       
  7804             if (IN_param_value == NULL)
       
  7805               IN_param_value = function_call_param_iterator.next();
       
  7806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7808             
       
  7809             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7810             {
       
  7811         
       
  7812                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7813                 return return_type_symbol;
       
  7814                 
       
  7815             }
       
  7816             
       
  7817             ERROR;
       
  7818         }
       
  7819         
       
  7820     }/*function_byte_to_usint*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *BYTE_TO_UINT
       
  7825  */
       
  7826     case function_byte_to_uint :
       
  7827     {
       
  7828         symbol_c *last_type_symbol = NULL;
       
  7829 
       
  7830         {
       
  7831             identifier_c param_name("IN");
       
  7832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7834             
       
  7835             /* Get the value from a foo(<param_value>) style call */
       
  7836             if (IN_param_value == NULL)
       
  7837               IN_param_value = function_call_param_iterator.next();
       
  7838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7840             
       
  7841             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7842             {
       
  7843         
       
  7844                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7845                 return return_type_symbol;
       
  7846                 
       
  7847             }
       
  7848             
       
  7849             ERROR;
       
  7850         }
       
  7851         
       
  7852     }/*function_byte_to_uint*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *BYTE_TO_UDINT
       
  7857  */
       
  7858     case function_byte_to_udint :
       
  7859     {
       
  7860         symbol_c *last_type_symbol = NULL;
       
  7861 
       
  7862         {
       
  7863             identifier_c param_name("IN");
       
  7864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7866             
       
  7867             /* Get the value from a foo(<param_value>) style call */
       
  7868             if (IN_param_value == NULL)
       
  7869               IN_param_value = function_call_param_iterator.next();
       
  7870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7872             
       
  7873             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7874             {
       
  7875         
       
  7876                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7877                 return return_type_symbol;
       
  7878                 
       
  7879             }
       
  7880             
       
  7881             ERROR;
       
  7882         }
       
  7883         
       
  7884     }/*function_byte_to_udint*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *BYTE_TO_ULINT
       
  7889  */
       
  7890     case function_byte_to_ulint :
       
  7891     {
       
  7892         symbol_c *last_type_symbol = NULL;
       
  7893 
       
  7894         {
       
  7895             identifier_c param_name("IN");
       
  7896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7898             
       
  7899             /* Get the value from a foo(<param_value>) style call */
       
  7900             if (IN_param_value == NULL)
       
  7901               IN_param_value = function_call_param_iterator.next();
       
  7902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7904             
       
  7905             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7906             {
       
  7907         
       
  7908                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7909                 return return_type_symbol;
       
  7910                 
       
  7911             }
       
  7912             
       
  7913             ERROR;
       
  7914         }
       
  7915         
       
  7916     }/*function_byte_to_ulint*/
       
  7917     break;
       
  7918 
       
  7919 /****
       
  7920  *BYTE_TO_TIME
       
  7921  */
       
  7922     case function_byte_to_time :
       
  7923     {
       
  7924         symbol_c *last_type_symbol = NULL;
       
  7925 
       
  7926         {
       
  7927             identifier_c param_name("IN");
       
  7928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7930             
       
  7931             /* Get the value from a foo(<param_value>) style call */
       
  7932             if (IN_param_value == NULL)
       
  7933               IN_param_value = function_call_param_iterator.next();
       
  7934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7936             
       
  7937             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7938             {
       
  7939         
       
  7940                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7941                 return return_type_symbol;
       
  7942                 
       
  7943             }
       
  7944             
       
  7945             ERROR;
       
  7946         }
       
  7947         
       
  7948     }/*function_byte_to_time*/
       
  7949     break;
       
  7950 
       
  7951 /****
       
  7952  *BYTE_TO_BOOL
       
  7953  */
       
  7954     case function_byte_to_bool :
       
  7955     {
       
  7956         symbol_c *last_type_symbol = NULL;
       
  7957 
       
  7958         {
       
  7959             identifier_c param_name("IN");
       
  7960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7962             
       
  7963             /* Get the value from a foo(<param_value>) style call */
       
  7964             if (IN_param_value == NULL)
       
  7965               IN_param_value = function_call_param_iterator.next();
       
  7966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7968             
       
  7969             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  7970             {
       
  7971         
       
  7972                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7973                 return return_type_symbol;
       
  7974                 
       
  7975             }
       
  7976             
       
  7977             ERROR;
       
  7978         }
       
  7979         
       
  7980     }/*function_byte_to_bool*/
       
  7981     break;
       
  7982 
       
  7983 /****
       
  7984  *BYTE_TO_WORD
       
  7985  */
       
  7986     case function_byte_to_word :
       
  7987     {
       
  7988         symbol_c *last_type_symbol = NULL;
       
  7989 
       
  7990         {
       
  7991             identifier_c param_name("IN");
       
  7992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7994             
       
  7995             /* Get the value from a foo(<param_value>) style call */
       
  7996             if (IN_param_value == NULL)
       
  7997               IN_param_value = function_call_param_iterator.next();
       
  7998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8000             
       
  8001             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8002             {
       
  8003         
       
  8004                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8005                 return return_type_symbol;
       
  8006                 
       
  8007             }
       
  8008             
       
  8009             ERROR;
       
  8010         }
       
  8011         
       
  8012     }/*function_byte_to_word*/
       
  8013     break;
       
  8014 
       
  8015 /****
       
  8016  *BYTE_TO_DWORD
       
  8017  */
       
  8018     case function_byte_to_dword :
       
  8019     {
       
  8020         symbol_c *last_type_symbol = NULL;
       
  8021 
       
  8022         {
       
  8023             identifier_c param_name("IN");
       
  8024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8026             
       
  8027             /* Get the value from a foo(<param_value>) style call */
       
  8028             if (IN_param_value == NULL)
       
  8029               IN_param_value = function_call_param_iterator.next();
       
  8030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8032             
       
  8033             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8034             {
       
  8035         
       
  8036                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8037                 return return_type_symbol;
       
  8038                 
       
  8039             }
       
  8040             
       
  8041             ERROR;
       
  8042         }
       
  8043         
       
  8044     }/*function_byte_to_dword*/
       
  8045     break;
       
  8046 
       
  8047 /****
       
  8048  *BYTE_TO_LWORD
       
  8049  */
       
  8050     case function_byte_to_lword :
       
  8051     {
       
  8052         symbol_c *last_type_symbol = NULL;
       
  8053 
       
  8054         {
       
  8055             identifier_c param_name("IN");
       
  8056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8058             
       
  8059             /* Get the value from a foo(<param_value>) style call */
       
  8060             if (IN_param_value == NULL)
       
  8061               IN_param_value = function_call_param_iterator.next();
       
  8062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8064             
       
  8065             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8066             {
       
  8067         
       
  8068                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8069                 return return_type_symbol;
       
  8070                 
       
  8071             }
       
  8072             
       
  8073             ERROR;
       
  8074         }
       
  8075         
       
  8076     }/*function_byte_to_lword*/
       
  8077     break;
       
  8078 
       
  8079 /****
       
  8080  *BYTE_TO_STRING
       
  8081  */
       
  8082     case function_byte_to_string :
       
  8083     {
       
  8084         symbol_c *last_type_symbol = NULL;
       
  8085 
       
  8086         {
       
  8087             identifier_c param_name("IN");
       
  8088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8090             
       
  8091             /* Get the value from a foo(<param_value>) style call */
       
  8092             if (IN_param_value == NULL)
       
  8093               IN_param_value = function_call_param_iterator.next();
       
  8094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8096             
       
  8097             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8098             {
       
  8099         
       
  8100                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8101                 return return_type_symbol;
       
  8102                 
       
  8103             }
       
  8104             
       
  8105             ERROR;
       
  8106         }
       
  8107         
       
  8108     }/*function_byte_to_string*/
       
  8109     break;
       
  8110 
       
  8111 /****
       
  8112  *BYTE_TO_WSTRING
       
  8113  */
       
  8114     case function_byte_to_wstring :
       
  8115     {
       
  8116         symbol_c *last_type_symbol = NULL;
       
  8117 
       
  8118         {
       
  8119             identifier_c param_name("IN");
       
  8120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8122             
       
  8123             /* Get the value from a foo(<param_value>) style call */
       
  8124             if (IN_param_value == NULL)
       
  8125               IN_param_value = function_call_param_iterator.next();
       
  8126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8128             
       
  8129             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8130             {
       
  8131         
       
  8132                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8133                 return return_type_symbol;
       
  8134                 
       
  8135             }
       
  8136             
       
  8137             ERROR;
       
  8138         }
       
  8139         
       
  8140     }/*function_byte_to_wstring*/
       
  8141     break;
       
  8142 
       
  8143 /****
       
  8144  *BYTE_TO_DATE
       
  8145  */
       
  8146     case function_byte_to_date :
       
  8147     {
       
  8148         symbol_c *last_type_symbol = NULL;
       
  8149 
       
  8150         {
       
  8151             identifier_c param_name("IN");
       
  8152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8154             
       
  8155             /* Get the value from a foo(<param_value>) style call */
       
  8156             if (IN_param_value == NULL)
       
  8157               IN_param_value = function_call_param_iterator.next();
       
  8158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8160             
       
  8161             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8162             {
       
  8163         
       
  8164                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8165                 return return_type_symbol;
       
  8166                 
       
  8167             }
       
  8168             
       
  8169             ERROR;
       
  8170         }
       
  8171         
       
  8172     }/*function_byte_to_date*/
       
  8173     break;
       
  8174 
       
  8175 /****
       
  8176  *BYTE_TO_TOD
       
  8177  */
       
  8178     case function_byte_to_tod :
       
  8179     {
       
  8180         symbol_c *last_type_symbol = NULL;
       
  8181 
       
  8182         {
       
  8183             identifier_c param_name("IN");
       
  8184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8186             
       
  8187             /* Get the value from a foo(<param_value>) style call */
       
  8188             if (IN_param_value == NULL)
       
  8189               IN_param_value = function_call_param_iterator.next();
       
  8190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8192             
       
  8193             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8194             {
       
  8195         
       
  8196                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8197                 return return_type_symbol;
       
  8198                 
       
  8199             }
       
  8200             
       
  8201             ERROR;
       
  8202         }
       
  8203         
       
  8204     }/*function_byte_to_tod*/
       
  8205     break;
       
  8206 
       
  8207 /****
       
  8208  *BYTE_TO_DT
       
  8209  */
       
  8210     case function_byte_to_dt :
       
  8211     {
       
  8212         symbol_c *last_type_symbol = NULL;
       
  8213 
       
  8214         {
       
  8215             identifier_c param_name("IN");
       
  8216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8218             
       
  8219             /* Get the value from a foo(<param_value>) style call */
       
  8220             if (IN_param_value == NULL)
       
  8221               IN_param_value = function_call_param_iterator.next();
       
  8222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8224             
       
  8225             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  8226             {
       
  8227         
       
  8228                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8229                 return return_type_symbol;
       
  8230                 
       
  8231             }
       
  8232             
       
  8233             ERROR;
       
  8234         }
       
  8235         
       
  8236     }/*function_byte_to_dt*/
       
  8237     break;
       
  8238 
       
  8239 /****
       
  8240  *WORD_TO_REAL
       
  8241  */
       
  8242     case function_word_to_real :
       
  8243     {
       
  8244         symbol_c *last_type_symbol = NULL;
       
  8245 
       
  8246         {
       
  8247             identifier_c param_name("IN");
       
  8248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8250             
       
  8251             /* Get the value from a foo(<param_value>) style call */
       
  8252             if (IN_param_value == NULL)
       
  8253               IN_param_value = function_call_param_iterator.next();
       
  8254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8256             
       
  8257             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8258             {
       
  8259         
       
  8260                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8261                 return return_type_symbol;
       
  8262                 
       
  8263             }
       
  8264             
       
  8265             ERROR;
       
  8266         }
       
  8267         
       
  8268     }/*function_word_to_real*/
       
  8269     break;
       
  8270 
       
  8271 /****
       
  8272  *WORD_TO_LREAL
       
  8273  */
       
  8274     case function_word_to_lreal :
       
  8275     {
       
  8276         symbol_c *last_type_symbol = NULL;
       
  8277 
       
  8278         {
       
  8279             identifier_c param_name("IN");
       
  8280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8282             
       
  8283             /* Get the value from a foo(<param_value>) style call */
       
  8284             if (IN_param_value == NULL)
       
  8285               IN_param_value = function_call_param_iterator.next();
       
  8286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8288             
       
  8289             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8290             {
       
  8291         
       
  8292                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8293                 return return_type_symbol;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             ERROR;
       
  8298         }
       
  8299         
       
  8300     }/*function_word_to_lreal*/
       
  8301     break;
       
  8302 
       
  8303 /****
       
  8304  *WORD_TO_SINT
       
  8305  */
       
  8306     case function_word_to_sint :
       
  8307     {
       
  8308         symbol_c *last_type_symbol = NULL;
       
  8309 
       
  8310         {
       
  8311             identifier_c param_name("IN");
       
  8312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8314             
       
  8315             /* Get the value from a foo(<param_value>) style call */
       
  8316             if (IN_param_value == NULL)
       
  8317               IN_param_value = function_call_param_iterator.next();
       
  8318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8320             
       
  8321             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8322             {
       
  8323         
       
  8324                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8325                 return return_type_symbol;
       
  8326                 
       
  8327             }
       
  8328             
       
  8329             ERROR;
       
  8330         }
       
  8331         
       
  8332     }/*function_word_to_sint*/
       
  8333     break;
       
  8334 
       
  8335 /****
       
  8336  *WORD_TO_INT
       
  8337  */
       
  8338     case function_word_to_int :
       
  8339     {
       
  8340         symbol_c *last_type_symbol = NULL;
       
  8341 
       
  8342         {
       
  8343             identifier_c param_name("IN");
       
  8344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8346             
       
  8347             /* Get the value from a foo(<param_value>) style call */
       
  8348             if (IN_param_value == NULL)
       
  8349               IN_param_value = function_call_param_iterator.next();
       
  8350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8352             
       
  8353             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8354             {
       
  8355         
       
  8356                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8357                 return return_type_symbol;
       
  8358                 
       
  8359             }
       
  8360             
       
  8361             ERROR;
       
  8362         }
       
  8363         
       
  8364     }/*function_word_to_int*/
       
  8365     break;
       
  8366 
       
  8367 /****
       
  8368  *WORD_TO_DINT
       
  8369  */
       
  8370     case function_word_to_dint :
       
  8371     {
       
  8372         symbol_c *last_type_symbol = NULL;
       
  8373 
       
  8374         {
       
  8375             identifier_c param_name("IN");
       
  8376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8378             
       
  8379             /* Get the value from a foo(<param_value>) style call */
       
  8380             if (IN_param_value == NULL)
       
  8381               IN_param_value = function_call_param_iterator.next();
       
  8382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8384             
       
  8385             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8386             {
       
  8387         
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8389                 return return_type_symbol;
       
  8390                 
       
  8391             }
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_word_to_dint*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *WORD_TO_LINT
       
  8401  */
       
  8402     case function_word_to_lint :
       
  8403     {
       
  8404         symbol_c *last_type_symbol = NULL;
       
  8405 
       
  8406         {
       
  8407             identifier_c param_name("IN");
       
  8408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8410             
       
  8411             /* Get the value from a foo(<param_value>) style call */
       
  8412             if (IN_param_value == NULL)
       
  8413               IN_param_value = function_call_param_iterator.next();
       
  8414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8416             
       
  8417             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_word_to_lint*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *WORD_TO_USINT
       
  8433  */
       
  8434     case function_word_to_usint :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = NULL;
       
  8437 
       
  8438         {
       
  8439             identifier_c param_name("IN");
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8442             
       
  8443             /* Get the value from a foo(<param_value>) style call */
       
  8444             if (IN_param_value == NULL)
       
  8445               IN_param_value = function_call_param_iterator.next();
       
  8446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8448             
       
  8449             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8453                 return return_type_symbol;
       
  8454                 
       
  8455             }
       
  8456             
       
  8457             ERROR;
       
  8458         }
       
  8459         
       
  8460     }/*function_word_to_usint*/
       
  8461     break;
       
  8462 
       
  8463 /****
       
  8464  *WORD_TO_UINT
       
  8465  */
       
  8466     case function_word_to_uint :
       
  8467     {
       
  8468         symbol_c *last_type_symbol = NULL;
       
  8469 
       
  8470         {
       
  8471             identifier_c param_name("IN");
       
  8472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8474             
       
  8475             /* Get the value from a foo(<param_value>) style call */
       
  8476             if (IN_param_value == NULL)
       
  8477               IN_param_value = function_call_param_iterator.next();
       
  8478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8480             
       
  8481             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8482             {
       
  8483         
       
  8484                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8485                 return return_type_symbol;
       
  8486                 
       
  8487             }
       
  8488             
       
  8489             ERROR;
       
  8490         }
       
  8491         
       
  8492     }/*function_word_to_uint*/
       
  8493     break;
       
  8494 
       
  8495 /****
       
  8496  *WORD_TO_UDINT
       
  8497  */
       
  8498     case function_word_to_udint :
       
  8499     {
       
  8500         symbol_c *last_type_symbol = NULL;
       
  8501 
       
  8502         {
       
  8503             identifier_c param_name("IN");
       
  8504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8506             
       
  8507             /* Get the value from a foo(<param_value>) style call */
       
  8508             if (IN_param_value == NULL)
       
  8509               IN_param_value = function_call_param_iterator.next();
       
  8510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8512             
       
  8513             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8514             {
       
  8515         
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8517                 return return_type_symbol;
       
  8518                 
       
  8519             }
       
  8520             
       
  8521             ERROR;
       
  8522         }
       
  8523         
       
  8524     }/*function_word_to_udint*/
       
  8525     break;
       
  8526 
       
  8527 /****
       
  8528  *WORD_TO_ULINT
       
  8529  */
       
  8530     case function_word_to_ulint :
       
  8531     {
       
  8532         symbol_c *last_type_symbol = NULL;
       
  8533 
       
  8534         {
       
  8535             identifier_c param_name("IN");
       
  8536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8538             
       
  8539             /* Get the value from a foo(<param_value>) style call */
       
  8540             if (IN_param_value == NULL)
       
  8541               IN_param_value = function_call_param_iterator.next();
       
  8542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8544             
       
  8545             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8546             {
       
  8547         
       
  8548                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8549                 return return_type_symbol;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             ERROR;
       
  8554         }
       
  8555         
       
  8556     }/*function_word_to_ulint*/
       
  8557     break;
       
  8558 
       
  8559 /****
       
  8560  *WORD_TO_TIME
       
  8561  */
       
  8562     case function_word_to_time :
       
  8563     {
       
  8564         symbol_c *last_type_symbol = NULL;
       
  8565 
       
  8566         {
       
  8567             identifier_c param_name("IN");
       
  8568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8570             
       
  8571             /* Get the value from a foo(<param_value>) style call */
       
  8572             if (IN_param_value == NULL)
       
  8573               IN_param_value = function_call_param_iterator.next();
       
  8574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8576             
       
  8577             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8578             {
       
  8579         
       
  8580                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8581                 return return_type_symbol;
       
  8582                 
       
  8583             }
       
  8584             
       
  8585             ERROR;
       
  8586         }
       
  8587         
       
  8588     }/*function_word_to_time*/
       
  8589     break;
       
  8590 
       
  8591 /****
       
  8592  *WORD_TO_BOOL
       
  8593  */
       
  8594     case function_word_to_bool :
       
  8595     {
       
  8596         symbol_c *last_type_symbol = NULL;
       
  8597 
       
  8598         {
       
  8599             identifier_c param_name("IN");
       
  8600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8602             
       
  8603             /* Get the value from a foo(<param_value>) style call */
       
  8604             if (IN_param_value == NULL)
       
  8605               IN_param_value = function_call_param_iterator.next();
       
  8606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8608             
       
  8609             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8610             {
       
  8611         
       
  8612                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8613                 return return_type_symbol;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_word_to_bool*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *WORD_TO_BYTE
       
  8625  */
       
  8626     case function_word_to_byte :
       
  8627     {
       
  8628         symbol_c *last_type_symbol = NULL;
       
  8629 
       
  8630         {
       
  8631             identifier_c param_name("IN");
       
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8634             
       
  8635             /* Get the value from a foo(<param_value>) style call */
       
  8636             if (IN_param_value == NULL)
       
  8637               IN_param_value = function_call_param_iterator.next();
       
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8640             
       
  8641             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8645                 return return_type_symbol;
       
  8646                 
       
  8647             }
       
  8648             
       
  8649             ERROR;
       
  8650         }
       
  8651         
       
  8652     }/*function_word_to_byte*/
       
  8653     break;
       
  8654 
       
  8655 /****
       
  8656  *WORD_TO_DWORD
       
  8657  */
       
  8658     case function_word_to_dword :
       
  8659     {
       
  8660         symbol_c *last_type_symbol = NULL;
       
  8661 
       
  8662         {
       
  8663             identifier_c param_name("IN");
       
  8664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8666             
       
  8667             /* Get the value from a foo(<param_value>) style call */
       
  8668             if (IN_param_value == NULL)
       
  8669               IN_param_value = function_call_param_iterator.next();
       
  8670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8672             
       
  8673             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8674             {
       
  8675         
       
  8676                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8677                 return return_type_symbol;
       
  8678                 
       
  8679             }
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_word_to_dword*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *WORD_TO_LWORD
       
  8689  */
       
  8690     case function_word_to_lword :
       
  8691     {
       
  8692         symbol_c *last_type_symbol = NULL;
       
  8693 
       
  8694         {
       
  8695             identifier_c param_name("IN");
       
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8698             
       
  8699             /* Get the value from a foo(<param_value>) style call */
       
  8700             if (IN_param_value == NULL)
       
  8701               IN_param_value = function_call_param_iterator.next();
       
  8702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8704             
       
  8705             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8706             {
       
  8707         
       
  8708                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8709                 return return_type_symbol;
       
  8710                 
       
  8711             }
       
  8712             
       
  8713             ERROR;
       
  8714         }
       
  8715         
       
  8716     }/*function_word_to_lword*/
       
  8717     break;
       
  8718 
       
  8719 /****
       
  8720  *WORD_TO_STRING
       
  8721  */
       
  8722     case function_word_to_string :
       
  8723     {
       
  8724         symbol_c *last_type_symbol = NULL;
       
  8725 
       
  8726         {
       
  8727             identifier_c param_name("IN");
       
  8728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8730             
       
  8731             /* Get the value from a foo(<param_value>) style call */
       
  8732             if (IN_param_value == NULL)
       
  8733               IN_param_value = function_call_param_iterator.next();
       
  8734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8736             
       
  8737             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8738             {
       
  8739         
       
  8740                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8741                 return return_type_symbol;
       
  8742                 
       
  8743             }
       
  8744             
       
  8745             ERROR;
       
  8746         }
       
  8747         
       
  8748     }/*function_word_to_string*/
       
  8749     break;
       
  8750 
       
  8751 /****
       
  8752  *WORD_TO_WSTRING
       
  8753  */
       
  8754     case function_word_to_wstring :
       
  8755     {
       
  8756         symbol_c *last_type_symbol = NULL;
       
  8757 
       
  8758         {
       
  8759             identifier_c param_name("IN");
       
  8760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8762             
       
  8763             /* Get the value from a foo(<param_value>) style call */
       
  8764             if (IN_param_value == NULL)
       
  8765               IN_param_value = function_call_param_iterator.next();
       
  8766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8768             
       
  8769             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8770             {
       
  8771         
       
  8772                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  8773                 return return_type_symbol;
       
  8774                 
       
  8775             }
       
  8776             
       
  8777             ERROR;
       
  8778         }
       
  8779         
       
  8780     }/*function_word_to_wstring*/
       
  8781     break;
       
  8782 
       
  8783 /****
       
  8784  *WORD_TO_DATE
       
  8785  */
       
  8786     case function_word_to_date :
       
  8787     {
       
  8788         symbol_c *last_type_symbol = NULL;
       
  8789 
       
  8790         {
       
  8791             identifier_c param_name("IN");
       
  8792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8794             
       
  8795             /* Get the value from a foo(<param_value>) style call */
       
  8796             if (IN_param_value == NULL)
       
  8797               IN_param_value = function_call_param_iterator.next();
       
  8798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8800             
       
  8801             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8802             {
       
  8803         
       
  8804                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8805                 return return_type_symbol;
       
  8806                 
       
  8807             }
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_word_to_date*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *WORD_TO_TOD
       
  8817  */
       
  8818     case function_word_to_tod :
       
  8819     {
       
  8820         symbol_c *last_type_symbol = NULL;
       
  8821 
       
  8822         {
       
  8823             identifier_c param_name("IN");
       
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8826             
       
  8827             /* Get the value from a foo(<param_value>) style call */
       
  8828             if (IN_param_value == NULL)
       
  8829               IN_param_value = function_call_param_iterator.next();
       
  8830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8832             
       
  8833             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8834             {
       
  8835         
       
  8836                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8837                 return return_type_symbol;
       
  8838                 
       
  8839             }
       
  8840             
       
  8841             ERROR;
       
  8842         }
       
  8843         
       
  8844     }/*function_word_to_tod*/
       
  8845     break;
       
  8846 
       
  8847 /****
       
  8848  *WORD_TO_DT
       
  8849  */
       
  8850     case function_word_to_dt :
       
  8851     {
       
  8852         symbol_c *last_type_symbol = NULL;
       
  8853 
       
  8854         {
       
  8855             identifier_c param_name("IN");
       
  8856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8858             
       
  8859             /* Get the value from a foo(<param_value>) style call */
       
  8860             if (IN_param_value == NULL)
       
  8861               IN_param_value = function_call_param_iterator.next();
       
  8862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8864             
       
  8865             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  8866             {
       
  8867         
       
  8868                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8869                 return return_type_symbol;
       
  8870                 
       
  8871             }
       
  8872             
       
  8873             ERROR;
       
  8874         }
       
  8875         
       
  8876     }/*function_word_to_dt*/
       
  8877     break;
       
  8878 
       
  8879 /****
       
  8880  *DWORD_TO_REAL
       
  8881  */
       
  8882     case function_dword_to_real :
       
  8883     {
       
  8884         symbol_c *last_type_symbol = NULL;
       
  8885 
       
  8886         {
       
  8887             identifier_c param_name("IN");
       
  8888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8890             
       
  8891             /* Get the value from a foo(<param_value>) style call */
       
  8892             if (IN_param_value == NULL)
       
  8893               IN_param_value = function_call_param_iterator.next();
       
  8894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8896             
       
  8897             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8898             {
       
  8899         
       
  8900                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8901                 return return_type_symbol;
       
  8902                 
       
  8903             }
       
  8904             
       
  8905             ERROR;
       
  8906         }
       
  8907         
       
  8908     }/*function_dword_to_real*/
       
  8909     break;
       
  8910 
       
  8911 /****
       
  8912  *DWORD_TO_LREAL
       
  8913  */
       
  8914     case function_dword_to_lreal :
       
  8915     {
       
  8916         symbol_c *last_type_symbol = NULL;
       
  8917 
       
  8918         {
       
  8919             identifier_c param_name("IN");
       
  8920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8922             
       
  8923             /* Get the value from a foo(<param_value>) style call */
       
  8924             if (IN_param_value == NULL)
       
  8925               IN_param_value = function_call_param_iterator.next();
       
  8926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8928             
       
  8929             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8930             {
       
  8931         
       
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8933                 return return_type_symbol;
       
  8934                 
       
  8935             }
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_dword_to_lreal*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *DWORD_TO_SINT
       
  8945  */
       
  8946     case function_dword_to_sint :
       
  8947     {
       
  8948         symbol_c *last_type_symbol = NULL;
       
  8949 
       
  8950         {
       
  8951             identifier_c param_name("IN");
       
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8954             
       
  8955             /* Get the value from a foo(<param_value>) style call */
       
  8956             if (IN_param_value == NULL)
       
  8957               IN_param_value = function_call_param_iterator.next();
       
  8958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8960             
       
  8961             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8962             {
       
  8963         
       
  8964                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8965                 return return_type_symbol;
       
  8966                 
       
  8967             }
       
  8968             
       
  8969             ERROR;
       
  8970         }
       
  8971         
       
  8972     }/*function_dword_to_sint*/
       
  8973     break;
       
  8974 
       
  8975 /****
       
  8976  *DWORD_TO_INT
       
  8977  */
       
  8978     case function_dword_to_int :
       
  8979     {
       
  8980         symbol_c *last_type_symbol = NULL;
       
  8981 
       
  8982         {
       
  8983             identifier_c param_name("IN");
       
  8984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8986             
       
  8987             /* Get the value from a foo(<param_value>) style call */
       
  8988             if (IN_param_value == NULL)
       
  8989               IN_param_value = function_call_param_iterator.next();
       
  8990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8992             
       
  8993             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  8994             {
       
  8995         
       
  8996                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8997                 return return_type_symbol;
       
  8998                 
       
  8999             }
       
  9000             
       
  9001             ERROR;
       
  9002         }
       
  9003         
       
  9004     }/*function_dword_to_int*/
       
  9005     break;
       
  9006 
       
  9007 /****
       
  9008  *DWORD_TO_DINT
       
  9009  */
       
  9010     case function_dword_to_dint :
       
  9011     {
       
  9012         symbol_c *last_type_symbol = NULL;
       
  9013 
       
  9014         {
       
  9015             identifier_c param_name("IN");
       
  9016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9018             
       
  9019             /* Get the value from a foo(<param_value>) style call */
       
  9020             if (IN_param_value == NULL)
       
  9021               IN_param_value = function_call_param_iterator.next();
       
  9022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9024             
       
  9025             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9026             {
       
  9027         
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9029                 return return_type_symbol;
       
  9030                 
       
  9031             }
       
  9032             
       
  9033             ERROR;
       
  9034         }
       
  9035         
       
  9036     }/*function_dword_to_dint*/
       
  9037     break;
       
  9038 
       
  9039 /****
       
  9040  *DWORD_TO_LINT
       
  9041  */
       
  9042     case function_dword_to_lint :
       
  9043     {
       
  9044         symbol_c *last_type_symbol = NULL;
       
  9045 
       
  9046         {
       
  9047             identifier_c param_name("IN");
       
  9048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9050             
       
  9051             /* Get the value from a foo(<param_value>) style call */
       
  9052             if (IN_param_value == NULL)
       
  9053               IN_param_value = function_call_param_iterator.next();
       
  9054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9056             
       
  9057             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9058             {
       
  9059         
       
  9060                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9061                 return return_type_symbol;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             ERROR;
       
  9066         }
       
  9067         
       
  9068     }/*function_dword_to_lint*/
       
  9069     break;
       
  9070 
       
  9071 /****
       
  9072  *DWORD_TO_USINT
       
  9073  */
       
  9074     case function_dword_to_usint :
       
  9075     {
       
  9076         symbol_c *last_type_symbol = NULL;
       
  9077 
       
  9078         {
       
  9079             identifier_c param_name("IN");
       
  9080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9082             
       
  9083             /* Get the value from a foo(<param_value>) style call */
       
  9084             if (IN_param_value == NULL)
       
  9085               IN_param_value = function_call_param_iterator.next();
       
  9086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9088             
       
  9089             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9090             {
       
  9091         
       
  9092                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9093                 return return_type_symbol;
       
  9094                 
       
  9095             }
       
  9096             
       
  9097             ERROR;
       
  9098         }
       
  9099         
       
  9100     }/*function_dword_to_usint*/
       
  9101     break;
       
  9102 
       
  9103 /****
       
  9104  *DWORD_TO_UINT
       
  9105  */
       
  9106     case function_dword_to_uint :
       
  9107     {
       
  9108         symbol_c *last_type_symbol = NULL;
       
  9109 
       
  9110         {
       
  9111             identifier_c param_name("IN");
       
  9112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9114             
       
  9115             /* Get the value from a foo(<param_value>) style call */
       
  9116             if (IN_param_value == NULL)
       
  9117               IN_param_value = function_call_param_iterator.next();
       
  9118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9120             
       
  9121             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9122             {
       
  9123         
       
  9124                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9125                 return return_type_symbol;
       
  9126                 
       
  9127             }
       
  9128             
       
  9129             ERROR;
       
  9130         }
       
  9131         
       
  9132     }/*function_dword_to_uint*/
       
  9133     break;
       
  9134 
       
  9135 /****
       
  9136  *DWORD_TO_UDINT
       
  9137  */
       
  9138     case function_dword_to_udint :
       
  9139     {
       
  9140         symbol_c *last_type_symbol = NULL;
       
  9141 
       
  9142         {
       
  9143             identifier_c param_name("IN");
       
  9144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9146             
       
  9147             /* Get the value from a foo(<param_value>) style call */
       
  9148             if (IN_param_value == NULL)
       
  9149               IN_param_value = function_call_param_iterator.next();
       
  9150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9152             
       
  9153             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9154             {
       
  9155         
       
  9156                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9157                 return return_type_symbol;
       
  9158                 
       
  9159             }
       
  9160             
       
  9161             ERROR;
       
  9162         }
       
  9163         
       
  9164     }/*function_dword_to_udint*/
       
  9165     break;
       
  9166 
       
  9167 /****
       
  9168  *DWORD_TO_ULINT
       
  9169  */
       
  9170     case function_dword_to_ulint :
       
  9171     {
       
  9172         symbol_c *last_type_symbol = NULL;
       
  9173 
       
  9174         {
       
  9175             identifier_c param_name("IN");
       
  9176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9178             
       
  9179             /* Get the value from a foo(<param_value>) style call */
       
  9180             if (IN_param_value == NULL)
       
  9181               IN_param_value = function_call_param_iterator.next();
       
  9182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9184             
       
  9185             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9186             {
       
  9187         
       
  9188                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9189                 return return_type_symbol;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             ERROR;
       
  9194         }
       
  9195         
       
  9196     }/*function_dword_to_ulint*/
       
  9197     break;
       
  9198 
       
  9199 /****
       
  9200  *DWORD_TO_TIME
       
  9201  */
       
  9202     case function_dword_to_time :
       
  9203     {
       
  9204         symbol_c *last_type_symbol = NULL;
       
  9205 
       
  9206         {
       
  9207             identifier_c param_name("IN");
       
  9208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9210             
       
  9211             /* Get the value from a foo(<param_value>) style call */
       
  9212             if (IN_param_value == NULL)
       
  9213               IN_param_value = function_call_param_iterator.next();
       
  9214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9216             
       
  9217             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9218             {
       
  9219         
       
  9220                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9221                 return return_type_symbol;
       
  9222                 
       
  9223             }
       
  9224             
       
  9225             ERROR;
       
  9226         }
       
  9227         
       
  9228     }/*function_dword_to_time*/
       
  9229     break;
       
  9230 
       
  9231 /****
       
  9232  *DWORD_TO_BOOL
       
  9233  */
       
  9234     case function_dword_to_bool :
       
  9235     {
       
  9236         symbol_c *last_type_symbol = NULL;
       
  9237 
       
  9238         {
       
  9239             identifier_c param_name("IN");
       
  9240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9242             
       
  9243             /* Get the value from a foo(<param_value>) style call */
       
  9244             if (IN_param_value == NULL)
       
  9245               IN_param_value = function_call_param_iterator.next();
       
  9246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9248             
       
  9249             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9250             {
       
  9251         
       
  9252                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9253                 return return_type_symbol;
       
  9254                 
       
  9255             }
       
  9256             
       
  9257             ERROR;
       
  9258         }
       
  9259         
       
  9260     }/*function_dword_to_bool*/
       
  9261     break;
       
  9262 
       
  9263 /****
       
  9264  *DWORD_TO_BYTE
       
  9265  */
       
  9266     case function_dword_to_byte :
       
  9267     {
       
  9268         symbol_c *last_type_symbol = NULL;
       
  9269 
       
  9270         {
       
  9271             identifier_c param_name("IN");
       
  9272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9274             
       
  9275             /* Get the value from a foo(<param_value>) style call */
       
  9276             if (IN_param_value == NULL)
       
  9277               IN_param_value = function_call_param_iterator.next();
       
  9278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9280             
       
  9281             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9282             {
       
  9283         
       
  9284                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9285                 return return_type_symbol;
       
  9286                 
       
  9287             }
       
  9288             
       
  9289             ERROR;
       
  9290         }
       
  9291         
       
  9292     }/*function_dword_to_byte*/
       
  9293     break;
       
  9294 
       
  9295 /****
       
  9296  *DWORD_TO_WORD
       
  9297  */
       
  9298     case function_dword_to_word :
       
  9299     {
       
  9300         symbol_c *last_type_symbol = NULL;
       
  9301 
       
  9302         {
       
  9303             identifier_c param_name("IN");
       
  9304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9306             
       
  9307             /* Get the value from a foo(<param_value>) style call */
       
  9308             if (IN_param_value == NULL)
       
  9309               IN_param_value = function_call_param_iterator.next();
       
  9310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9312             
       
  9313             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9314             {
       
  9315         
       
  9316                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9317                 return return_type_symbol;
       
  9318                 
       
  9319             }
       
  9320             
       
  9321             ERROR;
       
  9322         }
       
  9323         
       
  9324     }/*function_dword_to_word*/
       
  9325     break;
       
  9326 
       
  9327 /****
       
  9328  *DWORD_TO_LWORD
       
  9329  */
       
  9330     case function_dword_to_lword :
       
  9331     {
       
  9332         symbol_c *last_type_symbol = NULL;
       
  9333 
       
  9334         {
       
  9335             identifier_c param_name("IN");
       
  9336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9338             
       
  9339             /* Get the value from a foo(<param_value>) style call */
       
  9340             if (IN_param_value == NULL)
       
  9341               IN_param_value = function_call_param_iterator.next();
       
  9342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9344             
       
  9345             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9346             {
       
  9347         
       
  9348                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9349                 return return_type_symbol;
       
  9350                 
       
  9351             }
       
  9352             
       
  9353             ERROR;
       
  9354         }
       
  9355         
       
  9356     }/*function_dword_to_lword*/
       
  9357     break;
       
  9358 
       
  9359 /****
       
  9360  *DWORD_TO_STRING
       
  9361  */
       
  9362     case function_dword_to_string :
       
  9363     {
       
  9364         symbol_c *last_type_symbol = NULL;
       
  9365 
       
  9366         {
       
  9367             identifier_c param_name("IN");
       
  9368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9370             
       
  9371             /* Get the value from a foo(<param_value>) style call */
       
  9372             if (IN_param_value == NULL)
       
  9373               IN_param_value = function_call_param_iterator.next();
       
  9374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9376             
       
  9377             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9378             {
       
  9379         
       
  9380                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9381                 return return_type_symbol;
       
  9382                 
       
  9383             }
       
  9384             
       
  9385             ERROR;
       
  9386         }
       
  9387         
       
  9388     }/*function_dword_to_string*/
       
  9389     break;
       
  9390 
       
  9391 /****
       
  9392  *DWORD_TO_WSTRING
       
  9393  */
       
  9394     case function_dword_to_wstring :
       
  9395     {
       
  9396         symbol_c *last_type_symbol = NULL;
       
  9397 
       
  9398         {
       
  9399             identifier_c param_name("IN");
       
  9400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9402             
       
  9403             /* Get the value from a foo(<param_value>) style call */
       
  9404             if (IN_param_value == NULL)
       
  9405               IN_param_value = function_call_param_iterator.next();
       
  9406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9408             
       
  9409             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9410             {
       
  9411         
       
  9412                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
  9413                 return return_type_symbol;
       
  9414                 
       
  9415             }
       
  9416             
       
  9417             ERROR;
       
  9418         }
       
  9419         
       
  9420     }/*function_dword_to_wstring*/
       
  9421     break;
       
  9422 
       
  9423 /****
       
  9424  *DWORD_TO_DATE
       
  9425  */
       
  9426     case function_dword_to_date :
       
  9427     {
       
  9428         symbol_c *last_type_symbol = NULL;
       
  9429 
       
  9430         {
       
  9431             identifier_c param_name("IN");
       
  9432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9434             
       
  9435             /* Get the value from a foo(<param_value>) style call */
       
  9436             if (IN_param_value == NULL)
       
  9437               IN_param_value = function_call_param_iterator.next();
       
  9438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9440             
       
  9441             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9442             {
       
  9443         
       
  9444                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9445                 return return_type_symbol;
       
  9446                 
       
  9447             }
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_dword_to_date*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *DWORD_TO_TOD
       
  9457  */
       
  9458     case function_dword_to_tod :
       
  9459     {
       
  9460         symbol_c *last_type_symbol = NULL;
       
  9461 
       
  9462         {
       
  9463             identifier_c param_name("IN");
       
  9464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9466             
       
  9467             /* Get the value from a foo(<param_value>) style call */
       
  9468             if (IN_param_value == NULL)
       
  9469               IN_param_value = function_call_param_iterator.next();
       
  9470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9472             
       
  9473             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             ERROR;
       
  9482         }
       
  9483         
       
  9484     }/*function_dword_to_tod*/
       
  9485     break;
       
  9486 
       
  9487 /****
       
  9488  *DWORD_TO_DT
       
  9489  */
       
  9490     case function_dword_to_dt :
       
  9491     {
       
  9492         symbol_c *last_type_symbol = NULL;
       
  9493 
       
  9494         {
       
  9495             identifier_c param_name("IN");
       
  9496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9498             
       
  9499             /* Get the value from a foo(<param_value>) style call */
       
  9500             if (IN_param_value == NULL)
       
  9501               IN_param_value = function_call_param_iterator.next();
       
  9502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9504             
       
  9505             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
  9506             {
       
  9507         
       
  9508                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9509                 return return_type_symbol;
       
  9510                 
       
  9511             }
       
  9512             
       
  9513             ERROR;
       
  9514         }
       
  9515         
       
  9516     }/*function_dword_to_dt*/
       
  9517     break;
       
  9518 
       
  9519 /****
       
  9520  *LWORD_TO_REAL
       
  9521  */
       
  9522     case function_lword_to_real :
       
  9523     {
       
  9524         symbol_c *last_type_symbol = NULL;
       
  9525 
       
  9526         {
       
  9527             identifier_c param_name("IN");
       
  9528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9530             
       
  9531             /* Get the value from a foo(<param_value>) style call */
       
  9532             if (IN_param_value == NULL)
       
  9533               IN_param_value = function_call_param_iterator.next();
       
  9534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9536             
       
  9537             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9538             {
       
  9539         
       
  9540                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9541                 return return_type_symbol;
       
  9542                 
       
  9543             }
       
  9544             
       
  9545             ERROR;
       
  9546         }
       
  9547         
       
  9548     }/*function_lword_to_real*/
       
  9549     break;
       
  9550 
       
  9551 /****
       
  9552  *LWORD_TO_LREAL
       
  9553  */
       
  9554     case function_lword_to_lreal :
       
  9555     {
       
  9556         symbol_c *last_type_symbol = NULL;
       
  9557 
       
  9558         {
       
  9559             identifier_c param_name("IN");
       
  9560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9562             
       
  9563             /* Get the value from a foo(<param_value>) style call */
       
  9564             if (IN_param_value == NULL)
       
  9565               IN_param_value = function_call_param_iterator.next();
       
  9566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9568             
       
  9569             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9570             {
       
  9571         
       
  9572                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9573                 return return_type_symbol;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             ERROR;
       
  9578         }
       
  9579         
       
  9580     }/*function_lword_to_lreal*/
       
  9581     break;
       
  9582 
       
  9583 /****
       
  9584  *LWORD_TO_SINT
       
  9585  */
       
  9586     case function_lword_to_sint :
       
  9587     {
       
  9588         symbol_c *last_type_symbol = NULL;
       
  9589 
       
  9590         {
       
  9591             identifier_c param_name("IN");
       
  9592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9594             
       
  9595             /* Get the value from a foo(<param_value>) style call */
       
  9596             if (IN_param_value == NULL)
       
  9597               IN_param_value = function_call_param_iterator.next();
       
  9598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9600             
       
  9601             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9602             {
       
  9603         
       
  9604                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9605                 return return_type_symbol;
       
  9606                 
       
  9607             }
       
  9608             
       
  9609             ERROR;
       
  9610         }
       
  9611         
       
  9612     }/*function_lword_to_sint*/
       
  9613     break;
       
  9614 
       
  9615 /****
       
  9616  *LWORD_TO_INT
       
  9617  */
       
  9618     case function_lword_to_int :
       
  9619     {
       
  9620         symbol_c *last_type_symbol = NULL;
       
  9621 
       
  9622         {
       
  9623             identifier_c param_name("IN");
       
  9624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9626             
       
  9627             /* Get the value from a foo(<param_value>) style call */
       
  9628             if (IN_param_value == NULL)
       
  9629               IN_param_value = function_call_param_iterator.next();
       
  9630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9632             
       
  9633             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9634             {
       
  9635         
       
  9636                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9637                 return return_type_symbol;
       
  9638                 
       
  9639             }
       
  9640             
       
  9641             ERROR;
       
  9642         }
       
  9643         
       
  9644     }/*function_lword_to_int*/
       
  9645     break;
       
  9646 
       
  9647 /****
       
  9648  *LWORD_TO_DINT
       
  9649  */
       
  9650     case function_lword_to_dint :
       
  9651     {
       
  9652         symbol_c *last_type_symbol = NULL;
       
  9653 
       
  9654         {
       
  9655             identifier_c param_name("IN");
       
  9656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9658             
       
  9659             /* Get the value from a foo(<param_value>) style call */
       
  9660             if (IN_param_value == NULL)
       
  9661               IN_param_value = function_call_param_iterator.next();
       
  9662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9664             
       
  9665             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9666             {
       
  9667         
       
  9668                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9669                 return return_type_symbol;
       
  9670                 
       
  9671             }
       
  9672             
       
  9673             ERROR;
       
  9674         }
       
  9675         
       
  9676     }/*function_lword_to_dint*/
       
  9677     break;
       
  9678 
       
  9679 /****
       
  9680  *LWORD_TO_LINT
       
  9681  */
       
  9682     case function_lword_to_lint :
       
  9683     {
       
  9684         symbol_c *last_type_symbol = NULL;
       
  9685 
       
  9686         {
       
  9687             identifier_c param_name("IN");
       
  9688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9690             
       
  9691             /* Get the value from a foo(<param_value>) style call */
       
  9692             if (IN_param_value == NULL)
       
  9693               IN_param_value = function_call_param_iterator.next();
       
  9694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9696             
       
  9697             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9698             {
       
  9699         
       
  9700                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9701                 return return_type_symbol;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             ERROR;
       
  9706         }
       
  9707         
       
  9708     }/*function_lword_to_lint*/
       
  9709     break;
       
  9710 
       
  9711 /****
       
  9712  *LWORD_TO_USINT
       
  9713  */
       
  9714     case function_lword_to_usint :
       
  9715     {
       
  9716         symbol_c *last_type_symbol = NULL;
       
  9717 
       
  9718         {
       
  9719             identifier_c param_name("IN");
       
  9720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9722             
       
  9723             /* Get the value from a foo(<param_value>) style call */
       
  9724             if (IN_param_value == NULL)
       
  9725               IN_param_value = function_call_param_iterator.next();
       
  9726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9728             
       
  9729             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9730             {
       
  9731         
       
  9732                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9733                 return return_type_symbol;
       
  9734                 
       
  9735             }
       
  9736             
       
  9737             ERROR;
       
  9738         }
       
  9739         
       
  9740     }/*function_lword_to_usint*/
       
  9741     break;
       
  9742 
       
  9743 /****
       
  9744  *LWORD_TO_UINT
       
  9745  */
       
  9746     case function_lword_to_uint :
       
  9747     {
       
  9748         symbol_c *last_type_symbol = NULL;
       
  9749 
       
  9750         {
       
  9751             identifier_c param_name("IN");
       
  9752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9754             
       
  9755             /* Get the value from a foo(<param_value>) style call */
       
  9756             if (IN_param_value == NULL)
       
  9757               IN_param_value = function_call_param_iterator.next();
       
  9758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9760             
       
  9761             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9762             {
       
  9763         
       
  9764                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9765                 return return_type_symbol;
       
  9766                 
       
  9767             }
       
  9768             
       
  9769             ERROR;
       
  9770         }
       
  9771         
       
  9772     }/*function_lword_to_uint*/
       
  9773     break;
       
  9774 
       
  9775 /****
       
  9776  *LWORD_TO_UDINT
       
  9777  */
       
  9778     case function_lword_to_udint :
       
  9779     {
       
  9780         symbol_c *last_type_symbol = NULL;
       
  9781 
       
  9782         {
       
  9783             identifier_c param_name("IN");
       
  9784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9786             
       
  9787             /* Get the value from a foo(<param_value>) style call */
       
  9788             if (IN_param_value == NULL)
       
  9789               IN_param_value = function_call_param_iterator.next();
       
  9790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9792             
       
  9793             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9794             {
       
  9795         
       
  9796                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9797                 return return_type_symbol;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_lword_to_udint*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *LWORD_TO_ULINT
       
  9809  */
       
  9810     case function_lword_to_ulint :
       
  9811     {
       
  9812         symbol_c *last_type_symbol = NULL;
       
  9813 
       
  9814         {
       
  9815             identifier_c param_name("IN");
       
  9816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9824             
       
  9825             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9829                 return return_type_symbol;
       
  9830                 
       
  9831             }
       
  9832             
       
  9833             ERROR;
       
  9834         }
       
  9835         
       
  9836     }/*function_lword_to_ulint*/
       
  9837     break;
       
  9838 
       
  9839 /****
       
  9840  *LWORD_TO_TIME
       
  9841  */
       
  9842     case function_lword_to_time :
       
  9843     {
       
  9844         symbol_c *last_type_symbol = NULL;
       
  9845 
       
  9846         {
       
  9847             identifier_c param_name("IN");
       
  9848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9850             
       
  9851             /* Get the value from a foo(<param_value>) style call */
       
  9852             if (IN_param_value == NULL)
       
  9853               IN_param_value = function_call_param_iterator.next();
       
  9854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9856             
       
  9857             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9858             {
       
  9859         
       
  9860                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9861                 return return_type_symbol;
       
  9862                 
       
  9863             }
       
  9864             
       
  9865             ERROR;
       
  9866         }
       
  9867         
       
  9868     }/*function_lword_to_time*/
       
  9869     break;
       
  9870 
       
  9871 /****
       
  9872  *LWORD_TO_BOOL
       
  9873  */
       
  9874     case function_lword_to_bool :
       
  9875     {
       
  9876         symbol_c *last_type_symbol = NULL;
       
  9877 
       
  9878         {
       
  9879             identifier_c param_name("IN");
       
  9880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9882             
       
  9883             /* Get the value from a foo(<param_value>) style call */
       
  9884             if (IN_param_value == NULL)
       
  9885               IN_param_value = function_call_param_iterator.next();
       
  9886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9888             
       
  9889             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9890             {
       
  9891         
       
  9892                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9893                 return return_type_symbol;
       
  9894                 
       
  9895             }
       
  9896             
       
  9897             ERROR;
       
  9898         }
       
  9899         
       
  9900     }/*function_lword_to_bool*/
       
  9901     break;
       
  9902 
       
  9903 /****
       
  9904  *LWORD_TO_BYTE
       
  9905  */
       
  9906     case function_lword_to_byte :
       
  9907     {
       
  9908         symbol_c *last_type_symbol = NULL;
       
  9909 
       
  9910         {
       
  9911             identifier_c param_name("IN");
       
  9912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9914             
       
  9915             /* Get the value from a foo(<param_value>) style call */
       
  9916             if (IN_param_value == NULL)
       
  9917               IN_param_value = function_call_param_iterator.next();
       
  9918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9920             
       
  9921             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9922             {
       
  9923         
       
  9924                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9925                 return return_type_symbol;
       
  9926                 
       
  9927             }
       
  9928             
       
  9929             ERROR;
       
  9930         }
       
  9931         
       
  9932     }/*function_lword_to_byte*/
       
  9933     break;
       
  9934 
       
  9935 /****
       
  9936  *LWORD_TO_WORD
       
  9937  */
       
  9938     case function_lword_to_word :
       
  9939     {
       
  9940         symbol_c *last_type_symbol = NULL;
       
  9941 
       
  9942         {
       
  9943             identifier_c param_name("IN");
       
  9944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9946             
       
  9947             /* Get the value from a foo(<param_value>) style call */
       
  9948             if (IN_param_value == NULL)
       
  9949               IN_param_value = function_call_param_iterator.next();
       
  9950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9952             
       
  9953             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9954             {
       
  9955         
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9957                 return return_type_symbol;
       
  9958                 
       
  9959             }
       
  9960             
       
  9961             ERROR;
       
  9962         }
       
  9963         
       
  9964     }/*function_lword_to_word*/
       
  9965     break;
       
  9966 
       
  9967 /****
       
  9968  *LWORD_TO_DWORD
       
  9969  */
       
  9970     case function_lword_to_dword :
       
  9971     {
       
  9972         symbol_c *last_type_symbol = NULL;
       
  9973 
       
  9974         {
       
  9975             identifier_c param_name("IN");
       
  9976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9978             
       
  9979             /* Get the value from a foo(<param_value>) style call */
       
  9980             if (IN_param_value == NULL)
       
  9981               IN_param_value = function_call_param_iterator.next();
       
  9982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9984             
       
  9985             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
  9986             {
       
  9987         
       
  9988                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9989                 return return_type_symbol;
       
  9990                 
       
  9991             }
       
  9992             
       
  9993             ERROR;
       
  9994         }
       
  9995         
       
  9996     }/*function_lword_to_dword*/
       
  9997     break;
       
  9998 
       
  9999 /****
       
 10000  *LWORD_TO_STRING
       
 10001  */
       
 10002     case function_lword_to_string :
       
 10003     {
       
 10004         symbol_c *last_type_symbol = NULL;
       
 10005 
       
 10006         {
       
 10007             identifier_c param_name("IN");
       
 10008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10010             
       
 10011             /* Get the value from a foo(<param_value>) style call */
       
 10012             if (IN_param_value == NULL)
       
 10013               IN_param_value = function_call_param_iterator.next();
       
 10014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10016             
       
 10017             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10018             {
       
 10019         
       
 10020                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10021                 return return_type_symbol;
       
 10022                 
       
 10023             }
       
 10024             
       
 10025             ERROR;
       
 10026         }
       
 10027         
       
 10028     }/*function_lword_to_string*/
       
 10029     break;
       
 10030 
       
 10031 /****
       
 10032  *LWORD_TO_WSTRING
       
 10033  */
       
 10034     case function_lword_to_wstring :
       
 10035     {
       
 10036         symbol_c *last_type_symbol = NULL;
       
 10037 
       
 10038         {
       
 10039             identifier_c param_name("IN");
       
 10040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10042             
       
 10043             /* Get the value from a foo(<param_value>) style call */
       
 10044             if (IN_param_value == NULL)
       
 10045               IN_param_value = function_call_param_iterator.next();
       
 10046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10048             
       
 10049             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10050             {
       
 10051         
       
 10052                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 10053                 return return_type_symbol;
       
 10054                 
       
 10055             }
       
 10056             
       
 10057             ERROR;
       
 10058         }
       
 10059         
       
 10060     }/*function_lword_to_wstring*/
       
 10061     break;
       
 10062 
       
 10063 /****
       
 10064  *LWORD_TO_DATE
       
 10065  */
       
 10066     case function_lword_to_date :
       
 10067     {
       
 10068         symbol_c *last_type_symbol = NULL;
       
 10069 
       
 10070         {
       
 10071             identifier_c param_name("IN");
       
 10072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10074             
       
 10075             /* Get the value from a foo(<param_value>) style call */
       
 10076             if (IN_param_value == NULL)
       
 10077               IN_param_value = function_call_param_iterator.next();
       
 10078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10080             
       
 10081             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10082             {
       
 10083         
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10085                 return return_type_symbol;
       
 10086                 
       
 10087             }
       
 10088             
       
 10089             ERROR;
       
 10090         }
       
 10091         
       
 10092     }/*function_lword_to_date*/
       
 10093     break;
       
 10094 
       
 10095 /****
       
 10096  *LWORD_TO_TOD
       
 10097  */
       
 10098     case function_lword_to_tod :
       
 10099     {
       
 10100         symbol_c *last_type_symbol = NULL;
       
 10101 
       
 10102         {
       
 10103             identifier_c param_name("IN");
       
 10104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10106             
       
 10107             /* Get the value from a foo(<param_value>) style call */
       
 10108             if (IN_param_value == NULL)
       
 10109               IN_param_value = function_call_param_iterator.next();
       
 10110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10112             
       
 10113             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10114             {
       
 10115         
       
 10116                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10117                 return return_type_symbol;
       
 10118                 
       
 10119             }
       
 10120             
       
 10121             ERROR;
       
 10122         }
       
 10123         
       
 10124     }/*function_lword_to_tod*/
       
 10125     break;
       
 10126 
       
 10127 /****
       
 10128  *LWORD_TO_DT
       
 10129  */
       
 10130     case function_lword_to_dt :
       
 10131     {
       
 10132         symbol_c *last_type_symbol = NULL;
       
 10133 
       
 10134         {
       
 10135             identifier_c param_name("IN");
       
 10136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10138             
       
 10139             /* Get the value from a foo(<param_value>) style call */
       
 10140             if (IN_param_value == NULL)
       
 10141               IN_param_value = function_call_param_iterator.next();
       
 10142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10144             
       
 10145             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 10146             {
       
 10147         
       
 10148                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10149                 return return_type_symbol;
       
 10150                 
       
 10151             }
       
 10152             
       
 10153             ERROR;
       
 10154         }
       
 10155         
       
 10156     }/*function_lword_to_dt*/
       
 10157     break;
       
 10158 
       
 10159 /****
       
 10160  *STRING_TO_REAL
       
 10161  */
       
 10162     case function_string_to_real :
       
 10163     {
       
 10164         symbol_c *last_type_symbol = NULL;
       
 10165 
       
 10166         {
       
 10167             identifier_c param_name("IN");
       
 10168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10170             
       
 10171             /* Get the value from a foo(<param_value>) style call */
       
 10172             if (IN_param_value == NULL)
       
 10173               IN_param_value = function_call_param_iterator.next();
       
 10174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10176             
       
 10177             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10178             {
       
 10179         
       
 10180                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10181                 return return_type_symbol;
       
 10182                 
       
 10183             }
       
 10184             
       
 10185             ERROR;
       
 10186         }
       
 10187         
       
 10188     }/*function_string_to_real*/
       
 10189     break;
       
 10190 
       
 10191 /****
       
 10192  *STRING_TO_LREAL
       
 10193  */
       
 10194     case function_string_to_lreal :
       
 10195     {
       
 10196         symbol_c *last_type_symbol = NULL;
       
 10197 
       
 10198         {
       
 10199             identifier_c param_name("IN");
       
 10200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10202             
       
 10203             /* Get the value from a foo(<param_value>) style call */
       
 10204             if (IN_param_value == NULL)
       
 10205               IN_param_value = function_call_param_iterator.next();
       
 10206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10208             
       
 10209             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10210             {
       
 10211         
       
 10212                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10213                 return return_type_symbol;
       
 10214                 
       
 10215             }
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_string_to_lreal*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *STRING_TO_SINT
       
 10225  */
       
 10226     case function_string_to_sint :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = NULL;
       
 10229 
       
 10230         {
       
 10231             identifier_c param_name("IN");
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10234             
       
 10235             /* Get the value from a foo(<param_value>) style call */
       
 10236             if (IN_param_value == NULL)
       
 10237               IN_param_value = function_call_param_iterator.next();
       
 10238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10240             
       
 10241             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10242             {
       
 10243         
       
 10244                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10245                 return return_type_symbol;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_string_to_sint*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *STRING_TO_INT
       
 10257  */
       
 10258     case function_string_to_int :
       
 10259     {
       
 10260         symbol_c *last_type_symbol = NULL;
       
 10261 
       
 10262         {
       
 10263             identifier_c param_name("IN");
       
 10264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10266             
       
 10267             /* Get the value from a foo(<param_value>) style call */
       
 10268             if (IN_param_value == NULL)
       
 10269               IN_param_value = function_call_param_iterator.next();
       
 10270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10272             
       
 10273             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10277                 return return_type_symbol;
       
 10278                 
       
 10279             }
       
 10280             
       
 10281             ERROR;
       
 10282         }
       
 10283         
       
 10284     }/*function_string_to_int*/
       
 10285     break;
       
 10286 
       
 10287 /****
       
 10288  *STRING_TO_DINT
       
 10289  */
       
 10290     case function_string_to_dint :
       
 10291     {
       
 10292         symbol_c *last_type_symbol = NULL;
       
 10293 
       
 10294         {
       
 10295             identifier_c param_name("IN");
       
 10296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10298             
       
 10299             /* Get the value from a foo(<param_value>) style call */
       
 10300             if (IN_param_value == NULL)
       
 10301               IN_param_value = function_call_param_iterator.next();
       
 10302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10304             
       
 10305             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10306             {
       
 10307         
       
 10308                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10309                 return return_type_symbol;
       
 10310                 
       
 10311             }
       
 10312             
       
 10313             ERROR;
       
 10314         }
       
 10315         
       
 10316     }/*function_string_to_dint*/
       
 10317     break;
       
 10318 
       
 10319 /****
       
 10320  *STRING_TO_LINT
       
 10321  */
       
 10322     case function_string_to_lint :
       
 10323     {
       
 10324         symbol_c *last_type_symbol = NULL;
       
 10325 
       
 10326         {
       
 10327             identifier_c param_name("IN");
       
 10328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10330             
       
 10331             /* Get the value from a foo(<param_value>) style call */
       
 10332             if (IN_param_value == NULL)
       
 10333               IN_param_value = function_call_param_iterator.next();
       
 10334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10336             
       
 10337             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10338             {
       
 10339         
       
 10340                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10341                 return return_type_symbol;
       
 10342                 
       
 10343             }
       
 10344             
       
 10345             ERROR;
       
 10346         }
       
 10347         
       
 10348     }/*function_string_to_lint*/
       
 10349     break;
       
 10350 
       
 10351 /****
       
 10352  *STRING_TO_USINT
       
 10353  */
       
 10354     case function_string_to_usint :
       
 10355     {
       
 10356         symbol_c *last_type_symbol = NULL;
       
 10357 
       
 10358         {
       
 10359             identifier_c param_name("IN");
       
 10360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10362             
       
 10363             /* Get the value from a foo(<param_value>) style call */
       
 10364             if (IN_param_value == NULL)
       
 10365               IN_param_value = function_call_param_iterator.next();
       
 10366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             
       
 10369             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10370             {
       
 10371         
       
 10372                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10373                 return return_type_symbol;
       
 10374                 
       
 10375             }
       
 10376             
       
 10377             ERROR;
       
 10378         }
       
 10379         
       
 10380     }/*function_string_to_usint*/
       
 10381     break;
       
 10382 
       
 10383 /****
       
 10384  *STRING_TO_UINT
       
 10385  */
       
 10386     case function_string_to_uint :
       
 10387     {
       
 10388         symbol_c *last_type_symbol = NULL;
       
 10389 
       
 10390         {
       
 10391             identifier_c param_name("IN");
       
 10392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10394             
       
 10395             /* Get the value from a foo(<param_value>) style call */
       
 10396             if (IN_param_value == NULL)
       
 10397               IN_param_value = function_call_param_iterator.next();
       
 10398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10400             
       
 10401             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10402             {
       
 10403         
       
 10404                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10405                 return return_type_symbol;
       
 10406                 
       
 10407             }
       
 10408             
       
 10409             ERROR;
       
 10410         }
       
 10411         
       
 10412     }/*function_string_to_uint*/
       
 10413     break;
       
 10414 
       
 10415 /****
       
 10416  *STRING_TO_UDINT
       
 10417  */
       
 10418     case function_string_to_udint :
       
 10419     {
       
 10420         symbol_c *last_type_symbol = NULL;
       
 10421 
       
 10422         {
       
 10423             identifier_c param_name("IN");
       
 10424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10426             
       
 10427             /* Get the value from a foo(<param_value>) style call */
       
 10428             if (IN_param_value == NULL)
       
 10429               IN_param_value = function_call_param_iterator.next();
       
 10430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10432             
       
 10433             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10434             {
       
 10435         
       
 10436                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10437                 return return_type_symbol;
       
 10438                 
       
 10439             }
       
 10440             
       
 10441             ERROR;
       
 10442         }
       
 10443         
       
 10444     }/*function_string_to_udint*/
       
 10445     break;
       
 10446 
       
 10447 /****
       
 10448  *STRING_TO_ULINT
       
 10449  */
       
 10450     case function_string_to_ulint :
       
 10451     {
       
 10452         symbol_c *last_type_symbol = NULL;
       
 10453 
       
 10454         {
       
 10455             identifier_c param_name("IN");
       
 10456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10458             
       
 10459             /* Get the value from a foo(<param_value>) style call */
       
 10460             if (IN_param_value == NULL)
       
 10461               IN_param_value = function_call_param_iterator.next();
       
 10462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10464             
       
 10465             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10466             {
       
 10467         
       
 10468                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10469                 return return_type_symbol;
       
 10470                 
       
 10471             }
       
 10472             
       
 10473             ERROR;
       
 10474         }
       
 10475         
       
 10476     }/*function_string_to_ulint*/
       
 10477     break;
       
 10478 
       
 10479 /****
       
 10480  *STRING_TO_TIME
       
 10481  */
       
 10482     case function_string_to_time :
       
 10483     {
       
 10484         symbol_c *last_type_symbol = NULL;
       
 10485 
       
 10486         {
       
 10487             identifier_c param_name("IN");
       
 10488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10490             
       
 10491             /* Get the value from a foo(<param_value>) style call */
       
 10492             if (IN_param_value == NULL)
       
 10493               IN_param_value = function_call_param_iterator.next();
       
 10494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10496             
       
 10497             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10498             {
       
 10499         
       
 10500                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10501                 return return_type_symbol;
       
 10502                 
       
 10503             }
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_string_to_time*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *STRING_TO_BOOL
       
 10513  */
       
 10514     case function_string_to_bool :
       
 10515     {
       
 10516         symbol_c *last_type_symbol = NULL;
       
 10517 
       
 10518         {
       
 10519             identifier_c param_name("IN");
       
 10520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10522             
       
 10523             /* Get the value from a foo(<param_value>) style call */
       
 10524             if (IN_param_value == NULL)
       
 10525               IN_param_value = function_call_param_iterator.next();
       
 10526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10528             
       
 10529             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             ERROR;
       
 10538         }
       
 10539         
       
 10540     }/*function_string_to_bool*/
       
 10541     break;
       
 10542 
       
 10543 /****
       
 10544  *STRING_TO_BYTE
       
 10545  */
       
 10546     case function_string_to_byte :
       
 10547     {
       
 10548         symbol_c *last_type_symbol = NULL;
       
 10549 
       
 10550         {
       
 10551             identifier_c param_name("IN");
       
 10552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10554             
       
 10555             /* Get the value from a foo(<param_value>) style call */
       
 10556             if (IN_param_value == NULL)
       
 10557               IN_param_value = function_call_param_iterator.next();
       
 10558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10560             
       
 10561             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10562             {
       
 10563         
       
 10564                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10565                 return return_type_symbol;
       
 10566                 
       
 10567             }
       
 10568             
       
 10569             ERROR;
       
 10570         }
       
 10571         
       
 10572     }/*function_string_to_byte*/
       
 10573     break;
       
 10574 
       
 10575 /****
       
 10576  *STRING_TO_WORD
       
 10577  */
       
 10578     case function_string_to_word :
       
 10579     {
       
 10580         symbol_c *last_type_symbol = NULL;
       
 10581 
       
 10582         {
       
 10583             identifier_c param_name("IN");
       
 10584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10586             
       
 10587             /* Get the value from a foo(<param_value>) style call */
       
 10588             if (IN_param_value == NULL)
       
 10589               IN_param_value = function_call_param_iterator.next();
       
 10590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10592             
       
 10593             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10594             {
       
 10595         
       
 10596                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10597                 return return_type_symbol;
       
 10598                 
       
 10599             }
       
 10600             
       
 10601             ERROR;
       
 10602         }
       
 10603         
       
 10604     }/*function_string_to_word*/
       
 10605     break;
       
 10606 
       
 10607 /****
       
 10608  *STRING_TO_DWORD
       
 10609  */
       
 10610     case function_string_to_dword :
       
 10611     {
       
 10612         symbol_c *last_type_symbol = NULL;
       
 10613 
       
 10614         {
       
 10615             identifier_c param_name("IN");
       
 10616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10618             
       
 10619             /* Get the value from a foo(<param_value>) style call */
       
 10620             if (IN_param_value == NULL)
       
 10621               IN_param_value = function_call_param_iterator.next();
       
 10622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10624             
       
 10625             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10626             {
       
 10627         
       
 10628                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10629                 return return_type_symbol;
       
 10630                 
       
 10631             }
       
 10632             
       
 10633             ERROR;
       
 10634         }
       
 10635         
       
 10636     }/*function_string_to_dword*/
       
 10637     break;
       
 10638 
       
 10639 /****
       
 10640  *STRING_TO_LWORD
       
 10641  */
       
 10642     case function_string_to_lword :
       
 10643     {
       
 10644         symbol_c *last_type_symbol = NULL;
       
 10645 
       
 10646         {
       
 10647             identifier_c param_name("IN");
       
 10648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10650             
       
 10651             /* Get the value from a foo(<param_value>) style call */
       
 10652             if (IN_param_value == NULL)
       
 10653               IN_param_value = function_call_param_iterator.next();
       
 10654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10656             
       
 10657             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10658             {
       
 10659         
       
 10660                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10661                 return return_type_symbol;
       
 10662                 
       
 10663             }
       
 10664             
       
 10665             ERROR;
       
 10666         }
       
 10667         
       
 10668     }/*function_string_to_lword*/
       
 10669     break;
       
 10670 
       
 10671 /****
       
 10672  *STRING_TO_DATE
       
 10673  */
       
 10674     case function_string_to_date :
       
 10675     {
       
 10676         symbol_c *last_type_symbol = NULL;
       
 10677 
       
 10678         {
       
 10679             identifier_c param_name("IN");
       
 10680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10682             
       
 10683             /* Get the value from a foo(<param_value>) style call */
       
 10684             if (IN_param_value == NULL)
       
 10685               IN_param_value = function_call_param_iterator.next();
       
 10686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10688             
       
 10689             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10690             {
       
 10691         
       
 10692                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10693                 return return_type_symbol;
       
 10694                 
       
 10695             }
       
 10696             
       
 10697             ERROR;
       
 10698         }
       
 10699         
       
 10700     }/*function_string_to_date*/
       
 10701     break;
       
 10702 
       
 10703 /****
       
 10704  *STRING_TO_TOD
       
 10705  */
       
 10706     case function_string_to_tod :
       
 10707     {
       
 10708         symbol_c *last_type_symbol = NULL;
       
 10709 
       
 10710         {
       
 10711             identifier_c param_name("IN");
       
 10712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10714             
       
 10715             /* Get the value from a foo(<param_value>) style call */
       
 10716             if (IN_param_value == NULL)
       
 10717               IN_param_value = function_call_param_iterator.next();
       
 10718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10720             
       
 10721             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10722             {
       
 10723         
       
 10724                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10725                 return return_type_symbol;
       
 10726                 
       
 10727             }
       
 10728             
       
 10729             ERROR;
       
 10730         }
       
 10731         
       
 10732     }/*function_string_to_tod*/
       
 10733     break;
       
 10734 
       
 10735 /****
       
 10736  *STRING_TO_DT
       
 10737  */
       
 10738     case function_string_to_dt :
       
 10739     {
       
 10740         symbol_c *last_type_symbol = NULL;
       
 10741 
       
 10742         {
       
 10743             identifier_c param_name("IN");
       
 10744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10746             
       
 10747             /* Get the value from a foo(<param_value>) style call */
       
 10748             if (IN_param_value == NULL)
       
 10749               IN_param_value = function_call_param_iterator.next();
       
 10750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10752             
       
 10753             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 10754             {
       
 10755         
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10757                 return return_type_symbol;
       
 10758                 
       
 10759             }
       
 10760             
       
 10761             ERROR;
       
 10762         }
       
 10763         
       
 10764     }/*function_string_to_dt*/
       
 10765     break;
       
 10766 
       
 10767 /****
       
 10768  *WSTRING_TO_REAL
       
 10769  */
       
 10770     case function_wstring_to_real :
       
 10771     {
       
 10772         symbol_c *last_type_symbol = NULL;
       
 10773 
       
 10774         {
       
 10775             identifier_c param_name("IN");
       
 10776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10778             
       
 10779             /* Get the value from a foo(<param_value>) style call */
       
 10780             if (IN_param_value == NULL)
       
 10781               IN_param_value = function_call_param_iterator.next();
       
 10782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10784             
       
 10785             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10786             {
       
 10787         
       
 10788                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10789                 return return_type_symbol;
       
 10790                 
       
 10791             }
       
 10792             
       
 10793             ERROR;
       
 10794         }
       
 10795         
       
 10796     }/*function_wstring_to_real*/
       
 10797     break;
       
 10798 
       
 10799 /****
       
 10800  *WSTRING_TO_LREAL
       
 10801  */
       
 10802     case function_wstring_to_lreal :
       
 10803     {
       
 10804         symbol_c *last_type_symbol = NULL;
       
 10805 
       
 10806         {
       
 10807             identifier_c param_name("IN");
       
 10808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10810             
       
 10811             /* Get the value from a foo(<param_value>) style call */
       
 10812             if (IN_param_value == NULL)
       
 10813               IN_param_value = function_call_param_iterator.next();
       
 10814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10816             
       
 10817             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10818             {
       
 10819         
       
 10820                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10821                 return return_type_symbol;
       
 10822                 
       
 10823             }
       
 10824             
       
 10825             ERROR;
       
 10826         }
       
 10827         
       
 10828     }/*function_wstring_to_lreal*/
       
 10829     break;
       
 10830 
       
 10831 /****
       
 10832  *WSTRING_TO_SINT
       
 10833  */
       
 10834     case function_wstring_to_sint :
       
 10835     {
       
 10836         symbol_c *last_type_symbol = NULL;
       
 10837 
       
 10838         {
       
 10839             identifier_c param_name("IN");
       
 10840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10842             
       
 10843             /* Get the value from a foo(<param_value>) style call */
       
 10844             if (IN_param_value == NULL)
       
 10845               IN_param_value = function_call_param_iterator.next();
       
 10846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10848             
       
 10849             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10850             {
       
 10851         
       
 10852                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10853                 return return_type_symbol;
       
 10854                 
       
 10855             }
       
 10856             
       
 10857             ERROR;
       
 10858         }
       
 10859         
       
 10860     }/*function_wstring_to_sint*/
       
 10861     break;
       
 10862 
       
 10863 /****
       
 10864  *WSTRING_TO_INT
       
 10865  */
       
 10866     case function_wstring_to_int :
       
 10867     {
       
 10868         symbol_c *last_type_symbol = NULL;
       
 10869 
       
 10870         {
       
 10871             identifier_c param_name("IN");
       
 10872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10874             
       
 10875             /* Get the value from a foo(<param_value>) style call */
       
 10876             if (IN_param_value == NULL)
       
 10877               IN_param_value = function_call_param_iterator.next();
       
 10878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10880             
       
 10881             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10882             {
       
 10883         
       
 10884                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10885                 return return_type_symbol;
       
 10886                 
       
 10887             }
       
 10888             
       
 10889             ERROR;
       
 10890         }
       
 10891         
       
 10892     }/*function_wstring_to_int*/
       
 10893     break;
       
 10894 
       
 10895 /****
       
 10896  *WSTRING_TO_DINT
       
 10897  */
       
 10898     case function_wstring_to_dint :
       
 10899     {
       
 10900         symbol_c *last_type_symbol = NULL;
       
 10901 
       
 10902         {
       
 10903             identifier_c param_name("IN");
       
 10904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10906             
       
 10907             /* Get the value from a foo(<param_value>) style call */
       
 10908             if (IN_param_value == NULL)
       
 10909               IN_param_value = function_call_param_iterator.next();
       
 10910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10912             
       
 10913             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10914             {
       
 10915         
       
 10916                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10917                 return return_type_symbol;
       
 10918                 
       
 10919             }
       
 10920             
       
 10921             ERROR;
       
 10922         }
       
 10923         
       
 10924     }/*function_wstring_to_dint*/
       
 10925     break;
       
 10926 
       
 10927 /****
       
 10928  *WSTRING_TO_LINT
       
 10929  */
       
 10930     case function_wstring_to_lint :
       
 10931     {
       
 10932         symbol_c *last_type_symbol = NULL;
       
 10933 
       
 10934         {
       
 10935             identifier_c param_name("IN");
       
 10936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10938             
       
 10939             /* Get the value from a foo(<param_value>) style call */
       
 10940             if (IN_param_value == NULL)
       
 10941               IN_param_value = function_call_param_iterator.next();
       
 10942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10944             
       
 10945             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10946             {
       
 10947         
       
 10948                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10949                 return return_type_symbol;
       
 10950                 
       
 10951             }
       
 10952             
       
 10953             ERROR;
       
 10954         }
       
 10955         
       
 10956     }/*function_wstring_to_lint*/
       
 10957     break;
       
 10958 
       
 10959 /****
       
 10960  *WSTRING_TO_USINT
       
 10961  */
       
 10962     case function_wstring_to_usint :
       
 10963     {
       
 10964         symbol_c *last_type_symbol = NULL;
       
 10965 
       
 10966         {
       
 10967             identifier_c param_name("IN");
       
 10968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10970             
       
 10971             /* Get the value from a foo(<param_value>) style call */
       
 10972             if (IN_param_value == NULL)
       
 10973               IN_param_value = function_call_param_iterator.next();
       
 10974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10976             
       
 10977             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 10978             {
       
 10979         
       
 10980                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10981                 return return_type_symbol;
       
 10982                 
       
 10983             }
       
 10984             
       
 10985             ERROR;
       
 10986         }
       
 10987         
       
 10988     }/*function_wstring_to_usint*/
       
 10989     break;
       
 10990 
       
 10991 /****
       
 10992  *WSTRING_TO_UINT
       
 10993  */
       
 10994     case function_wstring_to_uint :
       
 10995     {
       
 10996         symbol_c *last_type_symbol = NULL;
       
 10997 
       
 10998         {
       
 10999             identifier_c param_name("IN");
       
 11000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11002             
       
 11003             /* Get the value from a foo(<param_value>) style call */
       
 11004             if (IN_param_value == NULL)
       
 11005               IN_param_value = function_call_param_iterator.next();
       
 11006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11008             
       
 11009             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11010             {
       
 11011         
       
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11013                 return return_type_symbol;
       
 11014                 
       
 11015             }
       
 11016             
       
 11017             ERROR;
       
 11018         }
       
 11019         
       
 11020     }/*function_wstring_to_uint*/
       
 11021     break;
       
 11022 
       
 11023 /****
       
 11024  *WSTRING_TO_UDINT
       
 11025  */
       
 11026     case function_wstring_to_udint :
       
 11027     {
       
 11028         symbol_c *last_type_symbol = NULL;
       
 11029 
       
 11030         {
       
 11031             identifier_c param_name("IN");
       
 11032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11034             
       
 11035             /* Get the value from a foo(<param_value>) style call */
       
 11036             if (IN_param_value == NULL)
       
 11037               IN_param_value = function_call_param_iterator.next();
       
 11038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11040             
       
 11041             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11042             {
       
 11043         
       
 11044                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11045                 return return_type_symbol;
       
 11046                 
       
 11047             }
       
 11048             
       
 11049             ERROR;
       
 11050         }
       
 11051         
       
 11052     }/*function_wstring_to_udint*/
       
 11053     break;
       
 11054 
       
 11055 /****
       
 11056  *WSTRING_TO_ULINT
       
 11057  */
       
 11058     case function_wstring_to_ulint :
       
 11059     {
       
 11060         symbol_c *last_type_symbol = NULL;
       
 11061 
       
 11062         {
       
 11063             identifier_c param_name("IN");
       
 11064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11066             
       
 11067             /* Get the value from a foo(<param_value>) style call */
       
 11068             if (IN_param_value == NULL)
       
 11069               IN_param_value = function_call_param_iterator.next();
       
 11070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11072             
       
 11073             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11074             {
       
 11075         
       
 11076                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11077                 return return_type_symbol;
       
 11078                 
       
 11079             }
       
 11080             
       
 11081             ERROR;
       
 11082         }
       
 11083         
       
 11084     }/*function_wstring_to_ulint*/
       
 11085     break;
       
 11086 
       
 11087 /****
       
 11088  *WSTRING_TO_TIME
       
 11089  */
       
 11090     case function_wstring_to_time :
       
 11091     {
       
 11092         symbol_c *last_type_symbol = NULL;
       
 11093 
       
 11094         {
       
 11095             identifier_c param_name("IN");
       
 11096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11098             
       
 11099             /* Get the value from a foo(<param_value>) style call */
       
 11100             if (IN_param_value == NULL)
       
 11101               IN_param_value = function_call_param_iterator.next();
       
 11102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11104             
       
 11105             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11106             {
       
 11107         
       
 11108                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11109                 return return_type_symbol;
       
 11110                 
       
 11111             }
       
 11112             
       
 11113             ERROR;
       
 11114         }
       
 11115         
       
 11116     }/*function_wstring_to_time*/
       
 11117     break;
       
 11118 
       
 11119 /****
       
 11120  *WSTRING_TO_BOOL
       
 11121  */
       
 11122     case function_wstring_to_bool :
       
 11123     {
       
 11124         symbol_c *last_type_symbol = NULL;
       
 11125 
       
 11126         {
       
 11127             identifier_c param_name("IN");
       
 11128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11130             
       
 11131             /* Get the value from a foo(<param_value>) style call */
       
 11132             if (IN_param_value == NULL)
       
 11133               IN_param_value = function_call_param_iterator.next();
       
 11134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11136             
       
 11137             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11138             {
       
 11139         
       
 11140                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11141                 return return_type_symbol;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             ERROR;
       
 11146         }
       
 11147         
       
 11148     }/*function_wstring_to_bool*/
       
 11149     break;
       
 11150 
       
 11151 /****
       
 11152  *WSTRING_TO_BYTE
       
 11153  */
       
 11154     case function_wstring_to_byte :
       
 11155     {
       
 11156         symbol_c *last_type_symbol = NULL;
       
 11157 
       
 11158         {
       
 11159             identifier_c param_name("IN");
       
 11160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11162             
       
 11163             /* Get the value from a foo(<param_value>) style call */
       
 11164             if (IN_param_value == NULL)
       
 11165               IN_param_value = function_call_param_iterator.next();
       
 11166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11168             
       
 11169             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11170             {
       
 11171         
       
 11172                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11173                 return return_type_symbol;
       
 11174                 
       
 11175             }
       
 11176             
       
 11177             ERROR;
       
 11178         }
       
 11179         
       
 11180     }/*function_wstring_to_byte*/
       
 11181     break;
       
 11182 
       
 11183 /****
       
 11184  *WSTRING_TO_WORD
       
 11185  */
       
 11186     case function_wstring_to_word :
       
 11187     {
       
 11188         symbol_c *last_type_symbol = NULL;
       
 11189 
       
 11190         {
       
 11191             identifier_c param_name("IN");
       
 11192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11194             
       
 11195             /* Get the value from a foo(<param_value>) style call */
       
 11196             if (IN_param_value == NULL)
       
 11197               IN_param_value = function_call_param_iterator.next();
       
 11198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11200             
       
 11201             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11202             {
       
 11203         
       
 11204                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11205                 return return_type_symbol;
       
 11206                 
       
 11207             }
       
 11208             
       
 11209             ERROR;
       
 11210         }
       
 11211         
       
 11212     }/*function_wstring_to_word*/
       
 11213     break;
       
 11214 
       
 11215 /****
       
 11216  *WSTRING_TO_DWORD
       
 11217  */
       
 11218     case function_wstring_to_dword :
       
 11219     {
       
 11220         symbol_c *last_type_symbol = NULL;
       
 11221 
       
 11222         {
       
 11223             identifier_c param_name("IN");
       
 11224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11226             
       
 11227             /* Get the value from a foo(<param_value>) style call */
       
 11228             if (IN_param_value == NULL)
       
 11229               IN_param_value = function_call_param_iterator.next();
       
 11230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11232             
       
 11233             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11234             {
       
 11235         
       
 11236                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11237                 return return_type_symbol;
       
 11238                 
       
 11239             }
       
 11240             
       
 11241             ERROR;
       
 11242         }
       
 11243         
       
 11244     }/*function_wstring_to_dword*/
       
 11245     break;
       
 11246 
       
 11247 /****
       
 11248  *WSTRING_TO_LWORD
       
 11249  */
       
 11250     case function_wstring_to_lword :
       
 11251     {
       
 11252         symbol_c *last_type_symbol = NULL;
       
 11253 
       
 11254         {
       
 11255             identifier_c param_name("IN");
       
 11256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11258             
       
 11259             /* Get the value from a foo(<param_value>) style call */
       
 11260             if (IN_param_value == NULL)
       
 11261               IN_param_value = function_call_param_iterator.next();
       
 11262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11264             
       
 11265             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11266             {
       
 11267         
       
 11268                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11269                 return return_type_symbol;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             ERROR;
       
 11274         }
       
 11275         
       
 11276     }/*function_wstring_to_lword*/
       
 11277     break;
       
 11278 
       
 11279 /****
       
 11280  *WSTRING_TO_DATE
       
 11281  */
       
 11282     case function_wstring_to_date :
       
 11283     {
       
 11284         symbol_c *last_type_symbol = NULL;
       
 11285 
       
 11286         {
       
 11287             identifier_c param_name("IN");
       
 11288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11290             
       
 11291             /* Get the value from a foo(<param_value>) style call */
       
 11292             if (IN_param_value == NULL)
       
 11293               IN_param_value = function_call_param_iterator.next();
       
 11294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11296             
       
 11297             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11298             {
       
 11299         
       
 11300                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11301                 return return_type_symbol;
       
 11302                 
       
 11303             }
       
 11304             
       
 11305             ERROR;
       
 11306         }
       
 11307         
       
 11308     }/*function_wstring_to_date*/
       
 11309     break;
       
 11310 
       
 11311 /****
       
 11312  *WSTRING_TO_TOD
       
 11313  */
       
 11314     case function_wstring_to_tod :
       
 11315     {
       
 11316         symbol_c *last_type_symbol = NULL;
       
 11317 
       
 11318         {
       
 11319             identifier_c param_name("IN");
       
 11320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11322             
       
 11323             /* Get the value from a foo(<param_value>) style call */
       
 11324             if (IN_param_value == NULL)
       
 11325               IN_param_value = function_call_param_iterator.next();
       
 11326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11328             
       
 11329             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11330             {
       
 11331         
       
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11333                 return return_type_symbol;
       
 11334                 
       
 11335             }
       
 11336             
       
 11337             ERROR;
       
 11338         }
       
 11339         
       
 11340     }/*function_wstring_to_tod*/
       
 11341     break;
       
 11342 
       
 11343 /****
       
 11344  *WSTRING_TO_DT
       
 11345  */
       
 11346     case function_wstring_to_dt :
       
 11347     {
       
 11348         symbol_c *last_type_symbol = NULL;
       
 11349 
       
 11350         {
       
 11351             identifier_c param_name("IN");
       
 11352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11354             
       
 11355             /* Get the value from a foo(<param_value>) style call */
       
 11356             if (IN_param_value == NULL)
       
 11357               IN_param_value = function_call_param_iterator.next();
       
 11358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11360             
       
 11361             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 11362             {
       
 11363         
       
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11365                 return return_type_symbol;
       
 11366                 
       
 11367             }
       
 11368             
       
 11369             ERROR;
       
 11370         }
       
 11371         
       
 11372     }/*function_wstring_to_dt*/
       
 11373     break;
       
 11374 
       
 11375 /****
       
 11376  *DATE_TO_REAL
       
 11377  */
       
 11378     case function_date_to_real :
       
 11379     {
       
 11380         symbol_c *last_type_symbol = NULL;
       
 11381 
       
 11382         {
       
 11383             identifier_c param_name("IN");
       
 11384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11386             
       
 11387             /* Get the value from a foo(<param_value>) style call */
       
 11388             if (IN_param_value == NULL)
       
 11389               IN_param_value = function_call_param_iterator.next();
       
 11390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11392             
       
 11393             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11394             {
       
 11395         
       
 11396                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11397                 return return_type_symbol;
       
 11398                 
       
 11399             }
       
 11400             
       
 11401             ERROR;
       
 11402         }
       
 11403         
       
 11404     }/*function_date_to_real*/
       
 11405     break;
       
 11406 
       
 11407 /****
       
 11408  *DATE_TO_LREAL
       
 11409  */
       
 11410     case function_date_to_lreal :
       
 11411     {
       
 11412         symbol_c *last_type_symbol = NULL;
       
 11413 
       
 11414         {
       
 11415             identifier_c param_name("IN");
       
 11416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11418             
       
 11419             /* Get the value from a foo(<param_value>) style call */
       
 11420             if (IN_param_value == NULL)
       
 11421               IN_param_value = function_call_param_iterator.next();
       
 11422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11424             
       
 11425             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11426             {
       
 11427         
       
 11428                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11429                 return return_type_symbol;
       
 11430                 
       
 11431             }
       
 11432             
       
 11433             ERROR;
       
 11434         }
       
 11435         
       
 11436     }/*function_date_to_lreal*/
       
 11437     break;
       
 11438 
       
 11439 /****
       
 11440  *DATE_TO_SINT
       
 11441  */
       
 11442     case function_date_to_sint :
       
 11443     {
       
 11444         symbol_c *last_type_symbol = NULL;
       
 11445 
       
 11446         {
       
 11447             identifier_c param_name("IN");
       
 11448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11450             
       
 11451             /* Get the value from a foo(<param_value>) style call */
       
 11452             if (IN_param_value == NULL)
       
 11453               IN_param_value = function_call_param_iterator.next();
       
 11454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11456             
       
 11457             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11458             {
       
 11459         
       
 11460                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11461                 return return_type_symbol;
       
 11462                 
       
 11463             }
       
 11464             
       
 11465             ERROR;
       
 11466         }
       
 11467         
       
 11468     }/*function_date_to_sint*/
       
 11469     break;
       
 11470 
       
 11471 /****
       
 11472  *DATE_TO_INT
       
 11473  */
       
 11474     case function_date_to_int :
       
 11475     {
       
 11476         symbol_c *last_type_symbol = NULL;
       
 11477 
       
 11478         {
       
 11479             identifier_c param_name("IN");
       
 11480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11482             
       
 11483             /* Get the value from a foo(<param_value>) style call */
       
 11484             if (IN_param_value == NULL)
       
 11485               IN_param_value = function_call_param_iterator.next();
       
 11486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11488             
       
 11489             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11490             {
       
 11491         
       
 11492                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11493                 return return_type_symbol;
       
 11494                 
       
 11495             }
       
 11496             
       
 11497             ERROR;
       
 11498         }
       
 11499         
       
 11500     }/*function_date_to_int*/
       
 11501     break;
       
 11502 
       
 11503 /****
       
 11504  *DATE_TO_DINT
       
 11505  */
       
 11506     case function_date_to_dint :
       
 11507     {
       
 11508         symbol_c *last_type_symbol = NULL;
       
 11509 
       
 11510         {
       
 11511             identifier_c param_name("IN");
       
 11512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11514             
       
 11515             /* Get the value from a foo(<param_value>) style call */
       
 11516             if (IN_param_value == NULL)
       
 11517               IN_param_value = function_call_param_iterator.next();
       
 11518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11520             
       
 11521             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11522             {
       
 11523         
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11525                 return return_type_symbol;
       
 11526                 
       
 11527             }
       
 11528             
       
 11529             ERROR;
       
 11530         }
       
 11531         
       
 11532     }/*function_date_to_dint*/
       
 11533     break;
       
 11534 
       
 11535 /****
       
 11536  *DATE_TO_LINT
       
 11537  */
       
 11538     case function_date_to_lint :
       
 11539     {
       
 11540         symbol_c *last_type_symbol = NULL;
       
 11541 
       
 11542         {
       
 11543             identifier_c param_name("IN");
       
 11544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11546             
       
 11547             /* Get the value from a foo(<param_value>) style call */
       
 11548             if (IN_param_value == NULL)
       
 11549               IN_param_value = function_call_param_iterator.next();
       
 11550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11552             
       
 11553             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11554             {
       
 11555         
       
 11556                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11557                 return return_type_symbol;
       
 11558                 
       
 11559             }
       
 11560             
       
 11561             ERROR;
       
 11562         }
       
 11563         
       
 11564     }/*function_date_to_lint*/
       
 11565     break;
       
 11566 
       
 11567 /****
       
 11568  *DATE_TO_USINT
       
 11569  */
       
 11570     case function_date_to_usint :
       
 11571     {
       
 11572         symbol_c *last_type_symbol = NULL;
       
 11573 
       
 11574         {
       
 11575             identifier_c param_name("IN");
       
 11576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11578             
       
 11579             /* Get the value from a foo(<param_value>) style call */
       
 11580             if (IN_param_value == NULL)
       
 11581               IN_param_value = function_call_param_iterator.next();
       
 11582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11584             
       
 11585             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11586             {
       
 11587         
       
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11589                 return return_type_symbol;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             ERROR;
       
 11594         }
       
 11595         
       
 11596     }/*function_date_to_usint*/
       
 11597     break;
       
 11598 
       
 11599 /****
       
 11600  *DATE_TO_UINT
       
 11601  */
       
 11602     case function_date_to_uint :
       
 11603     {
       
 11604         symbol_c *last_type_symbol = NULL;
       
 11605 
       
 11606         {
       
 11607             identifier_c param_name("IN");
       
 11608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11610             
       
 11611             /* Get the value from a foo(<param_value>) style call */
       
 11612             if (IN_param_value == NULL)
       
 11613               IN_param_value = function_call_param_iterator.next();
       
 11614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11616             
       
 11617             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11618             {
       
 11619         
       
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11621                 return return_type_symbol;
       
 11622                 
       
 11623             }
       
 11624             
       
 11625             ERROR;
       
 11626         }
       
 11627         
       
 11628     }/*function_date_to_uint*/
       
 11629     break;
       
 11630 
       
 11631 /****
       
 11632  *DATE_TO_UDINT
       
 11633  */
       
 11634     case function_date_to_udint :
       
 11635     {
       
 11636         symbol_c *last_type_symbol = NULL;
       
 11637 
       
 11638         {
       
 11639             identifier_c param_name("IN");
       
 11640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11642             
       
 11643             /* Get the value from a foo(<param_value>) style call */
       
 11644             if (IN_param_value == NULL)
       
 11645               IN_param_value = function_call_param_iterator.next();
       
 11646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11648             
       
 11649             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11650             {
       
 11651         
       
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11653                 return return_type_symbol;
       
 11654                 
       
 11655             }
       
 11656             
       
 11657             ERROR;
       
 11658         }
       
 11659         
       
 11660     }/*function_date_to_udint*/
       
 11661     break;
       
 11662 
       
 11663 /****
       
 11664  *DATE_TO_ULINT
       
 11665  */
       
 11666     case function_date_to_ulint :
       
 11667     {
       
 11668         symbol_c *last_type_symbol = NULL;
       
 11669 
       
 11670         {
       
 11671             identifier_c param_name("IN");
       
 11672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11674             
       
 11675             /* Get the value from a foo(<param_value>) style call */
       
 11676             if (IN_param_value == NULL)
       
 11677               IN_param_value = function_call_param_iterator.next();
       
 11678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11680             
       
 11681             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11682             {
       
 11683         
       
 11684                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11685                 return return_type_symbol;
       
 11686                 
       
 11687             }
       
 11688             
       
 11689             ERROR;
       
 11690         }
       
 11691         
       
 11692     }/*function_date_to_ulint*/
       
 11693     break;
       
 11694 
       
 11695 /****
       
 11696  *DATE_TO_BOOL
       
 11697  */
       
 11698     case function_date_to_bool :
       
 11699     {
       
 11700         symbol_c *last_type_symbol = NULL;
       
 11701 
       
 11702         {
       
 11703             identifier_c param_name("IN");
       
 11704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11706             
       
 11707             /* Get the value from a foo(<param_value>) style call */
       
 11708             if (IN_param_value == NULL)
       
 11709               IN_param_value = function_call_param_iterator.next();
       
 11710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11712             
       
 11713             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11714             {
       
 11715         
       
 11716                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11717                 return return_type_symbol;
       
 11718                 
       
 11719             }
       
 11720             
       
 11721             ERROR;
       
 11722         }
       
 11723         
       
 11724     }/*function_date_to_bool*/
       
 11725     break;
       
 11726 
       
 11727 /****
       
 11728  *DATE_TO_BYTE
       
 11729  */
       
 11730     case function_date_to_byte :
       
 11731     {
       
 11732         symbol_c *last_type_symbol = NULL;
       
 11733 
       
 11734         {
       
 11735             identifier_c param_name("IN");
       
 11736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11738             
       
 11739             /* Get the value from a foo(<param_value>) style call */
       
 11740             if (IN_param_value == NULL)
       
 11741               IN_param_value = function_call_param_iterator.next();
       
 11742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11744             
       
 11745             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11746             {
       
 11747         
       
 11748                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11749                 return return_type_symbol;
       
 11750                 
       
 11751             }
       
 11752             
       
 11753             ERROR;
       
 11754         }
       
 11755         
       
 11756     }/*function_date_to_byte*/
       
 11757     break;
       
 11758 
       
 11759 /****
       
 11760  *DATE_TO_WORD
       
 11761  */
       
 11762     case function_date_to_word :
       
 11763     {
       
 11764         symbol_c *last_type_symbol = NULL;
       
 11765 
       
 11766         {
       
 11767             identifier_c param_name("IN");
       
 11768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11770             
       
 11771             /* Get the value from a foo(<param_value>) style call */
       
 11772             if (IN_param_value == NULL)
       
 11773               IN_param_value = function_call_param_iterator.next();
       
 11774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11776             
       
 11777             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11778             {
       
 11779         
       
 11780                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11781                 return return_type_symbol;
       
 11782                 
       
 11783             }
       
 11784             
       
 11785             ERROR;
       
 11786         }
       
 11787         
       
 11788     }/*function_date_to_word*/
       
 11789     break;
       
 11790 
       
 11791 /****
       
 11792  *DATE_TO_DWORD
       
 11793  */
       
 11794     case function_date_to_dword :
       
 11795     {
       
 11796         symbol_c *last_type_symbol = NULL;
       
 11797 
       
 11798         {
       
 11799             identifier_c param_name("IN");
       
 11800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11802             
       
 11803             /* Get the value from a foo(<param_value>) style call */
       
 11804             if (IN_param_value == NULL)
       
 11805               IN_param_value = function_call_param_iterator.next();
       
 11806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11808             
       
 11809             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11810             {
       
 11811         
       
 11812                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11813                 return return_type_symbol;
       
 11814                 
       
 11815             }
       
 11816             
       
 11817             ERROR;
       
 11818         }
       
 11819         
       
 11820     }/*function_date_to_dword*/
       
 11821     break;
       
 11822 
       
 11823 /****
       
 11824  *DATE_TO_LWORD
       
 11825  */
       
 11826     case function_date_to_lword :
       
 11827     {
       
 11828         symbol_c *last_type_symbol = NULL;
       
 11829 
       
 11830         {
       
 11831             identifier_c param_name("IN");
       
 11832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11834             
       
 11835             /* Get the value from a foo(<param_value>) style call */
       
 11836             if (IN_param_value == NULL)
       
 11837               IN_param_value = function_call_param_iterator.next();
       
 11838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11840             
       
 11841             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11842             {
       
 11843         
       
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11845                 return return_type_symbol;
       
 11846                 
       
 11847             }
       
 11848             
       
 11849             ERROR;
       
 11850         }
       
 11851         
       
 11852     }/*function_date_to_lword*/
       
 11853     break;
       
 11854 
       
 11855 /****
       
 11856  *DATE_TO_STRING
       
 11857  */
       
 11858     case function_date_to_string :
       
 11859     {
       
 11860         symbol_c *last_type_symbol = NULL;
       
 11861 
       
 11862         {
       
 11863             identifier_c param_name("IN");
       
 11864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11866             
       
 11867             /* Get the value from a foo(<param_value>) style call */
       
 11868             if (IN_param_value == NULL)
       
 11869               IN_param_value = function_call_param_iterator.next();
       
 11870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11872             
       
 11873             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11874             {
       
 11875         
       
 11876                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11877                 return return_type_symbol;
       
 11878                 
       
 11879             }
       
 11880             
       
 11881             ERROR;
       
 11882         }
       
 11883         
       
 11884     }/*function_date_to_string*/
       
 11885     break;
       
 11886 
       
 11887 /****
       
 11888  *DATE_TO_WSTRING
       
 11889  */
       
 11890     case function_date_to_wstring :
       
 11891     {
       
 11892         symbol_c *last_type_symbol = NULL;
       
 11893 
       
 11894         {
       
 11895             identifier_c param_name("IN");
       
 11896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11898             
       
 11899             /* Get the value from a foo(<param_value>) style call */
       
 11900             if (IN_param_value == NULL)
       
 11901               IN_param_value = function_call_param_iterator.next();
       
 11902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11904             
       
 11905             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 11906             {
       
 11907         
       
 11908                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 11909                 return return_type_symbol;
       
 11910                 
       
 11911             }
       
 11912             
       
 11913             ERROR;
       
 11914         }
       
 11915         
       
 11916     }/*function_date_to_wstring*/
       
 11917     break;
       
 11918 
       
 11919 /****
       
 11920  *TOD_TO_REAL
       
 11921  */
       
 11922     case function_tod_to_real :
       
 11923     {
       
 11924         symbol_c *last_type_symbol = NULL;
       
 11925 
       
 11926         {
       
 11927             identifier_c param_name("IN");
       
 11928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11930             
       
 11931             /* Get the value from a foo(<param_value>) style call */
       
 11932             if (IN_param_value == NULL)
       
 11933               IN_param_value = function_call_param_iterator.next();
       
 11934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11936             
       
 11937             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 11938             {
       
 11939         
       
 11940                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11941                 return return_type_symbol;
       
 11942                 
       
 11943             }
       
 11944             
       
 11945             ERROR;
       
 11946         }
       
 11947         
       
 11948     }/*function_tod_to_real*/
       
 11949     break;
       
 11950 
       
 11951 /****
       
 11952  *TOD_TO_LREAL
       
 11953  */
       
 11954     case function_tod_to_lreal :
       
 11955     {
       
 11956         symbol_c *last_type_symbol = NULL;
       
 11957 
       
 11958         {
       
 11959             identifier_c param_name("IN");
       
 11960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11962             
       
 11963             /* Get the value from a foo(<param_value>) style call */
       
 11964             if (IN_param_value == NULL)
       
 11965               IN_param_value = function_call_param_iterator.next();
       
 11966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11968             
       
 11969             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 11970             {
       
 11971         
       
 11972                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11973                 return return_type_symbol;
       
 11974                 
       
 11975             }
       
 11976             
       
 11977             ERROR;
       
 11978         }
       
 11979         
       
 11980     }/*function_tod_to_lreal*/
       
 11981     break;
       
 11982 
       
 11983 /****
       
 11984  *TOD_TO_SINT
       
 11985  */
       
 11986     case function_tod_to_sint :
       
 11987     {
       
 11988         symbol_c *last_type_symbol = NULL;
       
 11989 
       
 11990         {
       
 11991             identifier_c param_name("IN");
       
 11992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11994             
       
 11995             /* Get the value from a foo(<param_value>) style call */
       
 11996             if (IN_param_value == NULL)
       
 11997               IN_param_value = function_call_param_iterator.next();
       
 11998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12000             
       
 12001             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12002             {
       
 12003         
       
 12004                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12005                 return return_type_symbol;
       
 12006                 
       
 12007             }
       
 12008             
       
 12009             ERROR;
       
 12010         }
       
 12011         
       
 12012     }/*function_tod_to_sint*/
       
 12013     break;
       
 12014 
       
 12015 /****
       
 12016  *TOD_TO_INT
       
 12017  */
       
 12018     case function_tod_to_int :
       
 12019     {
       
 12020         symbol_c *last_type_symbol = NULL;
       
 12021 
       
 12022         {
       
 12023             identifier_c param_name("IN");
       
 12024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12026             
       
 12027             /* Get the value from a foo(<param_value>) style call */
       
 12028             if (IN_param_value == NULL)
       
 12029               IN_param_value = function_call_param_iterator.next();
       
 12030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12032             
       
 12033             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12034             {
       
 12035         
       
 12036                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12037                 return return_type_symbol;
       
 12038                 
       
 12039             }
       
 12040             
       
 12041             ERROR;
       
 12042         }
       
 12043         
       
 12044     }/*function_tod_to_int*/
       
 12045     break;
       
 12046 
       
 12047 /****
       
 12048  *TOD_TO_DINT
       
 12049  */
       
 12050     case function_tod_to_dint :
       
 12051     {
       
 12052         symbol_c *last_type_symbol = NULL;
       
 12053 
       
 12054         {
       
 12055             identifier_c param_name("IN");
       
 12056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12058             
       
 12059             /* Get the value from a foo(<param_value>) style call */
       
 12060             if (IN_param_value == NULL)
       
 12061               IN_param_value = function_call_param_iterator.next();
       
 12062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12064             
       
 12065             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12066             {
       
 12067         
       
 12068                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12069                 return return_type_symbol;
       
 12070                 
       
 12071             }
       
 12072             
       
 12073             ERROR;
       
 12074         }
       
 12075         
       
 12076     }/*function_tod_to_dint*/
       
 12077     break;
       
 12078 
       
 12079 /****
       
 12080  *TOD_TO_LINT
       
 12081  */
       
 12082     case function_tod_to_lint :
       
 12083     {
       
 12084         symbol_c *last_type_symbol = NULL;
       
 12085 
       
 12086         {
       
 12087             identifier_c param_name("IN");
       
 12088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12090             
       
 12091             /* Get the value from a foo(<param_value>) style call */
       
 12092             if (IN_param_value == NULL)
       
 12093               IN_param_value = function_call_param_iterator.next();
       
 12094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12096             
       
 12097             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12098             {
       
 12099         
       
 12100                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12101                 return return_type_symbol;
       
 12102                 
       
 12103             }
       
 12104             
       
 12105             ERROR;
       
 12106         }
       
 12107         
       
 12108     }/*function_tod_to_lint*/
       
 12109     break;
       
 12110 
       
 12111 /****
       
 12112  *TOD_TO_USINT
       
 12113  */
       
 12114     case function_tod_to_usint :
       
 12115     {
       
 12116         symbol_c *last_type_symbol = NULL;
       
 12117 
       
 12118         {
       
 12119             identifier_c param_name("IN");
       
 12120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12122             
       
 12123             /* Get the value from a foo(<param_value>) style call */
       
 12124             if (IN_param_value == NULL)
       
 12125               IN_param_value = function_call_param_iterator.next();
       
 12126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12128             
       
 12129             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12130             {
       
 12131         
       
 12132                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12133                 return return_type_symbol;
       
 12134                 
       
 12135             }
       
 12136             
       
 12137             ERROR;
       
 12138         }
       
 12139         
       
 12140     }/*function_tod_to_usint*/
       
 12141     break;
       
 12142 
       
 12143 /****
       
 12144  *TOD_TO_UINT
       
 12145  */
       
 12146     case function_tod_to_uint :
       
 12147     {
       
 12148         symbol_c *last_type_symbol = NULL;
       
 12149 
       
 12150         {
       
 12151             identifier_c param_name("IN");
       
 12152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12154             
       
 12155             /* Get the value from a foo(<param_value>) style call */
       
 12156             if (IN_param_value == NULL)
       
 12157               IN_param_value = function_call_param_iterator.next();
       
 12158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12160             
       
 12161             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12162             {
       
 12163         
       
 12164                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12165                 return return_type_symbol;
       
 12166                 
       
 12167             }
       
 12168             
       
 12169             ERROR;
       
 12170         }
       
 12171         
       
 12172     }/*function_tod_to_uint*/
       
 12173     break;
       
 12174 
       
 12175 /****
       
 12176  *TOD_TO_UDINT
       
 12177  */
       
 12178     case function_tod_to_udint :
       
 12179     {
       
 12180         symbol_c *last_type_symbol = NULL;
       
 12181 
       
 12182         {
       
 12183             identifier_c param_name("IN");
       
 12184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12186             
       
 12187             /* Get the value from a foo(<param_value>) style call */
       
 12188             if (IN_param_value == NULL)
       
 12189               IN_param_value = function_call_param_iterator.next();
       
 12190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12192             
       
 12193             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12194             {
       
 12195         
       
 12196                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12197                 return return_type_symbol;
       
 12198                 
       
 12199             }
       
 12200             
       
 12201             ERROR;
       
 12202         }
       
 12203         
       
 12204     }/*function_tod_to_udint*/
       
 12205     break;
       
 12206 
       
 12207 /****
       
 12208  *TOD_TO_ULINT
       
 12209  */
       
 12210     case function_tod_to_ulint :
       
 12211     {
       
 12212         symbol_c *last_type_symbol = NULL;
       
 12213 
       
 12214         {
       
 12215             identifier_c param_name("IN");
       
 12216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12218             
       
 12219             /* Get the value from a foo(<param_value>) style call */
       
 12220             if (IN_param_value == NULL)
       
 12221               IN_param_value = function_call_param_iterator.next();
       
 12222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12224             
       
 12225             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12226             {
       
 12227         
       
 12228                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12229                 return return_type_symbol;
       
 12230                 
       
 12231             }
       
 12232             
       
 12233             ERROR;
       
 12234         }
       
 12235         
       
 12236     }/*function_tod_to_ulint*/
       
 12237     break;
       
 12238 
       
 12239 /****
       
 12240  *TOD_TO_BOOL
       
 12241  */
       
 12242     case function_tod_to_bool :
       
 12243     {
       
 12244         symbol_c *last_type_symbol = NULL;
       
 12245 
       
 12246         {
       
 12247             identifier_c param_name("IN");
       
 12248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12250             
       
 12251             /* Get the value from a foo(<param_value>) style call */
       
 12252             if (IN_param_value == NULL)
       
 12253               IN_param_value = function_call_param_iterator.next();
       
 12254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12256             
       
 12257             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12258             {
       
 12259         
       
 12260                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12261                 return return_type_symbol;
       
 12262                 
       
 12263             }
       
 12264             
       
 12265             ERROR;
       
 12266         }
       
 12267         
       
 12268     }/*function_tod_to_bool*/
       
 12269     break;
       
 12270 
       
 12271 /****
       
 12272  *TOD_TO_BYTE
       
 12273  */
       
 12274     case function_tod_to_byte :
       
 12275     {
       
 12276         symbol_c *last_type_symbol = NULL;
       
 12277 
       
 12278         {
       
 12279             identifier_c param_name("IN");
       
 12280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12282             
       
 12283             /* Get the value from a foo(<param_value>) style call */
       
 12284             if (IN_param_value == NULL)
       
 12285               IN_param_value = function_call_param_iterator.next();
       
 12286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12288             
       
 12289             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12290             {
       
 12291         
       
 12292                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12293                 return return_type_symbol;
       
 12294                 
       
 12295             }
       
 12296             
       
 12297             ERROR;
       
 12298         }
       
 12299         
       
 12300     }/*function_tod_to_byte*/
       
 12301     break;
       
 12302 
       
 12303 /****
       
 12304  *TOD_TO_WORD
       
 12305  */
       
 12306     case function_tod_to_word :
       
 12307     {
       
 12308         symbol_c *last_type_symbol = NULL;
       
 12309 
       
 12310         {
       
 12311             identifier_c param_name("IN");
       
 12312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12314             
       
 12315             /* Get the value from a foo(<param_value>) style call */
       
 12316             if (IN_param_value == NULL)
       
 12317               IN_param_value = function_call_param_iterator.next();
       
 12318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12320             
       
 12321             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12322             {
       
 12323         
       
 12324                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12325                 return return_type_symbol;
       
 12326                 
       
 12327             }
       
 12328             
       
 12329             ERROR;
       
 12330         }
       
 12331         
       
 12332     }/*function_tod_to_word*/
       
 12333     break;
       
 12334 
       
 12335 /****
       
 12336  *TOD_TO_DWORD
       
 12337  */
       
 12338     case function_tod_to_dword :
       
 12339     {
       
 12340         symbol_c *last_type_symbol = NULL;
       
 12341 
       
 12342         {
       
 12343             identifier_c param_name("IN");
       
 12344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12346             
       
 12347             /* Get the value from a foo(<param_value>) style call */
       
 12348             if (IN_param_value == NULL)
       
 12349               IN_param_value = function_call_param_iterator.next();
       
 12350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12352             
       
 12353             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12354             {
       
 12355         
       
 12356                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12357                 return return_type_symbol;
       
 12358                 
       
 12359             }
       
 12360             
       
 12361             ERROR;
       
 12362         }
       
 12363         
       
 12364     }/*function_tod_to_dword*/
       
 12365     break;
       
 12366 
       
 12367 /****
       
 12368  *TOD_TO_LWORD
       
 12369  */
       
 12370     case function_tod_to_lword :
       
 12371     {
       
 12372         symbol_c *last_type_symbol = NULL;
       
 12373 
       
 12374         {
       
 12375             identifier_c param_name("IN");
       
 12376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12378             
       
 12379             /* Get the value from a foo(<param_value>) style call */
       
 12380             if (IN_param_value == NULL)
       
 12381               IN_param_value = function_call_param_iterator.next();
       
 12382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12384             
       
 12385             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12386             {
       
 12387         
       
 12388                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12389                 return return_type_symbol;
       
 12390                 
       
 12391             }
       
 12392             
       
 12393             ERROR;
       
 12394         }
       
 12395         
       
 12396     }/*function_tod_to_lword*/
       
 12397     break;
       
 12398 
       
 12399 /****
       
 12400  *TOD_TO_STRING
       
 12401  */
       
 12402     case function_tod_to_string :
       
 12403     {
       
 12404         symbol_c *last_type_symbol = NULL;
       
 12405 
       
 12406         {
       
 12407             identifier_c param_name("IN");
       
 12408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12410             
       
 12411             /* Get the value from a foo(<param_value>) style call */
       
 12412             if (IN_param_value == NULL)
       
 12413               IN_param_value = function_call_param_iterator.next();
       
 12414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12416             
       
 12417             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12418             {
       
 12419         
       
 12420                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12421                 return return_type_symbol;
       
 12422                 
       
 12423             }
       
 12424             
       
 12425             ERROR;
       
 12426         }
       
 12427         
       
 12428     }/*function_tod_to_string*/
       
 12429     break;
       
 12430 
       
 12431 /****
       
 12432  *TOD_TO_WSTRING
       
 12433  */
       
 12434     case function_tod_to_wstring :
       
 12435     {
       
 12436         symbol_c *last_type_symbol = NULL;
       
 12437 
       
 12438         {
       
 12439             identifier_c param_name("IN");
       
 12440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12442             
       
 12443             /* Get the value from a foo(<param_value>) style call */
       
 12444             if (IN_param_value == NULL)
       
 12445               IN_param_value = function_call_param_iterator.next();
       
 12446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12448             
       
 12449             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 12450             {
       
 12451         
       
 12452                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12453                 return return_type_symbol;
       
 12454                 
       
 12455             }
       
 12456             
       
 12457             ERROR;
       
 12458         }
       
 12459         
       
 12460     }/*function_tod_to_wstring*/
       
 12461     break;
       
 12462 
       
 12463 /****
       
 12464  *DT_TO_REAL
       
 12465  */
       
 12466     case function_dt_to_real :
       
 12467     {
       
 12468         symbol_c *last_type_symbol = NULL;
       
 12469 
       
 12470         {
       
 12471             identifier_c param_name("IN");
       
 12472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12474             
       
 12475             /* Get the value from a foo(<param_value>) style call */
       
 12476             if (IN_param_value == NULL)
       
 12477               IN_param_value = function_call_param_iterator.next();
       
 12478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12480             
       
 12481             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12482             {
       
 12483         
       
 12484                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12485                 return return_type_symbol;
       
 12486                 
       
 12487             }
       
 12488             
       
 12489             ERROR;
       
 12490         }
       
 12491         
       
 12492     }/*function_dt_to_real*/
       
 12493     break;
       
 12494 
       
 12495 /****
       
 12496  *DT_TO_LREAL
       
 12497  */
       
 12498     case function_dt_to_lreal :
       
 12499     {
       
 12500         symbol_c *last_type_symbol = NULL;
       
 12501 
       
 12502         {
       
 12503             identifier_c param_name("IN");
       
 12504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12506             
       
 12507             /* Get the value from a foo(<param_value>) style call */
       
 12508             if (IN_param_value == NULL)
       
 12509               IN_param_value = function_call_param_iterator.next();
       
 12510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12512             
       
 12513             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12514             {
       
 12515         
       
 12516                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12517                 return return_type_symbol;
       
 12518                 
       
 12519             }
       
 12520             
       
 12521             ERROR;
       
 12522         }
       
 12523         
       
 12524     }/*function_dt_to_lreal*/
       
 12525     break;
       
 12526 
       
 12527 /****
       
 12528  *DT_TO_SINT
       
 12529  */
       
 12530     case function_dt_to_sint :
       
 12531     {
       
 12532         symbol_c *last_type_symbol = NULL;
       
 12533 
       
 12534         {
       
 12535             identifier_c param_name("IN");
       
 12536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12538             
       
 12539             /* Get the value from a foo(<param_value>) style call */
       
 12540             if (IN_param_value == NULL)
       
 12541               IN_param_value = function_call_param_iterator.next();
       
 12542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12544             
       
 12545             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12546             {
       
 12547         
       
 12548                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12549                 return return_type_symbol;
       
 12550                 
       
 12551             }
       
 12552             
       
 12553             ERROR;
       
 12554         }
       
 12555         
       
 12556     }/*function_dt_to_sint*/
       
 12557     break;
       
 12558 
       
 12559 /****
       
 12560  *DT_TO_INT
       
 12561  */
       
 12562     case function_dt_to_int :
       
 12563     {
       
 12564         symbol_c *last_type_symbol = NULL;
       
 12565 
       
 12566         {
       
 12567             identifier_c param_name("IN");
       
 12568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12570             
       
 12571             /* Get the value from a foo(<param_value>) style call */
       
 12572             if (IN_param_value == NULL)
       
 12573               IN_param_value = function_call_param_iterator.next();
       
 12574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12576             
       
 12577             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12578             {
       
 12579         
       
 12580                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12581                 return return_type_symbol;
       
 12582                 
       
 12583             }
       
 12584             
       
 12585             ERROR;
       
 12586         }
       
 12587         
       
 12588     }/*function_dt_to_int*/
       
 12589     break;
       
 12590 
       
 12591 /****
       
 12592  *DT_TO_DINT
       
 12593  */
       
 12594     case function_dt_to_dint :
       
 12595     {
       
 12596         symbol_c *last_type_symbol = NULL;
       
 12597 
       
 12598         {
       
 12599             identifier_c param_name("IN");
       
 12600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12602             
       
 12603             /* Get the value from a foo(<param_value>) style call */
       
 12604             if (IN_param_value == NULL)
       
 12605               IN_param_value = function_call_param_iterator.next();
       
 12606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12608             
       
 12609             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12610             {
       
 12611         
       
 12612                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12613                 return return_type_symbol;
       
 12614                 
       
 12615             }
       
 12616             
       
 12617             ERROR;
       
 12618         }
       
 12619         
       
 12620     }/*function_dt_to_dint*/
       
 12621     break;
       
 12622 
       
 12623 /****
       
 12624  *DT_TO_LINT
       
 12625  */
       
 12626     case function_dt_to_lint :
       
 12627     {
       
 12628         symbol_c *last_type_symbol = NULL;
       
 12629 
       
 12630         {
       
 12631             identifier_c param_name("IN");
       
 12632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12634             
       
 12635             /* Get the value from a foo(<param_value>) style call */
       
 12636             if (IN_param_value == NULL)
       
 12637               IN_param_value = function_call_param_iterator.next();
       
 12638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12640             
       
 12641             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12642             {
       
 12643         
       
 12644                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12645                 return return_type_symbol;
       
 12646                 
       
 12647             }
       
 12648             
       
 12649             ERROR;
       
 12650         }
       
 12651         
       
 12652     }/*function_dt_to_lint*/
       
 12653     break;
       
 12654 
       
 12655 /****
       
 12656  *DT_TO_USINT
       
 12657  */
       
 12658     case function_dt_to_usint :
       
 12659     {
       
 12660         symbol_c *last_type_symbol = NULL;
       
 12661 
       
 12662         {
       
 12663             identifier_c param_name("IN");
       
 12664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12666             
       
 12667             /* Get the value from a foo(<param_value>) style call */
       
 12668             if (IN_param_value == NULL)
       
 12669               IN_param_value = function_call_param_iterator.next();
       
 12670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12672             
       
 12673             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12674             {
       
 12675         
       
 12676                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12677                 return return_type_symbol;
       
 12678                 
       
 12679             }
       
 12680             
       
 12681             ERROR;
       
 12682         }
       
 12683         
       
 12684     }/*function_dt_to_usint*/
       
 12685     break;
       
 12686 
       
 12687 /****
       
 12688  *DT_TO_UINT
       
 12689  */
       
 12690     case function_dt_to_uint :
       
 12691     {
       
 12692         symbol_c *last_type_symbol = NULL;
       
 12693 
       
 12694         {
       
 12695             identifier_c param_name("IN");
       
 12696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12698             
       
 12699             /* Get the value from a foo(<param_value>) style call */
       
 12700             if (IN_param_value == NULL)
       
 12701               IN_param_value = function_call_param_iterator.next();
       
 12702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12704             
       
 12705             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12706             {
       
 12707         
       
 12708                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12709                 return return_type_symbol;
       
 12710                 
       
 12711             }
       
 12712             
       
 12713             ERROR;
       
 12714         }
       
 12715         
       
 12716     }/*function_dt_to_uint*/
       
 12717     break;
       
 12718 
       
 12719 /****
       
 12720  *DT_TO_UDINT
       
 12721  */
       
 12722     case function_dt_to_udint :
       
 12723     {
       
 12724         symbol_c *last_type_symbol = NULL;
       
 12725 
       
 12726         {
       
 12727             identifier_c param_name("IN");
       
 12728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12730             
       
 12731             /* Get the value from a foo(<param_value>) style call */
       
 12732             if (IN_param_value == NULL)
       
 12733               IN_param_value = function_call_param_iterator.next();
       
 12734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12736             
       
 12737             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12738             {
       
 12739         
       
 12740                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12741                 return return_type_symbol;
       
 12742                 
       
 12743             }
       
 12744             
       
 12745             ERROR;
       
 12746         }
       
 12747         
       
 12748     }/*function_dt_to_udint*/
       
 12749     break;
       
 12750 
       
 12751 /****
       
 12752  *DT_TO_ULINT
       
 12753  */
       
 12754     case function_dt_to_ulint :
       
 12755     {
       
 12756         symbol_c *last_type_symbol = NULL;
       
 12757 
       
 12758         {
       
 12759             identifier_c param_name("IN");
       
 12760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12762             
       
 12763             /* Get the value from a foo(<param_value>) style call */
       
 12764             if (IN_param_value == NULL)
       
 12765               IN_param_value = function_call_param_iterator.next();
       
 12766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12768             
       
 12769             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12770             {
       
 12771         
       
 12772                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12773                 return return_type_symbol;
       
 12774                 
       
 12775             }
       
 12776             
       
 12777             ERROR;
       
 12778         }
       
 12779         
       
 12780     }/*function_dt_to_ulint*/
       
 12781     break;
       
 12782 
       
 12783 /****
       
 12784  *DT_TO_BOOL
       
 12785  */
       
 12786     case function_dt_to_bool :
       
 12787     {
       
 12788         symbol_c *last_type_symbol = NULL;
       
 12789 
       
 12790         {
       
 12791             identifier_c param_name("IN");
       
 12792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12794             
       
 12795             /* Get the value from a foo(<param_value>) style call */
       
 12796             if (IN_param_value == NULL)
       
 12797               IN_param_value = function_call_param_iterator.next();
       
 12798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12800             
       
 12801             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12802             {
       
 12803         
       
 12804                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12805                 return return_type_symbol;
       
 12806                 
       
 12807             }
       
 12808             
       
 12809             ERROR;
       
 12810         }
       
 12811         
       
 12812     }/*function_dt_to_bool*/
       
 12813     break;
       
 12814 
       
 12815 /****
       
 12816  *DT_TO_BYTE
       
 12817  */
       
 12818     case function_dt_to_byte :
       
 12819     {
       
 12820         symbol_c *last_type_symbol = NULL;
       
 12821 
       
 12822         {
       
 12823             identifier_c param_name("IN");
       
 12824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12826             
       
 12827             /* Get the value from a foo(<param_value>) style call */
       
 12828             if (IN_param_value == NULL)
       
 12829               IN_param_value = function_call_param_iterator.next();
       
 12830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12832             
       
 12833             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12834             {
       
 12835         
       
 12836                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12837                 return return_type_symbol;
       
 12838                 
       
 12839             }
       
 12840             
       
 12841             ERROR;
       
 12842         }
       
 12843         
       
 12844     }/*function_dt_to_byte*/
       
 12845     break;
       
 12846 
       
 12847 /****
       
 12848  *DT_TO_WORD
       
 12849  */
       
 12850     case function_dt_to_word :
       
 12851     {
       
 12852         symbol_c *last_type_symbol = NULL;
       
 12853 
       
 12854         {
       
 12855             identifier_c param_name("IN");
       
 12856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12858             
       
 12859             /* Get the value from a foo(<param_value>) style call */
       
 12860             if (IN_param_value == NULL)
       
 12861               IN_param_value = function_call_param_iterator.next();
       
 12862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12864             
       
 12865             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12866             {
       
 12867         
       
 12868                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12869                 return return_type_symbol;
       
 12870                 
       
 12871             }
       
 12872             
       
 12873             ERROR;
       
 12874         }
       
 12875         
       
 12876     }/*function_dt_to_word*/
       
 12877     break;
       
 12878 
       
 12879 /****
       
 12880  *DT_TO_DWORD
       
 12881  */
       
 12882     case function_dt_to_dword :
       
 12883     {
       
 12884         symbol_c *last_type_symbol = NULL;
       
 12885 
       
 12886         {
       
 12887             identifier_c param_name("IN");
       
 12888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12890             
       
 12891             /* Get the value from a foo(<param_value>) style call */
       
 12892             if (IN_param_value == NULL)
       
 12893               IN_param_value = function_call_param_iterator.next();
       
 12894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12896             
       
 12897             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12898             {
       
 12899         
       
 12900                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12901                 return return_type_symbol;
       
 12902                 
       
 12903             }
       
 12904             
       
 12905             ERROR;
       
 12906         }
       
 12907         
       
 12908     }/*function_dt_to_dword*/
       
 12909     break;
       
 12910 
       
 12911 /****
       
 12912  *DT_TO_LWORD
       
 12913  */
       
 12914     case function_dt_to_lword :
       
 12915     {
       
 12916         symbol_c *last_type_symbol = NULL;
       
 12917 
       
 12918         {
       
 12919             identifier_c param_name("IN");
       
 12920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12922             
       
 12923             /* Get the value from a foo(<param_value>) style call */
       
 12924             if (IN_param_value == NULL)
       
 12925               IN_param_value = function_call_param_iterator.next();
       
 12926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12928             
       
 12929             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12930             {
       
 12931         
       
 12932                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12933                 return return_type_symbol;
       
 12934                 
       
 12935             }
       
 12936             
       
 12937             ERROR;
       
 12938         }
       
 12939         
       
 12940     }/*function_dt_to_lword*/
       
 12941     break;
       
 12942 
       
 12943 /****
       
 12944  *DT_TO_STRING
       
 12945  */
       
 12946     case function_dt_to_string :
       
 12947     {
       
 12948         symbol_c *last_type_symbol = NULL;
       
 12949 
       
 12950         {
       
 12951             identifier_c param_name("IN");
       
 12952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12954             
       
 12955             /* Get the value from a foo(<param_value>) style call */
       
 12956             if (IN_param_value == NULL)
       
 12957               IN_param_value = function_call_param_iterator.next();
       
 12958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12960             
       
 12961             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12962             {
       
 12963         
       
 12964                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12965                 return return_type_symbol;
       
 12966                 
       
 12967             }
       
 12968             
       
 12969             ERROR;
       
 12970         }
       
 12971         
       
 12972     }/*function_dt_to_string*/
       
 12973     break;
       
 12974 
       
 12975 /****
       
 12976  *DT_TO_WSTRING
       
 12977  */
       
 12978     case function_dt_to_wstring :
       
 12979     {
       
 12980         symbol_c *last_type_symbol = NULL;
       
 12981 
       
 12982         {
       
 12983             identifier_c param_name("IN");
       
 12984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12986             
       
 12987             /* Get the value from a foo(<param_value>) style call */
       
 12988             if (IN_param_value == NULL)
       
 12989               IN_param_value = function_call_param_iterator.next();
       
 12990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12992             
       
 12993             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12994             {
       
 12995         
       
 12996                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 12997                 return return_type_symbol;
       
 12998                 
       
 12999             }
       
 13000             
       
 13001             ERROR;
       
 13002         }
       
 13003         
       
 13004     }/*function_dt_to_wstring*/
       
 13005     break;
       
 13006 
       
 13007 /****
       
 13008  *TRUNC
       
 13009  */
       
 13010     case function_trunc :
       
 13011     {
       
 13012         symbol_c *last_type_symbol = NULL;
       
 13013 
       
 13014         {
       
 13015             identifier_c param_name("IN");
       
 13016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13018             
       
 13019             /* Get the value from a foo(<param_value>) style call */
       
 13020             if (IN_param_value == NULL)
       
 13021               IN_param_value = function_call_param_iterator.next();
       
 13022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13024             
       
 13025             if(search_expression_type->is_real_type(IN_type_symbol))
       
 13026             {
       
 13027         
       
 13028                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13029                 return return_type_symbol;
       
 13030                 
       
 13031             }
       
 13032             
       
 13033             ERROR;
       
 13034         }
       
 13035         
       
 13036     }/*function_trunc*/
       
 13037     break;
       
 13038 
       
 13039 /****
       
 13040  *BCD_TO_SINT
       
 13041  */
       
 13042     case function_bcd_to_sint :
       
 13043     {
       
 13044         symbol_c *last_type_symbol = NULL;
       
 13045 
       
 13046         {
       
 13047             identifier_c param_name("IN");
       
 13048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13050             
       
 13051             /* Get the value from a foo(<param_value>) style call */
       
 13052             if (IN_param_value == NULL)
       
 13053               IN_param_value = function_call_param_iterator.next();
       
 13054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13056             
       
 13057             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13058             {
       
 13059         
       
 13060                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 13061                 return return_type_symbol;
       
 13062                 
       
 13063             }
       
 13064             
       
 13065             ERROR;
       
 13066         }
       
 13067         
       
 13068     }/*function_bcd_to_sint*/
       
 13069     break;
       
 13070 
       
 13071 /****
       
 13072  *BCD_TO_INT
       
 13073  */
       
 13074     case function_bcd_to_int :
       
 13075     {
       
 13076         symbol_c *last_type_symbol = NULL;
       
 13077 
       
 13078         {
       
 13079             identifier_c param_name("IN");
       
 13080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13082             
       
 13083             /* Get the value from a foo(<param_value>) style call */
       
 13084             if (IN_param_value == NULL)
       
 13085               IN_param_value = function_call_param_iterator.next();
       
 13086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13088             
       
 13089             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13090             {
       
 13091         
       
 13092                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 13093                 return return_type_symbol;
       
 13094                 
       
 13095             }
       
 13096             
       
 13097             ERROR;
       
 13098         }
       
 13099         
       
 13100     }/*function_bcd_to_int*/
       
 13101     break;
       
 13102 
       
 13103 /****
       
 13104  *BCD_TO_DINT
       
 13105  */
       
 13106     case function_bcd_to_dint :
       
 13107     {
       
 13108         symbol_c *last_type_symbol = NULL;
       
 13109 
       
 13110         {
       
 13111             identifier_c param_name("IN");
       
 13112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13114             
       
 13115             /* Get the value from a foo(<param_value>) style call */
       
 13116             if (IN_param_value == NULL)
       
 13117               IN_param_value = function_call_param_iterator.next();
       
 13118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13120             
       
 13121             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13122             {
       
 13123         
       
 13124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 13125                 return return_type_symbol;
       
 13126                 
       
 13127             }
       
 13128             
       
 13129             ERROR;
       
 13130         }
       
 13131         
       
 13132     }/*function_bcd_to_dint*/
       
 13133     break;
       
 13134 
       
 13135 /****
       
 13136  *BCD_TO_LINT
       
 13137  */
       
 13138     case function_bcd_to_lint :
       
 13139     {
       
 13140         symbol_c *last_type_symbol = NULL;
       
 13141 
       
 13142         {
       
 13143             identifier_c param_name("IN");
       
 13144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13146             
       
 13147             /* Get the value from a foo(<param_value>) style call */
       
 13148             if (IN_param_value == NULL)
       
 13149               IN_param_value = function_call_param_iterator.next();
       
 13150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13152             
       
 13153             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13154             {
       
 13155         
       
 13156                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 13157                 return return_type_symbol;
       
 13158                 
       
 13159             }
       
 13160             
       
 13161             ERROR;
       
 13162         }
       
 13163         
       
 13164     }/*function_bcd_to_lint*/
       
 13165     break;
       
 13166 
       
 13167 /****
       
 13168  *BCD_TO_USINT
       
 13169  */
       
 13170     case function_bcd_to_usint :
       
 13171     {
       
 13172         symbol_c *last_type_symbol = NULL;
       
 13173 
       
 13174         {
       
 13175             identifier_c param_name("IN");
       
 13176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13178             
       
 13179             /* Get the value from a foo(<param_value>) style call */
       
 13180             if (IN_param_value == NULL)
       
 13181               IN_param_value = function_call_param_iterator.next();
       
 13182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13184             
       
 13185             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13186             {
       
 13187         
       
 13188                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13189                 return return_type_symbol;
       
 13190                 
       
 13191             }
       
 13192             
       
 13193             ERROR;
       
 13194         }
       
 13195         
       
 13196     }/*function_bcd_to_usint*/
       
 13197     break;
       
 13198 
       
 13199 /****
       
 13200  *BCD_TO_UINT
       
 13201  */
       
 13202     case function_bcd_to_uint :
       
 13203     {
       
 13204         symbol_c *last_type_symbol = NULL;
       
 13205 
       
 13206         {
       
 13207             identifier_c param_name("IN");
       
 13208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13210             
       
 13211             /* Get the value from a foo(<param_value>) style call */
       
 13212             if (IN_param_value == NULL)
       
 13213               IN_param_value = function_call_param_iterator.next();
       
 13214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13216             
       
 13217             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13218             {
       
 13219         
       
 13220                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13221                 return return_type_symbol;
       
 13222                 
       
 13223             }
       
 13224             
       
 13225             ERROR;
       
 13226         }
       
 13227         
       
 13228     }/*function_bcd_to_uint*/
       
 13229     break;
       
 13230 
       
 13231 /****
       
 13232  *BCD_TO_UDINT
       
 13233  */
       
 13234     case function_bcd_to_udint :
       
 13235     {
       
 13236         symbol_c *last_type_symbol = NULL;
       
 13237 
       
 13238         {
       
 13239             identifier_c param_name("IN");
       
 13240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13242             
       
 13243             /* Get the value from a foo(<param_value>) style call */
       
 13244             if (IN_param_value == NULL)
       
 13245               IN_param_value = function_call_param_iterator.next();
       
 13246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13248             
       
 13249             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13250             {
       
 13251         
       
 13252                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13253                 return return_type_symbol;
       
 13254                 
       
 13255             }
       
 13256             
       
 13257             ERROR;
       
 13258         }
       
 13259         
       
 13260     }/*function_bcd_to_udint*/
       
 13261     break;
       
 13262 
       
 13263 /****
       
 13264  *BCD_TO_ULINT
       
 13265  */
       
 13266     case function_bcd_to_ulint :
       
 13267     {
       
 13268         symbol_c *last_type_symbol = NULL;
       
 13269 
       
 13270         {
       
 13271             identifier_c param_name("IN");
       
 13272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13274             
       
 13275             /* Get the value from a foo(<param_value>) style call */
       
 13276             if (IN_param_value == NULL)
       
 13277               IN_param_value = function_call_param_iterator.next();
       
 13278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13280             
       
 13281             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13282             {
       
 13283         
       
 13284                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13285                 return return_type_symbol;
       
 13286                 
       
 13287             }
       
 13288             
       
 13289             ERROR;
       
 13290         }
       
 13291         
       
 13292     }/*function_bcd_to_ulint*/
 11948     }/*function_bcd_to_ulint*/
 13293     break;
       
 13294 
       
 13295 /****
       
 13296  *SINT_TO_BCD
       
 13297  */
       
 13298     case function_sint_to_bcd :
       
 13299     {
       
 13300         symbol_c *last_type_symbol = NULL;
       
 13301 
       
 13302         {
       
 13303             identifier_c param_name("IN");
       
 13304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13306             
       
 13307             /* Get the value from a foo(<param_value>) style call */
       
 13308             if (IN_param_value == NULL)
       
 13309               IN_param_value = function_call_param_iterator.next();
       
 13310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13312             
       
 13313             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 13314             {
       
 13315         
       
 13316                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13317                 return return_type_symbol;
       
 13318                 
       
 13319             }
       
 13320             
       
 13321             ERROR;
       
 13322         }
       
 13323         
       
 13324     }/*function_sint_to_bcd*/
       
 13325     break;
       
 13326 
       
 13327 /****
       
 13328  *INT_TO_BCD
       
 13329  */
       
 13330     case function_int_to_bcd :
       
 13331     {
       
 13332         symbol_c *last_type_symbol = NULL;
       
 13333 
       
 13334         {
       
 13335             identifier_c param_name("IN");
       
 13336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13338             
       
 13339             /* Get the value from a foo(<param_value>) style call */
       
 13340             if (IN_param_value == NULL)
       
 13341               IN_param_value = function_call_param_iterator.next();
       
 13342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13344             
       
 13345             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 13346             {
       
 13347         
       
 13348                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13349                 return return_type_symbol;
       
 13350                 
       
 13351             }
       
 13352             
       
 13353             ERROR;
       
 13354         }
       
 13355         
       
 13356     }/*function_int_to_bcd*/
       
 13357     break;
       
 13358 
       
 13359 /****
       
 13360  *DINT_TO_BCD
       
 13361  */
       
 13362     case function_dint_to_bcd :
       
 13363     {
       
 13364         symbol_c *last_type_symbol = NULL;
       
 13365 
       
 13366         {
       
 13367             identifier_c param_name("IN");
       
 13368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13370             
       
 13371             /* Get the value from a foo(<param_value>) style call */
       
 13372             if (IN_param_value == NULL)
       
 13373               IN_param_value = function_call_param_iterator.next();
       
 13374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13376             
       
 13377             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 13378             {
       
 13379         
       
 13380                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13381                 return return_type_symbol;
       
 13382                 
       
 13383             }
       
 13384             
       
 13385             ERROR;
       
 13386         }
       
 13387         
       
 13388     }/*function_dint_to_bcd*/
       
 13389     break;
       
 13390 
       
 13391 /****
       
 13392  *LINT_TO_BCD
       
 13393  */
       
 13394     case function_lint_to_bcd :
       
 13395     {
       
 13396         symbol_c *last_type_symbol = NULL;
       
 13397 
       
 13398         {
       
 13399             identifier_c param_name("IN");
       
 13400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13402             
       
 13403             /* Get the value from a foo(<param_value>) style call */
       
 13404             if (IN_param_value == NULL)
       
 13405               IN_param_value = function_call_param_iterator.next();
       
 13406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13408             
       
 13409             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 13410             {
       
 13411         
       
 13412                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13413                 return return_type_symbol;
       
 13414                 
       
 13415             }
       
 13416             
       
 13417             ERROR;
       
 13418         }
       
 13419         
       
 13420     }/*function_lint_to_bcd*/
       
 13421     break;
 11949     break;
 13422 
 11950 
 13423 /****
 11951 /****
 13424  *USINT_TO_BCD
 11952  *USINT_TO_BCD
 13425  */
 11953  */
 14679             if (IN_param_value == NULL)
 13207             if (IN_param_value == NULL)
 14680               IN_param_value = function_call_param_iterator.next();
 13208               IN_param_value = function_call_param_iterator.next();
 14681             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14682             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14683             
 13211             
 14684             if(search_expression_type->is_binary_type(IN_type_symbol))
 13212             if(search_expression_type->is_nbinary_type(IN_type_symbol))
 14685             {
 13213             {
 14686         
 13214         
 14687                 {
 13215                 {
 14688                     identifier_c param_name("N");
 13216                     identifier_c param_name("N");
 14689                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 13217                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14730             if (IN_param_value == NULL)
 13258             if (IN_param_value == NULL)
 14731               IN_param_value = function_call_param_iterator.next();
 13259               IN_param_value = function_call_param_iterator.next();
 14732             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13260             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14733             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13261             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14734             
 13262             
 14735             if(search_expression_type->is_binary_type(IN_type_symbol))
 13263             if(search_expression_type->is_nbinary_type(IN_type_symbol))
 14736             {
 13264             {
 14737         
 13265         
 14738                 {
 13266                 {
 14739                     identifier_c param_name("N");
 13267                     identifier_c param_name("N");
 14740                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 13268                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16543         
 15071         
 16544     }/*function_real_to_string*/
 15072     }/*function_real_to_string*/
 16545     break;
 15073     break;
 16546 
 15074 
 16547 /****
 15075 /****
 16548  *REAL_TO_WSTRING
 15076  *REAL_TO_DATE
 16549  */
 15077  */
 16550     case function_real_to_wstring :
 15078     case function_real_to_date :
 16551     {
 15079     {
 16552         symbol_c *last_type_symbol = NULL;
 15080         symbol_c *last_type_symbol = NULL;
 16553 
 15081 
 16554         {
 15082         {
 16555             symbol_c *IN_type_symbol = param_data_type;
 15083             symbol_c *IN_type_symbol = param_data_type;
 16556             last_type_symbol = param_data_type;
 15084             last_type_symbol = param_data_type;
 16557             
 15085             
 16558             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 15086             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16559             {
 15087             {
 16560         
 15088         
 16561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 15089                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16562                 return return_type_symbol;
 15090                 return return_type_symbol;
 16563                 
 15091                 
 16564             }
 15092             }
 16565             
 15093             
 16566             ERROR;
 15094             ERROR;
 16567         }
 15095         }
 16568         
 15096         
 16569     }/*function_real_to_wstring*/
 15097     }/*function_real_to_date*/
 16570     break;
 15098     break;
 16571 
 15099 
 16572 /****
 15100 /****
 16573  *REAL_TO_DATE
 15101  *REAL_TO_TOD
 16574  */
 15102  */
 16575     case function_real_to_date :
 15103     case function_real_to_tod :
 16576     {
 15104     {
 16577         symbol_c *last_type_symbol = NULL;
 15105         symbol_c *last_type_symbol = NULL;
 16578 
 15106 
 16579         {
 15107         {
 16580             symbol_c *IN_type_symbol = param_data_type;
 15108             symbol_c *IN_type_symbol = param_data_type;
 16581             last_type_symbol = param_data_type;
 15109             last_type_symbol = param_data_type;
 16582             
 15110             
 16583             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 15111             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 16584             {
 15112             {
 16585         
 15113         
       
 15114                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15115                 return return_type_symbol;
       
 15116                 
       
 15117             }
       
 15118             
       
 15119             ERROR;
       
 15120         }
       
 15121         
       
 15122     }/*function_real_to_tod*/
       
 15123     break;
       
 15124 
       
 15125 /****
       
 15126  *REAL_TO_DT
       
 15127  */
       
 15128     case function_real_to_dt :
       
 15129     {
       
 15130         symbol_c *last_type_symbol = NULL;
       
 15131 
       
 15132         {
       
 15133             symbol_c *IN_type_symbol = param_data_type;
       
 15134             last_type_symbol = param_data_type;
       
 15135             
       
 15136             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
       
 15137             {
       
 15138         
       
 15139                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15140                 return return_type_symbol;
       
 15141                 
       
 15142             }
       
 15143             
       
 15144             ERROR;
       
 15145         }
       
 15146         
       
 15147     }/*function_real_to_dt*/
       
 15148     break;
       
 15149 
       
 15150 /****
       
 15151  *LREAL_TO_REAL
       
 15152  */
       
 15153     case function_lreal_to_real :
       
 15154     {
       
 15155         symbol_c *last_type_symbol = NULL;
       
 15156 
       
 15157         {
       
 15158             symbol_c *IN_type_symbol = param_data_type;
       
 15159             last_type_symbol = param_data_type;
       
 15160             
       
 15161             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15162             {
       
 15163         
       
 15164                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 15165                 return return_type_symbol;
       
 15166                 
       
 15167             }
       
 15168             
       
 15169             ERROR;
       
 15170         }
       
 15171         
       
 15172     }/*function_lreal_to_real*/
       
 15173     break;
       
 15174 
       
 15175 /****
       
 15176  *LREAL_TO_SINT
       
 15177  */
       
 15178     case function_lreal_to_sint :
       
 15179     {
       
 15180         symbol_c *last_type_symbol = NULL;
       
 15181 
       
 15182         {
       
 15183             symbol_c *IN_type_symbol = param_data_type;
       
 15184             last_type_symbol = param_data_type;
       
 15185             
       
 15186             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15187             {
       
 15188         
       
 15189                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 15190                 return return_type_symbol;
       
 15191                 
       
 15192             }
       
 15193             
       
 15194             ERROR;
       
 15195         }
       
 15196         
       
 15197     }/*function_lreal_to_sint*/
       
 15198     break;
       
 15199 
       
 15200 /****
       
 15201  *LREAL_TO_INT
       
 15202  */
       
 15203     case function_lreal_to_int :
       
 15204     {
       
 15205         symbol_c *last_type_symbol = NULL;
       
 15206 
       
 15207         {
       
 15208             symbol_c *IN_type_symbol = param_data_type;
       
 15209             last_type_symbol = param_data_type;
       
 15210             
       
 15211             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15212             {
       
 15213         
       
 15214                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15215                 return return_type_symbol;
       
 15216                 
       
 15217             }
       
 15218             
       
 15219             ERROR;
       
 15220         }
       
 15221         
       
 15222     }/*function_lreal_to_int*/
       
 15223     break;
       
 15224 
       
 15225 /****
       
 15226  *LREAL_TO_DINT
       
 15227  */
       
 15228     case function_lreal_to_dint :
       
 15229     {
       
 15230         symbol_c *last_type_symbol = NULL;
       
 15231 
       
 15232         {
       
 15233             symbol_c *IN_type_symbol = param_data_type;
       
 15234             last_type_symbol = param_data_type;
       
 15235             
       
 15236             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15237             {
       
 15238         
       
 15239                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15240                 return return_type_symbol;
       
 15241                 
       
 15242             }
       
 15243             
       
 15244             ERROR;
       
 15245         }
       
 15246         
       
 15247     }/*function_lreal_to_dint*/
       
 15248     break;
       
 15249 
       
 15250 /****
       
 15251  *LREAL_TO_LINT
       
 15252  */
       
 15253     case function_lreal_to_lint :
       
 15254     {
       
 15255         symbol_c *last_type_symbol = NULL;
       
 15256 
       
 15257         {
       
 15258             symbol_c *IN_type_symbol = param_data_type;
       
 15259             last_type_symbol = param_data_type;
       
 15260             
       
 15261             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15262             {
       
 15263         
       
 15264                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15265                 return return_type_symbol;
       
 15266                 
       
 15267             }
       
 15268             
       
 15269             ERROR;
       
 15270         }
       
 15271         
       
 15272     }/*function_lreal_to_lint*/
       
 15273     break;
       
 15274 
       
 15275 /****
       
 15276  *LREAL_TO_USINT
       
 15277  */
       
 15278     case function_lreal_to_usint :
       
 15279     {
       
 15280         symbol_c *last_type_symbol = NULL;
       
 15281 
       
 15282         {
       
 15283             symbol_c *IN_type_symbol = param_data_type;
       
 15284             last_type_symbol = param_data_type;
       
 15285             
       
 15286             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15287             {
       
 15288         
       
 15289                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15290                 return return_type_symbol;
       
 15291                 
       
 15292             }
       
 15293             
       
 15294             ERROR;
       
 15295         }
       
 15296         
       
 15297     }/*function_lreal_to_usint*/
       
 15298     break;
       
 15299 
       
 15300 /****
       
 15301  *LREAL_TO_UINT
       
 15302  */
       
 15303     case function_lreal_to_uint :
       
 15304     {
       
 15305         symbol_c *last_type_symbol = NULL;
       
 15306 
       
 15307         {
       
 15308             symbol_c *IN_type_symbol = param_data_type;
       
 15309             last_type_symbol = param_data_type;
       
 15310             
       
 15311             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15312             {
       
 15313         
       
 15314                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15315                 return return_type_symbol;
       
 15316                 
       
 15317             }
       
 15318             
       
 15319             ERROR;
       
 15320         }
       
 15321         
       
 15322     }/*function_lreal_to_uint*/
       
 15323     break;
       
 15324 
       
 15325 /****
       
 15326  *LREAL_TO_UDINT
       
 15327  */
       
 15328     case function_lreal_to_udint :
       
 15329     {
       
 15330         symbol_c *last_type_symbol = NULL;
       
 15331 
       
 15332         {
       
 15333             symbol_c *IN_type_symbol = param_data_type;
       
 15334             last_type_symbol = param_data_type;
       
 15335             
       
 15336             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15337             {
       
 15338         
       
 15339                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15340                 return return_type_symbol;
       
 15341                 
       
 15342             }
       
 15343             
       
 15344             ERROR;
       
 15345         }
       
 15346         
       
 15347     }/*function_lreal_to_udint*/
       
 15348     break;
       
 15349 
       
 15350 /****
       
 15351  *LREAL_TO_ULINT
       
 15352  */
       
 15353     case function_lreal_to_ulint :
       
 15354     {
       
 15355         symbol_c *last_type_symbol = NULL;
       
 15356 
       
 15357         {
       
 15358             symbol_c *IN_type_symbol = param_data_type;
       
 15359             last_type_symbol = param_data_type;
       
 15360             
       
 15361             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15362             {
       
 15363         
       
 15364                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15365                 return return_type_symbol;
       
 15366                 
       
 15367             }
       
 15368             
       
 15369             ERROR;
       
 15370         }
       
 15371         
       
 15372     }/*function_lreal_to_ulint*/
       
 15373     break;
       
 15374 
       
 15375 /****
       
 15376  *LREAL_TO_TIME
       
 15377  */
       
 15378     case function_lreal_to_time :
       
 15379     {
       
 15380         symbol_c *last_type_symbol = NULL;
       
 15381 
       
 15382         {
       
 15383             symbol_c *IN_type_symbol = param_data_type;
       
 15384             last_type_symbol = param_data_type;
       
 15385             
       
 15386             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15387             {
       
 15388         
       
 15389                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15390                 return return_type_symbol;
       
 15391                 
       
 15392             }
       
 15393             
       
 15394             ERROR;
       
 15395         }
       
 15396         
       
 15397     }/*function_lreal_to_time*/
       
 15398     break;
       
 15399 
       
 15400 /****
       
 15401  *LREAL_TO_BOOL
       
 15402  */
       
 15403     case function_lreal_to_bool :
       
 15404     {
       
 15405         symbol_c *last_type_symbol = NULL;
       
 15406 
       
 15407         {
       
 15408             symbol_c *IN_type_symbol = param_data_type;
       
 15409             last_type_symbol = param_data_type;
       
 15410             
       
 15411             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15412             {
       
 15413         
       
 15414                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15415                 return return_type_symbol;
       
 15416                 
       
 15417             }
       
 15418             
       
 15419             ERROR;
       
 15420         }
       
 15421         
       
 15422     }/*function_lreal_to_bool*/
       
 15423     break;
       
 15424 
       
 15425 /****
       
 15426  *LREAL_TO_BYTE
       
 15427  */
       
 15428     case function_lreal_to_byte :
       
 15429     {
       
 15430         symbol_c *last_type_symbol = NULL;
       
 15431 
       
 15432         {
       
 15433             symbol_c *IN_type_symbol = param_data_type;
       
 15434             last_type_symbol = param_data_type;
       
 15435             
       
 15436             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15437             {
       
 15438         
       
 15439                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15440                 return return_type_symbol;
       
 15441                 
       
 15442             }
       
 15443             
       
 15444             ERROR;
       
 15445         }
       
 15446         
       
 15447     }/*function_lreal_to_byte*/
       
 15448     break;
       
 15449 
       
 15450 /****
       
 15451  *LREAL_TO_WORD
       
 15452  */
       
 15453     case function_lreal_to_word :
       
 15454     {
       
 15455         symbol_c *last_type_symbol = NULL;
       
 15456 
       
 15457         {
       
 15458             symbol_c *IN_type_symbol = param_data_type;
       
 15459             last_type_symbol = param_data_type;
       
 15460             
       
 15461             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15462             {
       
 15463         
       
 15464                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15465                 return return_type_symbol;
       
 15466                 
       
 15467             }
       
 15468             
       
 15469             ERROR;
       
 15470         }
       
 15471         
       
 15472     }/*function_lreal_to_word*/
       
 15473     break;
       
 15474 
       
 15475 /****
       
 15476  *LREAL_TO_DWORD
       
 15477  */
       
 15478     case function_lreal_to_dword :
       
 15479     {
       
 15480         symbol_c *last_type_symbol = NULL;
       
 15481 
       
 15482         {
       
 15483             symbol_c *IN_type_symbol = param_data_type;
       
 15484             last_type_symbol = param_data_type;
       
 15485             
       
 15486             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15487             {
       
 15488         
       
 15489                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15490                 return return_type_symbol;
       
 15491                 
       
 15492             }
       
 15493             
       
 15494             ERROR;
       
 15495         }
       
 15496         
       
 15497     }/*function_lreal_to_dword*/
       
 15498     break;
       
 15499 
       
 15500 /****
       
 15501  *LREAL_TO_LWORD
       
 15502  */
       
 15503     case function_lreal_to_lword :
       
 15504     {
       
 15505         symbol_c *last_type_symbol = NULL;
       
 15506 
       
 15507         {
       
 15508             symbol_c *IN_type_symbol = param_data_type;
       
 15509             last_type_symbol = param_data_type;
       
 15510             
       
 15511             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15512             {
       
 15513         
       
 15514                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15515                 return return_type_symbol;
       
 15516                 
       
 15517             }
       
 15518             
       
 15519             ERROR;
       
 15520         }
       
 15521         
       
 15522     }/*function_lreal_to_lword*/
       
 15523     break;
       
 15524 
       
 15525 /****
       
 15526  *LREAL_TO_STRING
       
 15527  */
       
 15528     case function_lreal_to_string :
       
 15529     {
       
 15530         symbol_c *last_type_symbol = NULL;
       
 15531 
       
 15532         {
       
 15533             symbol_c *IN_type_symbol = param_data_type;
       
 15534             last_type_symbol = param_data_type;
       
 15535             
       
 15536             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15537             {
       
 15538         
       
 15539                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15540                 return return_type_symbol;
       
 15541                 
       
 15542             }
       
 15543             
       
 15544             ERROR;
       
 15545         }
       
 15546         
       
 15547     }/*function_lreal_to_string*/
       
 15548     break;
       
 15549 
       
 15550 /****
       
 15551  *LREAL_TO_DATE
       
 15552  */
       
 15553     case function_lreal_to_date :
       
 15554     {
       
 15555         symbol_c *last_type_symbol = NULL;
       
 15556 
       
 15557         {
       
 15558             symbol_c *IN_type_symbol = param_data_type;
       
 15559             last_type_symbol = param_data_type;
       
 15560             
       
 15561             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 15562             {
       
 15563         
 16586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15564                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16587                 return return_type_symbol;
 15565                 return return_type_symbol;
 16588                 
 15566                 
 16589             }
 15567             }
 16590             
 15568             
 16591             ERROR;
 15569             ERROR;
 16592         }
 15570         }
 16593         
 15571         
 16594     }/*function_real_to_date*/
 15572     }/*function_lreal_to_date*/
 16595     break;
 15573     break;
 16596 
 15574 
 16597 /****
 15575 /****
 16598  *REAL_TO_TOD
 15576  *LREAL_TO_TOD
 16599  */
 15577  */
 16600     case function_real_to_tod :
 15578     case function_lreal_to_tod :
 16601     {
 15579     {
 16602         symbol_c *last_type_symbol = NULL;
 15580         symbol_c *last_type_symbol = NULL;
 16603 
 15581 
 16604         {
 15582         {
 16605             symbol_c *IN_type_symbol = param_data_type;
 15583             symbol_c *IN_type_symbol = param_data_type;
 16606             last_type_symbol = param_data_type;
 15584             last_type_symbol = param_data_type;
 16607             
 15585             
 16608             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 15586             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 16609             {
 15587             {
 16610         
 15588         
 16611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15589                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16612                 return return_type_symbol;
 15590                 return return_type_symbol;
 16613                 
 15591                 
 16614             }
 15592             }
 16615             
 15593             
 16616             ERROR;
 15594             ERROR;
 16617         }
 15595         }
 16618         
 15596         
 16619     }/*function_real_to_tod*/
 15597     }/*function_lreal_to_tod*/
 16620     break;
 15598     break;
 16621 
 15599 
 16622 /****
 15600 /****
 16623  *REAL_TO_DT
 15601  *LREAL_TO_DT
 16624  */
 15602  */
 16625     case function_real_to_dt :
 15603     case function_lreal_to_dt :
 16626     {
 15604     {
 16627         symbol_c *last_type_symbol = NULL;
 15605         symbol_c *last_type_symbol = NULL;
 16628 
 15606 
 16629         {
 15607         {
 16630             symbol_c *IN_type_symbol = param_data_type;
 15608             symbol_c *IN_type_symbol = param_data_type;
 16631             last_type_symbol = param_data_type;
 15609             last_type_symbol = param_data_type;
 16632             
 15610             
 16633             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 15611             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 16634             {
 15612             {
 16635         
 15613         
 16636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15614                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16637                 return return_type_symbol;
 15615                 return return_type_symbol;
 16638                 
 15616                 
 16639             }
 15617             }
 16640             
 15618             
 16641             ERROR;
 15619             ERROR;
 16642         }
 15620         }
 16643         
 15621         
 16644     }/*function_real_to_dt*/
 15622     }/*function_lreal_to_dt*/
 16645     break;
 15623     break;
 16646 
 15624 
 16647 /****
 15625 /****
 16648  *LREAL_TO_REAL
 15626  *SINT_TO_REAL
 16649  */
 15627  */
 16650     case function_lreal_to_real :
 15628     case function_sint_to_real :
 16651     {
 15629     {
 16652         symbol_c *last_type_symbol = NULL;
 15630         symbol_c *last_type_symbol = NULL;
 16653 
 15631 
 16654         {
 15632         {
 16655             symbol_c *IN_type_symbol = param_data_type;
 15633             symbol_c *IN_type_symbol = param_data_type;
 16656             last_type_symbol = param_data_type;
 15634             last_type_symbol = param_data_type;
 16657             
 15635             
 16658             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 15636             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 16659             {
 15637             {
 16660         
 15638         
 16661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 15639                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 16662                 return return_type_symbol;
 15640                 return return_type_symbol;
 16663                 
 15641                 
 16664             }
 15642             }
 16665             
 15643             
 16666             ERROR;
 15644             ERROR;
 16667         }
 15645         }
 16668         
 15646         
 16669     }/*function_lreal_to_real*/
 15647     }/*function_sint_to_real*/
 16670     break;
 15648     break;
 16671 
 15649 
 16672 /****
 15650 /****
 16673  *LREAL_TO_SINT
 15651  *SINT_TO_LREAL
 16674  */
 15652  */
 16675     case function_lreal_to_sint :
 15653     case function_sint_to_lreal :
 16676     {
 15654     {
 16677         symbol_c *last_type_symbol = NULL;
 15655         symbol_c *last_type_symbol = NULL;
 16678 
 15656 
 16679         {
 15657         {
 16680             symbol_c *IN_type_symbol = param_data_type;
 15658             symbol_c *IN_type_symbol = param_data_type;
 16681             last_type_symbol = param_data_type;
 15659             last_type_symbol = param_data_type;
 16682             
 15660             
 16683             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 15661             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15662             {
       
 15663         
       
 15664                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15665                 return return_type_symbol;
       
 15666                 
       
 15667             }
       
 15668             
       
 15669             ERROR;
       
 15670         }
       
 15671         
       
 15672     }/*function_sint_to_lreal*/
       
 15673     break;
       
 15674 
       
 15675 /****
       
 15676  *SINT_TO_INT
       
 15677  */
       
 15678     case function_sint_to_int :
       
 15679     {
       
 15680         symbol_c *last_type_symbol = NULL;
       
 15681 
       
 15682         {
       
 15683             symbol_c *IN_type_symbol = param_data_type;
       
 15684             last_type_symbol = param_data_type;
       
 15685             
       
 15686             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15687             {
       
 15688         
       
 15689                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15690                 return return_type_symbol;
       
 15691                 
       
 15692             }
       
 15693             
       
 15694             ERROR;
       
 15695         }
       
 15696         
       
 15697     }/*function_sint_to_int*/
       
 15698     break;
       
 15699 
       
 15700 /****
       
 15701  *SINT_TO_DINT
       
 15702  */
       
 15703     case function_sint_to_dint :
       
 15704     {
       
 15705         symbol_c *last_type_symbol = NULL;
       
 15706 
       
 15707         {
       
 15708             symbol_c *IN_type_symbol = param_data_type;
       
 15709             last_type_symbol = param_data_type;
       
 15710             
       
 15711             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15712             {
       
 15713         
       
 15714                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15715                 return return_type_symbol;
       
 15716                 
       
 15717             }
       
 15718             
       
 15719             ERROR;
       
 15720         }
       
 15721         
       
 15722     }/*function_sint_to_dint*/
       
 15723     break;
       
 15724 
       
 15725 /****
       
 15726  *SINT_TO_LINT
       
 15727  */
       
 15728     case function_sint_to_lint :
       
 15729     {
       
 15730         symbol_c *last_type_symbol = NULL;
       
 15731 
       
 15732         {
       
 15733             symbol_c *IN_type_symbol = param_data_type;
       
 15734             last_type_symbol = param_data_type;
       
 15735             
       
 15736             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15737             {
       
 15738         
       
 15739                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15740                 return return_type_symbol;
       
 15741                 
       
 15742             }
       
 15743             
       
 15744             ERROR;
       
 15745         }
       
 15746         
       
 15747     }/*function_sint_to_lint*/
       
 15748     break;
       
 15749 
       
 15750 /****
       
 15751  *SINT_TO_USINT
       
 15752  */
       
 15753     case function_sint_to_usint :
       
 15754     {
       
 15755         symbol_c *last_type_symbol = NULL;
       
 15756 
       
 15757         {
       
 15758             symbol_c *IN_type_symbol = param_data_type;
       
 15759             last_type_symbol = param_data_type;
       
 15760             
       
 15761             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15762             {
       
 15763         
       
 15764                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15765                 return return_type_symbol;
       
 15766                 
       
 15767             }
       
 15768             
       
 15769             ERROR;
       
 15770         }
       
 15771         
       
 15772     }/*function_sint_to_usint*/
       
 15773     break;
       
 15774 
       
 15775 /****
       
 15776  *SINT_TO_UINT
       
 15777  */
       
 15778     case function_sint_to_uint :
       
 15779     {
       
 15780         symbol_c *last_type_symbol = NULL;
       
 15781 
       
 15782         {
       
 15783             symbol_c *IN_type_symbol = param_data_type;
       
 15784             last_type_symbol = param_data_type;
       
 15785             
       
 15786             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15787             {
       
 15788         
       
 15789                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15790                 return return_type_symbol;
       
 15791                 
       
 15792             }
       
 15793             
       
 15794             ERROR;
       
 15795         }
       
 15796         
       
 15797     }/*function_sint_to_uint*/
       
 15798     break;
       
 15799 
       
 15800 /****
       
 15801  *SINT_TO_UDINT
       
 15802  */
       
 15803     case function_sint_to_udint :
       
 15804     {
       
 15805         symbol_c *last_type_symbol = NULL;
       
 15806 
       
 15807         {
       
 15808             symbol_c *IN_type_symbol = param_data_type;
       
 15809             last_type_symbol = param_data_type;
       
 15810             
       
 15811             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15812             {
       
 15813         
       
 15814                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15815                 return return_type_symbol;
       
 15816                 
       
 15817             }
       
 15818             
       
 15819             ERROR;
       
 15820         }
       
 15821         
       
 15822     }/*function_sint_to_udint*/
       
 15823     break;
       
 15824 
       
 15825 /****
       
 15826  *SINT_TO_ULINT
       
 15827  */
       
 15828     case function_sint_to_ulint :
       
 15829     {
       
 15830         symbol_c *last_type_symbol = NULL;
       
 15831 
       
 15832         {
       
 15833             symbol_c *IN_type_symbol = param_data_type;
       
 15834             last_type_symbol = param_data_type;
       
 15835             
       
 15836             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15837             {
       
 15838         
       
 15839                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15840                 return return_type_symbol;
       
 15841                 
       
 15842             }
       
 15843             
       
 15844             ERROR;
       
 15845         }
       
 15846         
       
 15847     }/*function_sint_to_ulint*/
       
 15848     break;
       
 15849 
       
 15850 /****
       
 15851  *SINT_TO_TIME
       
 15852  */
       
 15853     case function_sint_to_time :
       
 15854     {
       
 15855         symbol_c *last_type_symbol = NULL;
       
 15856 
       
 15857         {
       
 15858             symbol_c *IN_type_symbol = param_data_type;
       
 15859             last_type_symbol = param_data_type;
       
 15860             
       
 15861             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15862             {
       
 15863         
       
 15864                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15865                 return return_type_symbol;
       
 15866                 
       
 15867             }
       
 15868             
       
 15869             ERROR;
       
 15870         }
       
 15871         
       
 15872     }/*function_sint_to_time*/
       
 15873     break;
       
 15874 
       
 15875 /****
       
 15876  *SINT_TO_BOOL
       
 15877  */
       
 15878     case function_sint_to_bool :
       
 15879     {
       
 15880         symbol_c *last_type_symbol = NULL;
       
 15881 
       
 15882         {
       
 15883             symbol_c *IN_type_symbol = param_data_type;
       
 15884             last_type_symbol = param_data_type;
       
 15885             
       
 15886             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15887             {
       
 15888         
       
 15889                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15890                 return return_type_symbol;
       
 15891                 
       
 15892             }
       
 15893             
       
 15894             ERROR;
       
 15895         }
       
 15896         
       
 15897     }/*function_sint_to_bool*/
       
 15898     break;
       
 15899 
       
 15900 /****
       
 15901  *SINT_TO_BYTE
       
 15902  */
       
 15903     case function_sint_to_byte :
       
 15904     {
       
 15905         symbol_c *last_type_symbol = NULL;
       
 15906 
       
 15907         {
       
 15908             symbol_c *IN_type_symbol = param_data_type;
       
 15909             last_type_symbol = param_data_type;
       
 15910             
       
 15911             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15912             {
       
 15913         
       
 15914                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15915                 return return_type_symbol;
       
 15916                 
       
 15917             }
       
 15918             
       
 15919             ERROR;
       
 15920         }
       
 15921         
       
 15922     }/*function_sint_to_byte*/
       
 15923     break;
       
 15924 
       
 15925 /****
       
 15926  *SINT_TO_WORD
       
 15927  */
       
 15928     case function_sint_to_word :
       
 15929     {
       
 15930         symbol_c *last_type_symbol = NULL;
       
 15931 
       
 15932         {
       
 15933             symbol_c *IN_type_symbol = param_data_type;
       
 15934             last_type_symbol = param_data_type;
       
 15935             
       
 15936             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15937             {
       
 15938         
       
 15939                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15940                 return return_type_symbol;
       
 15941                 
       
 15942             }
       
 15943             
       
 15944             ERROR;
       
 15945         }
       
 15946         
       
 15947     }/*function_sint_to_word*/
       
 15948     break;
       
 15949 
       
 15950 /****
       
 15951  *SINT_TO_DWORD
       
 15952  */
       
 15953     case function_sint_to_dword :
       
 15954     {
       
 15955         symbol_c *last_type_symbol = NULL;
       
 15956 
       
 15957         {
       
 15958             symbol_c *IN_type_symbol = param_data_type;
       
 15959             last_type_symbol = param_data_type;
       
 15960             
       
 15961             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15962             {
       
 15963         
       
 15964                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15965                 return return_type_symbol;
       
 15966                 
       
 15967             }
       
 15968             
       
 15969             ERROR;
       
 15970         }
       
 15971         
       
 15972     }/*function_sint_to_dword*/
       
 15973     break;
       
 15974 
       
 15975 /****
       
 15976  *SINT_TO_LWORD
       
 15977  */
       
 15978     case function_sint_to_lword :
       
 15979     {
       
 15980         symbol_c *last_type_symbol = NULL;
       
 15981 
       
 15982         {
       
 15983             symbol_c *IN_type_symbol = param_data_type;
       
 15984             last_type_symbol = param_data_type;
       
 15985             
       
 15986             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 15987             {
       
 15988         
       
 15989                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15990                 return return_type_symbol;
       
 15991                 
       
 15992             }
       
 15993             
       
 15994             ERROR;
       
 15995         }
       
 15996         
       
 15997     }/*function_sint_to_lword*/
       
 15998     break;
       
 15999 
       
 16000 /****
       
 16001  *SINT_TO_STRING
       
 16002  */
       
 16003     case function_sint_to_string :
       
 16004     {
       
 16005         symbol_c *last_type_symbol = NULL;
       
 16006 
       
 16007         {
       
 16008             symbol_c *IN_type_symbol = param_data_type;
       
 16009             last_type_symbol = param_data_type;
       
 16010             
       
 16011             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 16012             {
       
 16013         
       
 16014                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16015                 return return_type_symbol;
       
 16016                 
       
 16017             }
       
 16018             
       
 16019             ERROR;
       
 16020         }
       
 16021         
       
 16022     }/*function_sint_to_string*/
       
 16023     break;
       
 16024 
       
 16025 /****
       
 16026  *SINT_TO_DATE
       
 16027  */
       
 16028     case function_sint_to_date :
       
 16029     {
       
 16030         symbol_c *last_type_symbol = NULL;
       
 16031 
       
 16032         {
       
 16033             symbol_c *IN_type_symbol = param_data_type;
       
 16034             last_type_symbol = param_data_type;
       
 16035             
       
 16036             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 16037             {
       
 16038         
       
 16039                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16040                 return return_type_symbol;
       
 16041                 
       
 16042             }
       
 16043             
       
 16044             ERROR;
       
 16045         }
       
 16046         
       
 16047     }/*function_sint_to_date*/
       
 16048     break;
       
 16049 
       
 16050 /****
       
 16051  *SINT_TO_TOD
       
 16052  */
       
 16053     case function_sint_to_tod :
       
 16054     {
       
 16055         symbol_c *last_type_symbol = NULL;
       
 16056 
       
 16057         {
       
 16058             symbol_c *IN_type_symbol = param_data_type;
       
 16059             last_type_symbol = param_data_type;
       
 16060             
       
 16061             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 16062             {
       
 16063         
       
 16064                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16065                 return return_type_symbol;
       
 16066                 
       
 16067             }
       
 16068             
       
 16069             ERROR;
       
 16070         }
       
 16071         
       
 16072     }/*function_sint_to_tod*/
       
 16073     break;
       
 16074 
       
 16075 /****
       
 16076  *SINT_TO_DT
       
 16077  */
       
 16078     case function_sint_to_dt :
       
 16079     {
       
 16080         symbol_c *last_type_symbol = NULL;
       
 16081 
       
 16082         {
       
 16083             symbol_c *IN_type_symbol = param_data_type;
       
 16084             last_type_symbol = param_data_type;
       
 16085             
       
 16086             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 16087             {
       
 16088         
       
 16089                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16090                 return return_type_symbol;
       
 16091                 
       
 16092             }
       
 16093             
       
 16094             ERROR;
       
 16095         }
       
 16096         
       
 16097     }/*function_sint_to_dt*/
       
 16098     break;
       
 16099 
       
 16100 /****
       
 16101  *INT_TO_REAL
       
 16102  */
       
 16103     case function_int_to_real :
       
 16104     {
       
 16105         symbol_c *last_type_symbol = NULL;
       
 16106 
       
 16107         {
       
 16108             symbol_c *IN_type_symbol = param_data_type;
       
 16109             last_type_symbol = param_data_type;
       
 16110             
       
 16111             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16112             {
       
 16113         
       
 16114                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16115                 return return_type_symbol;
       
 16116                 
       
 16117             }
       
 16118             
       
 16119             ERROR;
       
 16120         }
       
 16121         
       
 16122     }/*function_int_to_real*/
       
 16123     break;
       
 16124 
       
 16125 /****
       
 16126  *INT_TO_LREAL
       
 16127  */
       
 16128     case function_int_to_lreal :
       
 16129     {
       
 16130         symbol_c *last_type_symbol = NULL;
       
 16131 
       
 16132         {
       
 16133             symbol_c *IN_type_symbol = param_data_type;
       
 16134             last_type_symbol = param_data_type;
       
 16135             
       
 16136             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16137             {
       
 16138         
       
 16139                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16140                 return return_type_symbol;
       
 16141                 
       
 16142             }
       
 16143             
       
 16144             ERROR;
       
 16145         }
       
 16146         
       
 16147     }/*function_int_to_lreal*/
       
 16148     break;
       
 16149 
       
 16150 /****
       
 16151  *INT_TO_SINT
       
 16152  */
       
 16153     case function_int_to_sint :
       
 16154     {
       
 16155         symbol_c *last_type_symbol = NULL;
       
 16156 
       
 16157         {
       
 16158             symbol_c *IN_type_symbol = param_data_type;
       
 16159             last_type_symbol = param_data_type;
       
 16160             
       
 16161             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 16684             {
 16162             {
 16685         
 16163         
 16686                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16164                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16687                 return return_type_symbol;
 16165                 return return_type_symbol;
 16688                 
 16166                 
 16689             }
 16167             }
 16690             
 16168             
 16691             ERROR;
 16169             ERROR;
 16692         }
 16170         }
 16693         
 16171         
 16694     }/*function_lreal_to_sint*/
 16172     }/*function_int_to_sint*/
 16695     break;
 16173     break;
 16696 
 16174 
 16697 /****
 16175 /****
 16698  *LREAL_TO_INT
 16176  *INT_TO_DINT
 16699  */
 16177  */
 16700     case function_lreal_to_int :
 16178     case function_int_to_dint :
 16701     {
 16179     {
 16702         symbol_c *last_type_symbol = NULL;
 16180         symbol_c *last_type_symbol = NULL;
 16703 
 16181 
 16704         {
 16182         {
 16705             symbol_c *IN_type_symbol = param_data_type;
 16183             symbol_c *IN_type_symbol = param_data_type;
 16706             last_type_symbol = param_data_type;
 16184             last_type_symbol = param_data_type;
 16707             
 16185             
 16708             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 16186             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16187             {
       
 16188         
       
 16189                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 16190                 return return_type_symbol;
       
 16191                 
       
 16192             }
       
 16193             
       
 16194             ERROR;
       
 16195         }
       
 16196         
       
 16197     }/*function_int_to_dint*/
       
 16198     break;
       
 16199 
       
 16200 /****
       
 16201  *INT_TO_LINT
       
 16202  */
       
 16203     case function_int_to_lint :
       
 16204     {
       
 16205         symbol_c *last_type_symbol = NULL;
       
 16206 
       
 16207         {
       
 16208             symbol_c *IN_type_symbol = param_data_type;
       
 16209             last_type_symbol = param_data_type;
       
 16210             
       
 16211             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16212             {
       
 16213         
       
 16214                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16215                 return return_type_symbol;
       
 16216                 
       
 16217             }
       
 16218             
       
 16219             ERROR;
       
 16220         }
       
 16221         
       
 16222     }/*function_int_to_lint*/
       
 16223     break;
       
 16224 
       
 16225 /****
       
 16226  *INT_TO_USINT
       
 16227  */
       
 16228     case function_int_to_usint :
       
 16229     {
       
 16230         symbol_c *last_type_symbol = NULL;
       
 16231 
       
 16232         {
       
 16233             symbol_c *IN_type_symbol = param_data_type;
       
 16234             last_type_symbol = param_data_type;
       
 16235             
       
 16236             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16237             {
       
 16238         
       
 16239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16240                 return return_type_symbol;
       
 16241                 
       
 16242             }
       
 16243             
       
 16244             ERROR;
       
 16245         }
       
 16246         
       
 16247     }/*function_int_to_usint*/
       
 16248     break;
       
 16249 
       
 16250 /****
       
 16251  *INT_TO_UINT
       
 16252  */
       
 16253     case function_int_to_uint :
       
 16254     {
       
 16255         symbol_c *last_type_symbol = NULL;
       
 16256 
       
 16257         {
       
 16258             symbol_c *IN_type_symbol = param_data_type;
       
 16259             last_type_symbol = param_data_type;
       
 16260             
       
 16261             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16262             {
       
 16263         
       
 16264                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16265                 return return_type_symbol;
       
 16266                 
       
 16267             }
       
 16268             
       
 16269             ERROR;
       
 16270         }
       
 16271         
       
 16272     }/*function_int_to_uint*/
       
 16273     break;
       
 16274 
       
 16275 /****
       
 16276  *INT_TO_UDINT
       
 16277  */
       
 16278     case function_int_to_udint :
       
 16279     {
       
 16280         symbol_c *last_type_symbol = NULL;
       
 16281 
       
 16282         {
       
 16283             symbol_c *IN_type_symbol = param_data_type;
       
 16284             last_type_symbol = param_data_type;
       
 16285             
       
 16286             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16287             {
       
 16288         
       
 16289                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16290                 return return_type_symbol;
       
 16291                 
       
 16292             }
       
 16293             
       
 16294             ERROR;
       
 16295         }
       
 16296         
       
 16297     }/*function_int_to_udint*/
       
 16298     break;
       
 16299 
       
 16300 /****
       
 16301  *INT_TO_ULINT
       
 16302  */
       
 16303     case function_int_to_ulint :
       
 16304     {
       
 16305         symbol_c *last_type_symbol = NULL;
       
 16306 
       
 16307         {
       
 16308             symbol_c *IN_type_symbol = param_data_type;
       
 16309             last_type_symbol = param_data_type;
       
 16310             
       
 16311             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16312             {
       
 16313         
       
 16314                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16315                 return return_type_symbol;
       
 16316                 
       
 16317             }
       
 16318             
       
 16319             ERROR;
       
 16320         }
       
 16321         
       
 16322     }/*function_int_to_ulint*/
       
 16323     break;
       
 16324 
       
 16325 /****
       
 16326  *INT_TO_TIME
       
 16327  */
       
 16328     case function_int_to_time :
       
 16329     {
       
 16330         symbol_c *last_type_symbol = NULL;
       
 16331 
       
 16332         {
       
 16333             symbol_c *IN_type_symbol = param_data_type;
       
 16334             last_type_symbol = param_data_type;
       
 16335             
       
 16336             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16337             {
       
 16338         
       
 16339                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16340                 return return_type_symbol;
       
 16341                 
       
 16342             }
       
 16343             
       
 16344             ERROR;
       
 16345         }
       
 16346         
       
 16347     }/*function_int_to_time*/
       
 16348     break;
       
 16349 
       
 16350 /****
       
 16351  *INT_TO_BOOL
       
 16352  */
       
 16353     case function_int_to_bool :
       
 16354     {
       
 16355         symbol_c *last_type_symbol = NULL;
       
 16356 
       
 16357         {
       
 16358             symbol_c *IN_type_symbol = param_data_type;
       
 16359             last_type_symbol = param_data_type;
       
 16360             
       
 16361             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16362             {
       
 16363         
       
 16364                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16365                 return return_type_symbol;
       
 16366                 
       
 16367             }
       
 16368             
       
 16369             ERROR;
       
 16370         }
       
 16371         
       
 16372     }/*function_int_to_bool*/
       
 16373     break;
       
 16374 
       
 16375 /****
       
 16376  *INT_TO_BYTE
       
 16377  */
       
 16378     case function_int_to_byte :
       
 16379     {
       
 16380         symbol_c *last_type_symbol = NULL;
       
 16381 
       
 16382         {
       
 16383             symbol_c *IN_type_symbol = param_data_type;
       
 16384             last_type_symbol = param_data_type;
       
 16385             
       
 16386             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16387             {
       
 16388         
       
 16389                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16390                 return return_type_symbol;
       
 16391                 
       
 16392             }
       
 16393             
       
 16394             ERROR;
       
 16395         }
       
 16396         
       
 16397     }/*function_int_to_byte*/
       
 16398     break;
       
 16399 
       
 16400 /****
       
 16401  *INT_TO_WORD
       
 16402  */
       
 16403     case function_int_to_word :
       
 16404     {
       
 16405         symbol_c *last_type_symbol = NULL;
       
 16406 
       
 16407         {
       
 16408             symbol_c *IN_type_symbol = param_data_type;
       
 16409             last_type_symbol = param_data_type;
       
 16410             
       
 16411             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16412             {
       
 16413         
       
 16414                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16415                 return return_type_symbol;
       
 16416                 
       
 16417             }
       
 16418             
       
 16419             ERROR;
       
 16420         }
       
 16421         
       
 16422     }/*function_int_to_word*/
       
 16423     break;
       
 16424 
       
 16425 /****
       
 16426  *INT_TO_DWORD
       
 16427  */
       
 16428     case function_int_to_dword :
       
 16429     {
       
 16430         symbol_c *last_type_symbol = NULL;
       
 16431 
       
 16432         {
       
 16433             symbol_c *IN_type_symbol = param_data_type;
       
 16434             last_type_symbol = param_data_type;
       
 16435             
       
 16436             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16437             {
       
 16438         
       
 16439                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16440                 return return_type_symbol;
       
 16441                 
       
 16442             }
       
 16443             
       
 16444             ERROR;
       
 16445         }
       
 16446         
       
 16447     }/*function_int_to_dword*/
       
 16448     break;
       
 16449 
       
 16450 /****
       
 16451  *INT_TO_LWORD
       
 16452  */
       
 16453     case function_int_to_lword :
       
 16454     {
       
 16455         symbol_c *last_type_symbol = NULL;
       
 16456 
       
 16457         {
       
 16458             symbol_c *IN_type_symbol = param_data_type;
       
 16459             last_type_symbol = param_data_type;
       
 16460             
       
 16461             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16462             {
       
 16463         
       
 16464                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16465                 return return_type_symbol;
       
 16466                 
       
 16467             }
       
 16468             
       
 16469             ERROR;
       
 16470         }
       
 16471         
       
 16472     }/*function_int_to_lword*/
       
 16473     break;
       
 16474 
       
 16475 /****
       
 16476  *INT_TO_STRING
       
 16477  */
       
 16478     case function_int_to_string :
       
 16479     {
       
 16480         symbol_c *last_type_symbol = NULL;
       
 16481 
       
 16482         {
       
 16483             symbol_c *IN_type_symbol = param_data_type;
       
 16484             last_type_symbol = param_data_type;
       
 16485             
       
 16486             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16487             {
       
 16488         
       
 16489                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16490                 return return_type_symbol;
       
 16491                 
       
 16492             }
       
 16493             
       
 16494             ERROR;
       
 16495         }
       
 16496         
       
 16497     }/*function_int_to_string*/
       
 16498     break;
       
 16499 
       
 16500 /****
       
 16501  *INT_TO_DATE
       
 16502  */
       
 16503     case function_int_to_date :
       
 16504     {
       
 16505         symbol_c *last_type_symbol = NULL;
       
 16506 
       
 16507         {
       
 16508             symbol_c *IN_type_symbol = param_data_type;
       
 16509             last_type_symbol = param_data_type;
       
 16510             
       
 16511             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16512             {
       
 16513         
       
 16514                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16515                 return return_type_symbol;
       
 16516                 
       
 16517             }
       
 16518             
       
 16519             ERROR;
       
 16520         }
       
 16521         
       
 16522     }/*function_int_to_date*/
       
 16523     break;
       
 16524 
       
 16525 /****
       
 16526  *INT_TO_TOD
       
 16527  */
       
 16528     case function_int_to_tod :
       
 16529     {
       
 16530         symbol_c *last_type_symbol = NULL;
       
 16531 
       
 16532         {
       
 16533             symbol_c *IN_type_symbol = param_data_type;
       
 16534             last_type_symbol = param_data_type;
       
 16535             
       
 16536             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16537             {
       
 16538         
       
 16539                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16540                 return return_type_symbol;
       
 16541                 
       
 16542             }
       
 16543             
       
 16544             ERROR;
       
 16545         }
       
 16546         
       
 16547     }/*function_int_to_tod*/
       
 16548     break;
       
 16549 
       
 16550 /****
       
 16551  *INT_TO_DT
       
 16552  */
       
 16553     case function_int_to_dt :
       
 16554     {
       
 16555         symbol_c *last_type_symbol = NULL;
       
 16556 
       
 16557         {
       
 16558             symbol_c *IN_type_symbol = param_data_type;
       
 16559             last_type_symbol = param_data_type;
       
 16560             
       
 16561             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 16562             {
       
 16563         
       
 16564                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16565                 return return_type_symbol;
       
 16566                 
       
 16567             }
       
 16568             
       
 16569             ERROR;
       
 16570         }
       
 16571         
       
 16572     }/*function_int_to_dt*/
       
 16573     break;
       
 16574 
       
 16575 /****
       
 16576  *DINT_TO_REAL
       
 16577  */
       
 16578     case function_dint_to_real :
       
 16579     {
       
 16580         symbol_c *last_type_symbol = NULL;
       
 16581 
       
 16582         {
       
 16583             symbol_c *IN_type_symbol = param_data_type;
       
 16584             last_type_symbol = param_data_type;
       
 16585             
       
 16586             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16587             {
       
 16588         
       
 16589                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16590                 return return_type_symbol;
       
 16591                 
       
 16592             }
       
 16593             
       
 16594             ERROR;
       
 16595         }
       
 16596         
       
 16597     }/*function_dint_to_real*/
       
 16598     break;
       
 16599 
       
 16600 /****
       
 16601  *DINT_TO_LREAL
       
 16602  */
       
 16603     case function_dint_to_lreal :
       
 16604     {
       
 16605         symbol_c *last_type_symbol = NULL;
       
 16606 
       
 16607         {
       
 16608             symbol_c *IN_type_symbol = param_data_type;
       
 16609             last_type_symbol = param_data_type;
       
 16610             
       
 16611             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16612             {
       
 16613         
       
 16614                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16615                 return return_type_symbol;
       
 16616                 
       
 16617             }
       
 16618             
       
 16619             ERROR;
       
 16620         }
       
 16621         
       
 16622     }/*function_dint_to_lreal*/
       
 16623     break;
       
 16624 
       
 16625 /****
       
 16626  *DINT_TO_SINT
       
 16627  */
       
 16628     case function_dint_to_sint :
       
 16629     {
       
 16630         symbol_c *last_type_symbol = NULL;
       
 16631 
       
 16632         {
       
 16633             symbol_c *IN_type_symbol = param_data_type;
       
 16634             last_type_symbol = param_data_type;
       
 16635             
       
 16636             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16637             {
       
 16638         
       
 16639                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16640                 return return_type_symbol;
       
 16641                 
       
 16642             }
       
 16643             
       
 16644             ERROR;
       
 16645         }
       
 16646         
       
 16647     }/*function_dint_to_sint*/
       
 16648     break;
       
 16649 
       
 16650 /****
       
 16651  *DINT_TO_INT
       
 16652  */
       
 16653     case function_dint_to_int :
       
 16654     {
       
 16655         symbol_c *last_type_symbol = NULL;
       
 16656 
       
 16657         {
       
 16658             symbol_c *IN_type_symbol = param_data_type;
       
 16659             last_type_symbol = param_data_type;
       
 16660             
       
 16661             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16709             {
 16662             {
 16710         
 16663         
 16711                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16664                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16712                 return return_type_symbol;
 16665                 return return_type_symbol;
 16713                 
 16666                 
 16714             }
 16667             }
 16715             
 16668             
 16716             ERROR;
 16669             ERROR;
 16717         }
 16670         }
 16718         
 16671         
 16719     }/*function_lreal_to_int*/
 16672     }/*function_dint_to_int*/
 16720     break;
 16673     break;
 16721 
 16674 
 16722 /****
 16675 /****
 16723  *LREAL_TO_DINT
 16676  *DINT_TO_LINT
 16724  */
 16677  */
 16725     case function_lreal_to_dint :
 16678     case function_dint_to_lint :
 16726     {
 16679     {
 16727         symbol_c *last_type_symbol = NULL;
 16680         symbol_c *last_type_symbol = NULL;
 16728 
 16681 
 16729         {
 16682         {
 16730             symbol_c *IN_type_symbol = param_data_type;
 16683             symbol_c *IN_type_symbol = param_data_type;
 16731             last_type_symbol = param_data_type;
 16684             last_type_symbol = param_data_type;
 16732             
 16685             
 16733             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 16686             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16687             {
       
 16688         
       
 16689                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16690                 return return_type_symbol;
       
 16691                 
       
 16692             }
       
 16693             
       
 16694             ERROR;
       
 16695         }
       
 16696         
       
 16697     }/*function_dint_to_lint*/
       
 16698     break;
       
 16699 
       
 16700 /****
       
 16701  *DINT_TO_USINT
       
 16702  */
       
 16703     case function_dint_to_usint :
       
 16704     {
       
 16705         symbol_c *last_type_symbol = NULL;
       
 16706 
       
 16707         {
       
 16708             symbol_c *IN_type_symbol = param_data_type;
       
 16709             last_type_symbol = param_data_type;
       
 16710             
       
 16711             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16712             {
       
 16713         
       
 16714                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16715                 return return_type_symbol;
       
 16716                 
       
 16717             }
       
 16718             
       
 16719             ERROR;
       
 16720         }
       
 16721         
       
 16722     }/*function_dint_to_usint*/
       
 16723     break;
       
 16724 
       
 16725 /****
       
 16726  *DINT_TO_UINT
       
 16727  */
       
 16728     case function_dint_to_uint :
       
 16729     {
       
 16730         symbol_c *last_type_symbol = NULL;
       
 16731 
       
 16732         {
       
 16733             symbol_c *IN_type_symbol = param_data_type;
       
 16734             last_type_symbol = param_data_type;
       
 16735             
       
 16736             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16737             {
       
 16738         
       
 16739                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16740                 return return_type_symbol;
       
 16741                 
       
 16742             }
       
 16743             
       
 16744             ERROR;
       
 16745         }
       
 16746         
       
 16747     }/*function_dint_to_uint*/
       
 16748     break;
       
 16749 
       
 16750 /****
       
 16751  *DINT_TO_UDINT
       
 16752  */
       
 16753     case function_dint_to_udint :
       
 16754     {
       
 16755         symbol_c *last_type_symbol = NULL;
       
 16756 
       
 16757         {
       
 16758             symbol_c *IN_type_symbol = param_data_type;
       
 16759             last_type_symbol = param_data_type;
       
 16760             
       
 16761             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16762             {
       
 16763         
       
 16764                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16765                 return return_type_symbol;
       
 16766                 
       
 16767             }
       
 16768             
       
 16769             ERROR;
       
 16770         }
       
 16771         
       
 16772     }/*function_dint_to_udint*/
       
 16773     break;
       
 16774 
       
 16775 /****
       
 16776  *DINT_TO_ULINT
       
 16777  */
       
 16778     case function_dint_to_ulint :
       
 16779     {
       
 16780         symbol_c *last_type_symbol = NULL;
       
 16781 
       
 16782         {
       
 16783             symbol_c *IN_type_symbol = param_data_type;
       
 16784             last_type_symbol = param_data_type;
       
 16785             
       
 16786             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16787             {
       
 16788         
       
 16789                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16790                 return return_type_symbol;
       
 16791                 
       
 16792             }
       
 16793             
       
 16794             ERROR;
       
 16795         }
       
 16796         
       
 16797     }/*function_dint_to_ulint*/
       
 16798     break;
       
 16799 
       
 16800 /****
       
 16801  *DINT_TO_TIME
       
 16802  */
       
 16803     case function_dint_to_time :
       
 16804     {
       
 16805         symbol_c *last_type_symbol = NULL;
       
 16806 
       
 16807         {
       
 16808             symbol_c *IN_type_symbol = param_data_type;
       
 16809             last_type_symbol = param_data_type;
       
 16810             
       
 16811             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16812             {
       
 16813         
       
 16814                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16815                 return return_type_symbol;
       
 16816                 
       
 16817             }
       
 16818             
       
 16819             ERROR;
       
 16820         }
       
 16821         
       
 16822     }/*function_dint_to_time*/
       
 16823     break;
       
 16824 
       
 16825 /****
       
 16826  *DINT_TO_BOOL
       
 16827  */
       
 16828     case function_dint_to_bool :
       
 16829     {
       
 16830         symbol_c *last_type_symbol = NULL;
       
 16831 
       
 16832         {
       
 16833             symbol_c *IN_type_symbol = param_data_type;
       
 16834             last_type_symbol = param_data_type;
       
 16835             
       
 16836             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16837             {
       
 16838         
       
 16839                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16840                 return return_type_symbol;
       
 16841                 
       
 16842             }
       
 16843             
       
 16844             ERROR;
       
 16845         }
       
 16846         
       
 16847     }/*function_dint_to_bool*/
       
 16848     break;
       
 16849 
       
 16850 /****
       
 16851  *DINT_TO_BYTE
       
 16852  */
       
 16853     case function_dint_to_byte :
       
 16854     {
       
 16855         symbol_c *last_type_symbol = NULL;
       
 16856 
       
 16857         {
       
 16858             symbol_c *IN_type_symbol = param_data_type;
       
 16859             last_type_symbol = param_data_type;
       
 16860             
       
 16861             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16862             {
       
 16863         
       
 16864                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16865                 return return_type_symbol;
       
 16866                 
       
 16867             }
       
 16868             
       
 16869             ERROR;
       
 16870         }
       
 16871         
       
 16872     }/*function_dint_to_byte*/
       
 16873     break;
       
 16874 
       
 16875 /****
       
 16876  *DINT_TO_WORD
       
 16877  */
       
 16878     case function_dint_to_word :
       
 16879     {
       
 16880         symbol_c *last_type_symbol = NULL;
       
 16881 
       
 16882         {
       
 16883             symbol_c *IN_type_symbol = param_data_type;
       
 16884             last_type_symbol = param_data_type;
       
 16885             
       
 16886             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16887             {
       
 16888         
       
 16889                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16890                 return return_type_symbol;
       
 16891                 
       
 16892             }
       
 16893             
       
 16894             ERROR;
       
 16895         }
       
 16896         
       
 16897     }/*function_dint_to_word*/
       
 16898     break;
       
 16899 
       
 16900 /****
       
 16901  *DINT_TO_DWORD
       
 16902  */
       
 16903     case function_dint_to_dword :
       
 16904     {
       
 16905         symbol_c *last_type_symbol = NULL;
       
 16906 
       
 16907         {
       
 16908             symbol_c *IN_type_symbol = param_data_type;
       
 16909             last_type_symbol = param_data_type;
       
 16910             
       
 16911             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16912             {
       
 16913         
       
 16914                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16915                 return return_type_symbol;
       
 16916                 
       
 16917             }
       
 16918             
       
 16919             ERROR;
       
 16920         }
       
 16921         
       
 16922     }/*function_dint_to_dword*/
       
 16923     break;
       
 16924 
       
 16925 /****
       
 16926  *DINT_TO_LWORD
       
 16927  */
       
 16928     case function_dint_to_lword :
       
 16929     {
       
 16930         symbol_c *last_type_symbol = NULL;
       
 16931 
       
 16932         {
       
 16933             symbol_c *IN_type_symbol = param_data_type;
       
 16934             last_type_symbol = param_data_type;
       
 16935             
       
 16936             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16937             {
       
 16938         
       
 16939                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16940                 return return_type_symbol;
       
 16941                 
       
 16942             }
       
 16943             
       
 16944             ERROR;
       
 16945         }
       
 16946         
       
 16947     }/*function_dint_to_lword*/
       
 16948     break;
       
 16949 
       
 16950 /****
       
 16951  *DINT_TO_STRING
       
 16952  */
       
 16953     case function_dint_to_string :
       
 16954     {
       
 16955         symbol_c *last_type_symbol = NULL;
       
 16956 
       
 16957         {
       
 16958             symbol_c *IN_type_symbol = param_data_type;
       
 16959             last_type_symbol = param_data_type;
       
 16960             
       
 16961             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16962             {
       
 16963         
       
 16964                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16965                 return return_type_symbol;
       
 16966                 
       
 16967             }
       
 16968             
       
 16969             ERROR;
       
 16970         }
       
 16971         
       
 16972     }/*function_dint_to_string*/
       
 16973     break;
       
 16974 
       
 16975 /****
       
 16976  *DINT_TO_DATE
       
 16977  */
       
 16978     case function_dint_to_date :
       
 16979     {
       
 16980         symbol_c *last_type_symbol = NULL;
       
 16981 
       
 16982         {
       
 16983             symbol_c *IN_type_symbol = param_data_type;
       
 16984             last_type_symbol = param_data_type;
       
 16985             
       
 16986             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 16987             {
       
 16988         
       
 16989                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16990                 return return_type_symbol;
       
 16991                 
       
 16992             }
       
 16993             
       
 16994             ERROR;
       
 16995         }
       
 16996         
       
 16997     }/*function_dint_to_date*/
       
 16998     break;
       
 16999 
       
 17000 /****
       
 17001  *DINT_TO_TOD
       
 17002  */
       
 17003     case function_dint_to_tod :
       
 17004     {
       
 17005         symbol_c *last_type_symbol = NULL;
       
 17006 
       
 17007         {
       
 17008             symbol_c *IN_type_symbol = param_data_type;
       
 17009             last_type_symbol = param_data_type;
       
 17010             
       
 17011             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 17012             {
       
 17013         
       
 17014                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17015                 return return_type_symbol;
       
 17016                 
       
 17017             }
       
 17018             
       
 17019             ERROR;
       
 17020         }
       
 17021         
       
 17022     }/*function_dint_to_tod*/
       
 17023     break;
       
 17024 
       
 17025 /****
       
 17026  *DINT_TO_DT
       
 17027  */
       
 17028     case function_dint_to_dt :
       
 17029     {
       
 17030         symbol_c *last_type_symbol = NULL;
       
 17031 
       
 17032         {
       
 17033             symbol_c *IN_type_symbol = param_data_type;
       
 17034             last_type_symbol = param_data_type;
       
 17035             
       
 17036             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 17037             {
       
 17038         
       
 17039                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17040                 return return_type_symbol;
       
 17041                 
       
 17042             }
       
 17043             
       
 17044             ERROR;
       
 17045         }
       
 17046         
       
 17047     }/*function_dint_to_dt*/
       
 17048     break;
       
 17049 
       
 17050 /****
       
 17051  *LINT_TO_REAL
       
 17052  */
       
 17053     case function_lint_to_real :
       
 17054     {
       
 17055         symbol_c *last_type_symbol = NULL;
       
 17056 
       
 17057         {
       
 17058             symbol_c *IN_type_symbol = param_data_type;
       
 17059             last_type_symbol = param_data_type;
       
 17060             
       
 17061             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17062             {
       
 17063         
       
 17064                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17065                 return return_type_symbol;
       
 17066                 
       
 17067             }
       
 17068             
       
 17069             ERROR;
       
 17070         }
       
 17071         
       
 17072     }/*function_lint_to_real*/
       
 17073     break;
       
 17074 
       
 17075 /****
       
 17076  *LINT_TO_LREAL
       
 17077  */
       
 17078     case function_lint_to_lreal :
       
 17079     {
       
 17080         symbol_c *last_type_symbol = NULL;
       
 17081 
       
 17082         {
       
 17083             symbol_c *IN_type_symbol = param_data_type;
       
 17084             last_type_symbol = param_data_type;
       
 17085             
       
 17086             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17087             {
       
 17088         
       
 17089                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17090                 return return_type_symbol;
       
 17091                 
       
 17092             }
       
 17093             
       
 17094             ERROR;
       
 17095         }
       
 17096         
       
 17097     }/*function_lint_to_lreal*/
       
 17098     break;
       
 17099 
       
 17100 /****
       
 17101  *LINT_TO_SINT
       
 17102  */
       
 17103     case function_lint_to_sint :
       
 17104     {
       
 17105         symbol_c *last_type_symbol = NULL;
       
 17106 
       
 17107         {
       
 17108             symbol_c *IN_type_symbol = param_data_type;
       
 17109             last_type_symbol = param_data_type;
       
 17110             
       
 17111             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17112             {
       
 17113         
       
 17114                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17115                 return return_type_symbol;
       
 17116                 
       
 17117             }
       
 17118             
       
 17119             ERROR;
       
 17120         }
       
 17121         
       
 17122     }/*function_lint_to_sint*/
       
 17123     break;
       
 17124 
       
 17125 /****
       
 17126  *LINT_TO_INT
       
 17127  */
       
 17128     case function_lint_to_int :
       
 17129     {
       
 17130         symbol_c *last_type_symbol = NULL;
       
 17131 
       
 17132         {
       
 17133             symbol_c *IN_type_symbol = param_data_type;
       
 17134             last_type_symbol = param_data_type;
       
 17135             
       
 17136             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17137             {
       
 17138         
       
 17139                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17140                 return return_type_symbol;
       
 17141                 
       
 17142             }
       
 17143             
       
 17144             ERROR;
       
 17145         }
       
 17146         
       
 17147     }/*function_lint_to_int*/
       
 17148     break;
       
 17149 
       
 17150 /****
       
 17151  *LINT_TO_DINT
       
 17152  */
       
 17153     case function_lint_to_dint :
       
 17154     {
       
 17155         symbol_c *last_type_symbol = NULL;
       
 17156 
       
 17157         {
       
 17158             symbol_c *IN_type_symbol = param_data_type;
       
 17159             last_type_symbol = param_data_type;
       
 17160             
       
 17161             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16734             {
 17162             {
 16735         
 17163         
 16736                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17164                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 16737                 return return_type_symbol;
 17165                 return return_type_symbol;
 16738                 
 17166                 
 16739             }
 17167             }
 16740             
 17168             
 16741             ERROR;
 17169             ERROR;
 16742         }
 17170         }
 16743         
 17171         
 16744     }/*function_lreal_to_dint*/
 17172     }/*function_lint_to_dint*/
 16745     break;
 17173     break;
 16746 
 17174 
 16747 /****
 17175 /****
 16748  *LREAL_TO_LINT
 17176  *LINT_TO_USINT
 16749  */
 17177  */
 16750     case function_lreal_to_lint :
 17178     case function_lint_to_usint :
 16751     {
 17179     {
 16752         symbol_c *last_type_symbol = NULL;
 17180         symbol_c *last_type_symbol = NULL;
 16753 
 17181 
 16754         {
 17182         {
 16755             symbol_c *IN_type_symbol = param_data_type;
 17183             symbol_c *IN_type_symbol = param_data_type;
 16756             last_type_symbol = param_data_type;
 17184             last_type_symbol = param_data_type;
 16757             
 17185             
 16758             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 17186             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17187             {
       
 17188         
       
 17189                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17190                 return return_type_symbol;
       
 17191                 
       
 17192             }
       
 17193             
       
 17194             ERROR;
       
 17195         }
       
 17196         
       
 17197     }/*function_lint_to_usint*/
       
 17198     break;
       
 17199 
       
 17200 /****
       
 17201  *LINT_TO_UINT
       
 17202  */
       
 17203     case function_lint_to_uint :
       
 17204     {
       
 17205         symbol_c *last_type_symbol = NULL;
       
 17206 
       
 17207         {
       
 17208             symbol_c *IN_type_symbol = param_data_type;
       
 17209             last_type_symbol = param_data_type;
       
 17210             
       
 17211             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17212             {
       
 17213         
       
 17214                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17215                 return return_type_symbol;
       
 17216                 
       
 17217             }
       
 17218             
       
 17219             ERROR;
       
 17220         }
       
 17221         
       
 17222     }/*function_lint_to_uint*/
       
 17223     break;
       
 17224 
       
 17225 /****
       
 17226  *LINT_TO_UDINT
       
 17227  */
       
 17228     case function_lint_to_udint :
       
 17229     {
       
 17230         symbol_c *last_type_symbol = NULL;
       
 17231 
       
 17232         {
       
 17233             symbol_c *IN_type_symbol = param_data_type;
       
 17234             last_type_symbol = param_data_type;
       
 17235             
       
 17236             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17237             {
       
 17238         
       
 17239                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17240                 return return_type_symbol;
       
 17241                 
       
 17242             }
       
 17243             
       
 17244             ERROR;
       
 17245         }
       
 17246         
       
 17247     }/*function_lint_to_udint*/
       
 17248     break;
       
 17249 
       
 17250 /****
       
 17251  *LINT_TO_ULINT
       
 17252  */
       
 17253     case function_lint_to_ulint :
       
 17254     {
       
 17255         symbol_c *last_type_symbol = NULL;
       
 17256 
       
 17257         {
       
 17258             symbol_c *IN_type_symbol = param_data_type;
       
 17259             last_type_symbol = param_data_type;
       
 17260             
       
 17261             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17262             {
       
 17263         
       
 17264                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17265                 return return_type_symbol;
       
 17266                 
       
 17267             }
       
 17268             
       
 17269             ERROR;
       
 17270         }
       
 17271         
       
 17272     }/*function_lint_to_ulint*/
       
 17273     break;
       
 17274 
       
 17275 /****
       
 17276  *LINT_TO_TIME
       
 17277  */
       
 17278     case function_lint_to_time :
       
 17279     {
       
 17280         symbol_c *last_type_symbol = NULL;
       
 17281 
       
 17282         {
       
 17283             symbol_c *IN_type_symbol = param_data_type;
       
 17284             last_type_symbol = param_data_type;
       
 17285             
       
 17286             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17287             {
       
 17288         
       
 17289                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17290                 return return_type_symbol;
       
 17291                 
       
 17292             }
       
 17293             
       
 17294             ERROR;
       
 17295         }
       
 17296         
       
 17297     }/*function_lint_to_time*/
       
 17298     break;
       
 17299 
       
 17300 /****
       
 17301  *LINT_TO_BOOL
       
 17302  */
       
 17303     case function_lint_to_bool :
       
 17304     {
       
 17305         symbol_c *last_type_symbol = NULL;
       
 17306 
       
 17307         {
       
 17308             symbol_c *IN_type_symbol = param_data_type;
       
 17309             last_type_symbol = param_data_type;
       
 17310             
       
 17311             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17312             {
       
 17313         
       
 17314                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17315                 return return_type_symbol;
       
 17316                 
       
 17317             }
       
 17318             
       
 17319             ERROR;
       
 17320         }
       
 17321         
       
 17322     }/*function_lint_to_bool*/
       
 17323     break;
       
 17324 
       
 17325 /****
       
 17326  *LINT_TO_BYTE
       
 17327  */
       
 17328     case function_lint_to_byte :
       
 17329     {
       
 17330         symbol_c *last_type_symbol = NULL;
       
 17331 
       
 17332         {
       
 17333             symbol_c *IN_type_symbol = param_data_type;
       
 17334             last_type_symbol = param_data_type;
       
 17335             
       
 17336             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17337             {
       
 17338         
       
 17339                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17340                 return return_type_symbol;
       
 17341                 
       
 17342             }
       
 17343             
       
 17344             ERROR;
       
 17345         }
       
 17346         
       
 17347     }/*function_lint_to_byte*/
       
 17348     break;
       
 17349 
       
 17350 /****
       
 17351  *LINT_TO_WORD
       
 17352  */
       
 17353     case function_lint_to_word :
       
 17354     {
       
 17355         symbol_c *last_type_symbol = NULL;
       
 17356 
       
 17357         {
       
 17358             symbol_c *IN_type_symbol = param_data_type;
       
 17359             last_type_symbol = param_data_type;
       
 17360             
       
 17361             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17362             {
       
 17363         
       
 17364                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17365                 return return_type_symbol;
       
 17366                 
       
 17367             }
       
 17368             
       
 17369             ERROR;
       
 17370         }
       
 17371         
       
 17372     }/*function_lint_to_word*/
       
 17373     break;
       
 17374 
       
 17375 /****
       
 17376  *LINT_TO_DWORD
       
 17377  */
       
 17378     case function_lint_to_dword :
       
 17379     {
       
 17380         symbol_c *last_type_symbol = NULL;
       
 17381 
       
 17382         {
       
 17383             symbol_c *IN_type_symbol = param_data_type;
       
 17384             last_type_symbol = param_data_type;
       
 17385             
       
 17386             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17387             {
       
 17388         
       
 17389                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17390                 return return_type_symbol;
       
 17391                 
       
 17392             }
       
 17393             
       
 17394             ERROR;
       
 17395         }
       
 17396         
       
 17397     }/*function_lint_to_dword*/
       
 17398     break;
       
 17399 
       
 17400 /****
       
 17401  *LINT_TO_LWORD
       
 17402  */
       
 17403     case function_lint_to_lword :
       
 17404     {
       
 17405         symbol_c *last_type_symbol = NULL;
       
 17406 
       
 17407         {
       
 17408             symbol_c *IN_type_symbol = param_data_type;
       
 17409             last_type_symbol = param_data_type;
       
 17410             
       
 17411             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17412             {
       
 17413         
       
 17414                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17415                 return return_type_symbol;
       
 17416                 
       
 17417             }
       
 17418             
       
 17419             ERROR;
       
 17420         }
       
 17421         
       
 17422     }/*function_lint_to_lword*/
       
 17423     break;
       
 17424 
       
 17425 /****
       
 17426  *LINT_TO_STRING
       
 17427  */
       
 17428     case function_lint_to_string :
       
 17429     {
       
 17430         symbol_c *last_type_symbol = NULL;
       
 17431 
       
 17432         {
       
 17433             symbol_c *IN_type_symbol = param_data_type;
       
 17434             last_type_symbol = param_data_type;
       
 17435             
       
 17436             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17437             {
       
 17438         
       
 17439                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17440                 return return_type_symbol;
       
 17441                 
       
 17442             }
       
 17443             
       
 17444             ERROR;
       
 17445         }
       
 17446         
       
 17447     }/*function_lint_to_string*/
       
 17448     break;
       
 17449 
       
 17450 /****
       
 17451  *LINT_TO_DATE
       
 17452  */
       
 17453     case function_lint_to_date :
       
 17454     {
       
 17455         symbol_c *last_type_symbol = NULL;
       
 17456 
       
 17457         {
       
 17458             symbol_c *IN_type_symbol = param_data_type;
       
 17459             last_type_symbol = param_data_type;
       
 17460             
       
 17461             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17462             {
       
 17463         
       
 17464                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17465                 return return_type_symbol;
       
 17466                 
       
 17467             }
       
 17468             
       
 17469             ERROR;
       
 17470         }
       
 17471         
       
 17472     }/*function_lint_to_date*/
       
 17473     break;
       
 17474 
       
 17475 /****
       
 17476  *LINT_TO_TOD
       
 17477  */
       
 17478     case function_lint_to_tod :
       
 17479     {
       
 17480         symbol_c *last_type_symbol = NULL;
       
 17481 
       
 17482         {
       
 17483             symbol_c *IN_type_symbol = param_data_type;
       
 17484             last_type_symbol = param_data_type;
       
 17485             
       
 17486             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17487             {
       
 17488         
       
 17489                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17490                 return return_type_symbol;
       
 17491                 
       
 17492             }
       
 17493             
       
 17494             ERROR;
       
 17495         }
       
 17496         
       
 17497     }/*function_lint_to_tod*/
       
 17498     break;
       
 17499 
       
 17500 /****
       
 17501  *LINT_TO_DT
       
 17502  */
       
 17503     case function_lint_to_dt :
       
 17504     {
       
 17505         symbol_c *last_type_symbol = NULL;
       
 17506 
       
 17507         {
       
 17508             symbol_c *IN_type_symbol = param_data_type;
       
 17509             last_type_symbol = param_data_type;
       
 17510             
       
 17511             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 17512             {
       
 17513         
       
 17514                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17515                 return return_type_symbol;
       
 17516                 
       
 17517             }
       
 17518             
       
 17519             ERROR;
       
 17520         }
       
 17521         
       
 17522     }/*function_lint_to_dt*/
       
 17523     break;
       
 17524 
       
 17525 /****
       
 17526  *USINT_TO_REAL
       
 17527  */
       
 17528     case function_usint_to_real :
       
 17529     {
       
 17530         symbol_c *last_type_symbol = NULL;
       
 17531 
       
 17532         {
       
 17533             symbol_c *IN_type_symbol = param_data_type;
       
 17534             last_type_symbol = param_data_type;
       
 17535             
       
 17536             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17537             {
       
 17538         
       
 17539                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17540                 return return_type_symbol;
       
 17541                 
       
 17542             }
       
 17543             
       
 17544             ERROR;
       
 17545         }
       
 17546         
       
 17547     }/*function_usint_to_real*/
       
 17548     break;
       
 17549 
       
 17550 /****
       
 17551  *USINT_TO_LREAL
       
 17552  */
       
 17553     case function_usint_to_lreal :
       
 17554     {
       
 17555         symbol_c *last_type_symbol = NULL;
       
 17556 
       
 17557         {
       
 17558             symbol_c *IN_type_symbol = param_data_type;
       
 17559             last_type_symbol = param_data_type;
       
 17560             
       
 17561             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17562             {
       
 17563         
       
 17564                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17565                 return return_type_symbol;
       
 17566                 
       
 17567             }
       
 17568             
       
 17569             ERROR;
       
 17570         }
       
 17571         
       
 17572     }/*function_usint_to_lreal*/
       
 17573     break;
       
 17574 
       
 17575 /****
       
 17576  *USINT_TO_SINT
       
 17577  */
       
 17578     case function_usint_to_sint :
       
 17579     {
       
 17580         symbol_c *last_type_symbol = NULL;
       
 17581 
       
 17582         {
       
 17583             symbol_c *IN_type_symbol = param_data_type;
       
 17584             last_type_symbol = param_data_type;
       
 17585             
       
 17586             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17587             {
       
 17588         
       
 17589                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17590                 return return_type_symbol;
       
 17591                 
       
 17592             }
       
 17593             
       
 17594             ERROR;
       
 17595         }
       
 17596         
       
 17597     }/*function_usint_to_sint*/
       
 17598     break;
       
 17599 
       
 17600 /****
       
 17601  *USINT_TO_INT
       
 17602  */
       
 17603     case function_usint_to_int :
       
 17604     {
       
 17605         symbol_c *last_type_symbol = NULL;
       
 17606 
       
 17607         {
       
 17608             symbol_c *IN_type_symbol = param_data_type;
       
 17609             last_type_symbol = param_data_type;
       
 17610             
       
 17611             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17612             {
       
 17613         
       
 17614                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17615                 return return_type_symbol;
       
 17616                 
       
 17617             }
       
 17618             
       
 17619             ERROR;
       
 17620         }
       
 17621         
       
 17622     }/*function_usint_to_int*/
       
 17623     break;
       
 17624 
       
 17625 /****
       
 17626  *USINT_TO_DINT
       
 17627  */
       
 17628     case function_usint_to_dint :
       
 17629     {
       
 17630         symbol_c *last_type_symbol = NULL;
       
 17631 
       
 17632         {
       
 17633             symbol_c *IN_type_symbol = param_data_type;
       
 17634             last_type_symbol = param_data_type;
       
 17635             
       
 17636             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17637             {
       
 17638         
       
 17639                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17640                 return return_type_symbol;
       
 17641                 
       
 17642             }
       
 17643             
       
 17644             ERROR;
       
 17645         }
       
 17646         
       
 17647     }/*function_usint_to_dint*/
       
 17648     break;
       
 17649 
       
 17650 /****
       
 17651  *USINT_TO_LINT
       
 17652  */
       
 17653     case function_usint_to_lint :
       
 17654     {
       
 17655         symbol_c *last_type_symbol = NULL;
       
 17656 
       
 17657         {
       
 17658             symbol_c *IN_type_symbol = param_data_type;
       
 17659             last_type_symbol = param_data_type;
       
 17660             
       
 17661             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 16759             {
 17662             {
 16760         
 17663         
 16761                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17664                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 16762                 return return_type_symbol;
 17665                 return return_type_symbol;
 16763                 
 17666                 
 16764             }
 17667             }
 16765             
 17668             
 16766             ERROR;
 17669             ERROR;
 16767         }
 17670         }
 16768         
 17671         
 16769     }/*function_lreal_to_lint*/
 17672     }/*function_usint_to_lint*/
 16770     break;
 17673     break;
 16771 
 17674 
 16772 /****
 17675 /****
 16773  *LREAL_TO_USINT
 17676  *USINT_TO_UINT
 16774  */
 17677  */
 16775     case function_lreal_to_usint :
 17678     case function_usint_to_uint :
 16776     {
 17679     {
 16777         symbol_c *last_type_symbol = NULL;
 17680         symbol_c *last_type_symbol = NULL;
 16778 
 17681 
 16779         {
 17682         {
 16780             symbol_c *IN_type_symbol = param_data_type;
 17683             symbol_c *IN_type_symbol = param_data_type;
 16781             last_type_symbol = param_data_type;
 17684             last_type_symbol = param_data_type;
 16782             
 17685             
 16783             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 17686             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17687             {
       
 17688         
       
 17689                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17690                 return return_type_symbol;
       
 17691                 
       
 17692             }
       
 17693             
       
 17694             ERROR;
       
 17695         }
       
 17696         
       
 17697     }/*function_usint_to_uint*/
       
 17698     break;
       
 17699 
       
 17700 /****
       
 17701  *USINT_TO_UDINT
       
 17702  */
       
 17703     case function_usint_to_udint :
       
 17704     {
       
 17705         symbol_c *last_type_symbol = NULL;
       
 17706 
       
 17707         {
       
 17708             symbol_c *IN_type_symbol = param_data_type;
       
 17709             last_type_symbol = param_data_type;
       
 17710             
       
 17711             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17712             {
       
 17713         
       
 17714                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17715                 return return_type_symbol;
       
 17716                 
       
 17717             }
       
 17718             
       
 17719             ERROR;
       
 17720         }
       
 17721         
       
 17722     }/*function_usint_to_udint*/
       
 17723     break;
       
 17724 
       
 17725 /****
       
 17726  *USINT_TO_ULINT
       
 17727  */
       
 17728     case function_usint_to_ulint :
       
 17729     {
       
 17730         symbol_c *last_type_symbol = NULL;
       
 17731 
       
 17732         {
       
 17733             symbol_c *IN_type_symbol = param_data_type;
       
 17734             last_type_symbol = param_data_type;
       
 17735             
       
 17736             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17737             {
       
 17738         
       
 17739                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17740                 return return_type_symbol;
       
 17741                 
       
 17742             }
       
 17743             
       
 17744             ERROR;
       
 17745         }
       
 17746         
       
 17747     }/*function_usint_to_ulint*/
       
 17748     break;
       
 17749 
       
 17750 /****
       
 17751  *USINT_TO_TIME
       
 17752  */
       
 17753     case function_usint_to_time :
       
 17754     {
       
 17755         symbol_c *last_type_symbol = NULL;
       
 17756 
       
 17757         {
       
 17758             symbol_c *IN_type_symbol = param_data_type;
       
 17759             last_type_symbol = param_data_type;
       
 17760             
       
 17761             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17762             {
       
 17763         
       
 17764                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17765                 return return_type_symbol;
       
 17766                 
       
 17767             }
       
 17768             
       
 17769             ERROR;
       
 17770         }
       
 17771         
       
 17772     }/*function_usint_to_time*/
       
 17773     break;
       
 17774 
       
 17775 /****
       
 17776  *USINT_TO_BOOL
       
 17777  */
       
 17778     case function_usint_to_bool :
       
 17779     {
       
 17780         symbol_c *last_type_symbol = NULL;
       
 17781 
       
 17782         {
       
 17783             symbol_c *IN_type_symbol = param_data_type;
       
 17784             last_type_symbol = param_data_type;
       
 17785             
       
 17786             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17787             {
       
 17788         
       
 17789                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17790                 return return_type_symbol;
       
 17791                 
       
 17792             }
       
 17793             
       
 17794             ERROR;
       
 17795         }
       
 17796         
       
 17797     }/*function_usint_to_bool*/
       
 17798     break;
       
 17799 
       
 17800 /****
       
 17801  *USINT_TO_BYTE
       
 17802  */
       
 17803     case function_usint_to_byte :
       
 17804     {
       
 17805         symbol_c *last_type_symbol = NULL;
       
 17806 
       
 17807         {
       
 17808             symbol_c *IN_type_symbol = param_data_type;
       
 17809             last_type_symbol = param_data_type;
       
 17810             
       
 17811             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17812             {
       
 17813         
       
 17814                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17815                 return return_type_symbol;
       
 17816                 
       
 17817             }
       
 17818             
       
 17819             ERROR;
       
 17820         }
       
 17821         
       
 17822     }/*function_usint_to_byte*/
       
 17823     break;
       
 17824 
       
 17825 /****
       
 17826  *USINT_TO_WORD
       
 17827  */
       
 17828     case function_usint_to_word :
       
 17829     {
       
 17830         symbol_c *last_type_symbol = NULL;
       
 17831 
       
 17832         {
       
 17833             symbol_c *IN_type_symbol = param_data_type;
       
 17834             last_type_symbol = param_data_type;
       
 17835             
       
 17836             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17837             {
       
 17838         
       
 17839                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17840                 return return_type_symbol;
       
 17841                 
       
 17842             }
       
 17843             
       
 17844             ERROR;
       
 17845         }
       
 17846         
       
 17847     }/*function_usint_to_word*/
       
 17848     break;
       
 17849 
       
 17850 /****
       
 17851  *USINT_TO_DWORD
       
 17852  */
       
 17853     case function_usint_to_dword :
       
 17854     {
       
 17855         symbol_c *last_type_symbol = NULL;
       
 17856 
       
 17857         {
       
 17858             symbol_c *IN_type_symbol = param_data_type;
       
 17859             last_type_symbol = param_data_type;
       
 17860             
       
 17861             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17862             {
       
 17863         
       
 17864                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17865                 return return_type_symbol;
       
 17866                 
       
 17867             }
       
 17868             
       
 17869             ERROR;
       
 17870         }
       
 17871         
       
 17872     }/*function_usint_to_dword*/
       
 17873     break;
       
 17874 
       
 17875 /****
       
 17876  *USINT_TO_LWORD
       
 17877  */
       
 17878     case function_usint_to_lword :
       
 17879     {
       
 17880         symbol_c *last_type_symbol = NULL;
       
 17881 
       
 17882         {
       
 17883             symbol_c *IN_type_symbol = param_data_type;
       
 17884             last_type_symbol = param_data_type;
       
 17885             
       
 17886             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17887             {
       
 17888         
       
 17889                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17890                 return return_type_symbol;
       
 17891                 
       
 17892             }
       
 17893             
       
 17894             ERROR;
       
 17895         }
       
 17896         
       
 17897     }/*function_usint_to_lword*/
       
 17898     break;
       
 17899 
       
 17900 /****
       
 17901  *USINT_TO_STRING
       
 17902  */
       
 17903     case function_usint_to_string :
       
 17904     {
       
 17905         symbol_c *last_type_symbol = NULL;
       
 17906 
       
 17907         {
       
 17908             symbol_c *IN_type_symbol = param_data_type;
       
 17909             last_type_symbol = param_data_type;
       
 17910             
       
 17911             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17912             {
       
 17913         
       
 17914                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17915                 return return_type_symbol;
       
 17916                 
       
 17917             }
       
 17918             
       
 17919             ERROR;
       
 17920         }
       
 17921         
       
 17922     }/*function_usint_to_string*/
       
 17923     break;
       
 17924 
       
 17925 /****
       
 17926  *USINT_TO_DATE
       
 17927  */
       
 17928     case function_usint_to_date :
       
 17929     {
       
 17930         symbol_c *last_type_symbol = NULL;
       
 17931 
       
 17932         {
       
 17933             symbol_c *IN_type_symbol = param_data_type;
       
 17934             last_type_symbol = param_data_type;
       
 17935             
       
 17936             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17937             {
       
 17938         
       
 17939                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17940                 return return_type_symbol;
       
 17941                 
       
 17942             }
       
 17943             
       
 17944             ERROR;
       
 17945         }
       
 17946         
       
 17947     }/*function_usint_to_date*/
       
 17948     break;
       
 17949 
       
 17950 /****
       
 17951  *USINT_TO_TOD
       
 17952  */
       
 17953     case function_usint_to_tod :
       
 17954     {
       
 17955         symbol_c *last_type_symbol = NULL;
       
 17956 
       
 17957         {
       
 17958             symbol_c *IN_type_symbol = param_data_type;
       
 17959             last_type_symbol = param_data_type;
       
 17960             
       
 17961             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17962             {
       
 17963         
       
 17964                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17965                 return return_type_symbol;
       
 17966                 
       
 17967             }
       
 17968             
       
 17969             ERROR;
       
 17970         }
       
 17971         
       
 17972     }/*function_usint_to_tod*/
       
 17973     break;
       
 17974 
       
 17975 /****
       
 17976  *USINT_TO_DT
       
 17977  */
       
 17978     case function_usint_to_dt :
       
 17979     {
       
 17980         symbol_c *last_type_symbol = NULL;
       
 17981 
       
 17982         {
       
 17983             symbol_c *IN_type_symbol = param_data_type;
       
 17984             last_type_symbol = param_data_type;
       
 17985             
       
 17986             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 17987             {
       
 17988         
       
 17989                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17990                 return return_type_symbol;
       
 17991                 
       
 17992             }
       
 17993             
       
 17994             ERROR;
       
 17995         }
       
 17996         
       
 17997     }/*function_usint_to_dt*/
       
 17998     break;
       
 17999 
       
 18000 /****
       
 18001  *UINT_TO_REAL
       
 18002  */
       
 18003     case function_uint_to_real :
       
 18004     {
       
 18005         symbol_c *last_type_symbol = NULL;
       
 18006 
       
 18007         {
       
 18008             symbol_c *IN_type_symbol = param_data_type;
       
 18009             last_type_symbol = param_data_type;
       
 18010             
       
 18011             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18012             {
       
 18013         
       
 18014                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18015                 return return_type_symbol;
       
 18016                 
       
 18017             }
       
 18018             
       
 18019             ERROR;
       
 18020         }
       
 18021         
       
 18022     }/*function_uint_to_real*/
       
 18023     break;
       
 18024 
       
 18025 /****
       
 18026  *UINT_TO_LREAL
       
 18027  */
       
 18028     case function_uint_to_lreal :
       
 18029     {
       
 18030         symbol_c *last_type_symbol = NULL;
       
 18031 
       
 18032         {
       
 18033             symbol_c *IN_type_symbol = param_data_type;
       
 18034             last_type_symbol = param_data_type;
       
 18035             
       
 18036             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18037             {
       
 18038         
       
 18039                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18040                 return return_type_symbol;
       
 18041                 
       
 18042             }
       
 18043             
       
 18044             ERROR;
       
 18045         }
       
 18046         
       
 18047     }/*function_uint_to_lreal*/
       
 18048     break;
       
 18049 
       
 18050 /****
       
 18051  *UINT_TO_SINT
       
 18052  */
       
 18053     case function_uint_to_sint :
       
 18054     {
       
 18055         symbol_c *last_type_symbol = NULL;
       
 18056 
       
 18057         {
       
 18058             symbol_c *IN_type_symbol = param_data_type;
       
 18059             last_type_symbol = param_data_type;
       
 18060             
       
 18061             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18062             {
       
 18063         
       
 18064                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18065                 return return_type_symbol;
       
 18066                 
       
 18067             }
       
 18068             
       
 18069             ERROR;
       
 18070         }
       
 18071         
       
 18072     }/*function_uint_to_sint*/
       
 18073     break;
       
 18074 
       
 18075 /****
       
 18076  *UINT_TO_INT
       
 18077  */
       
 18078     case function_uint_to_int :
       
 18079     {
       
 18080         symbol_c *last_type_symbol = NULL;
       
 18081 
       
 18082         {
       
 18083             symbol_c *IN_type_symbol = param_data_type;
       
 18084             last_type_symbol = param_data_type;
       
 18085             
       
 18086             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18087             {
       
 18088         
       
 18089                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18090                 return return_type_symbol;
       
 18091                 
       
 18092             }
       
 18093             
       
 18094             ERROR;
       
 18095         }
       
 18096         
       
 18097     }/*function_uint_to_int*/
       
 18098     break;
       
 18099 
       
 18100 /****
       
 18101  *UINT_TO_DINT
       
 18102  */
       
 18103     case function_uint_to_dint :
       
 18104     {
       
 18105         symbol_c *last_type_symbol = NULL;
       
 18106 
       
 18107         {
       
 18108             symbol_c *IN_type_symbol = param_data_type;
       
 18109             last_type_symbol = param_data_type;
       
 18110             
       
 18111             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18112             {
       
 18113         
       
 18114                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18115                 return return_type_symbol;
       
 18116                 
       
 18117             }
       
 18118             
       
 18119             ERROR;
       
 18120         }
       
 18121         
       
 18122     }/*function_uint_to_dint*/
       
 18123     break;
       
 18124 
       
 18125 /****
       
 18126  *UINT_TO_LINT
       
 18127  */
       
 18128     case function_uint_to_lint :
       
 18129     {
       
 18130         symbol_c *last_type_symbol = NULL;
       
 18131 
       
 18132         {
       
 18133             symbol_c *IN_type_symbol = param_data_type;
       
 18134             last_type_symbol = param_data_type;
       
 18135             
       
 18136             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18137             {
       
 18138         
       
 18139                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18140                 return return_type_symbol;
       
 18141                 
       
 18142             }
       
 18143             
       
 18144             ERROR;
       
 18145         }
       
 18146         
       
 18147     }/*function_uint_to_lint*/
       
 18148     break;
       
 18149 
       
 18150 /****
       
 18151  *UINT_TO_USINT
       
 18152  */
       
 18153     case function_uint_to_usint :
       
 18154     {
       
 18155         symbol_c *last_type_symbol = NULL;
       
 18156 
       
 18157         {
       
 18158             symbol_c *IN_type_symbol = param_data_type;
       
 18159             last_type_symbol = param_data_type;
       
 18160             
       
 18161             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 16784             {
 18162             {
 16785         
 18163         
 16786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18164                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16787                 return return_type_symbol;
 18165                 return return_type_symbol;
 16788                 
 18166                 
 16789             }
 18167             }
 16790             
 18168             
 16791             ERROR;
 18169             ERROR;
 16792         }
 18170         }
 16793         
 18171         
 16794     }/*function_lreal_to_usint*/
 18172     }/*function_uint_to_usint*/
 16795     break;
 18173     break;
 16796 
 18174 
 16797 /****
 18175 /****
 16798  *LREAL_TO_UINT
 18176  *UINT_TO_UDINT
 16799  */
 18177  */
 16800     case function_lreal_to_uint :
 18178     case function_uint_to_udint :
 16801     {
 18179     {
 16802         symbol_c *last_type_symbol = NULL;
 18180         symbol_c *last_type_symbol = NULL;
 16803 
 18181 
 16804         {
 18182         {
 16805             symbol_c *IN_type_symbol = param_data_type;
 18183             symbol_c *IN_type_symbol = param_data_type;
 16806             last_type_symbol = param_data_type;
 18184             last_type_symbol = param_data_type;
 16807             
 18185             
 16808             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 18186             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18187             {
       
 18188         
       
 18189                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18190                 return return_type_symbol;
       
 18191                 
       
 18192             }
       
 18193             
       
 18194             ERROR;
       
 18195         }
       
 18196         
       
 18197     }/*function_uint_to_udint*/
       
 18198     break;
       
 18199 
       
 18200 /****
       
 18201  *UINT_TO_ULINT
       
 18202  */
       
 18203     case function_uint_to_ulint :
       
 18204     {
       
 18205         symbol_c *last_type_symbol = NULL;
       
 18206 
       
 18207         {
       
 18208             symbol_c *IN_type_symbol = param_data_type;
       
 18209             last_type_symbol = param_data_type;
       
 18210             
       
 18211             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18212             {
       
 18213         
       
 18214                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18215                 return return_type_symbol;
       
 18216                 
       
 18217             }
       
 18218             
       
 18219             ERROR;
       
 18220         }
       
 18221         
       
 18222     }/*function_uint_to_ulint*/
       
 18223     break;
       
 18224 
       
 18225 /****
       
 18226  *UINT_TO_TIME
       
 18227  */
       
 18228     case function_uint_to_time :
       
 18229     {
       
 18230         symbol_c *last_type_symbol = NULL;
       
 18231 
       
 18232         {
       
 18233             symbol_c *IN_type_symbol = param_data_type;
       
 18234             last_type_symbol = param_data_type;
       
 18235             
       
 18236             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18237             {
       
 18238         
       
 18239                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18240                 return return_type_symbol;
       
 18241                 
       
 18242             }
       
 18243             
       
 18244             ERROR;
       
 18245         }
       
 18246         
       
 18247     }/*function_uint_to_time*/
       
 18248     break;
       
 18249 
       
 18250 /****
       
 18251  *UINT_TO_BOOL
       
 18252  */
       
 18253     case function_uint_to_bool :
       
 18254     {
       
 18255         symbol_c *last_type_symbol = NULL;
       
 18256 
       
 18257         {
       
 18258             symbol_c *IN_type_symbol = param_data_type;
       
 18259             last_type_symbol = param_data_type;
       
 18260             
       
 18261             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18262             {
       
 18263         
       
 18264                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18265                 return return_type_symbol;
       
 18266                 
       
 18267             }
       
 18268             
       
 18269             ERROR;
       
 18270         }
       
 18271         
       
 18272     }/*function_uint_to_bool*/
       
 18273     break;
       
 18274 
       
 18275 /****
       
 18276  *UINT_TO_BYTE
       
 18277  */
       
 18278     case function_uint_to_byte :
       
 18279     {
       
 18280         symbol_c *last_type_symbol = NULL;
       
 18281 
       
 18282         {
       
 18283             symbol_c *IN_type_symbol = param_data_type;
       
 18284             last_type_symbol = param_data_type;
       
 18285             
       
 18286             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18287             {
       
 18288         
       
 18289                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18290                 return return_type_symbol;
       
 18291                 
       
 18292             }
       
 18293             
       
 18294             ERROR;
       
 18295         }
       
 18296         
       
 18297     }/*function_uint_to_byte*/
       
 18298     break;
       
 18299 
       
 18300 /****
       
 18301  *UINT_TO_WORD
       
 18302  */
       
 18303     case function_uint_to_word :
       
 18304     {
       
 18305         symbol_c *last_type_symbol = NULL;
       
 18306 
       
 18307         {
       
 18308             symbol_c *IN_type_symbol = param_data_type;
       
 18309             last_type_symbol = param_data_type;
       
 18310             
       
 18311             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18312             {
       
 18313         
       
 18314                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18315                 return return_type_symbol;
       
 18316                 
       
 18317             }
       
 18318             
       
 18319             ERROR;
       
 18320         }
       
 18321         
       
 18322     }/*function_uint_to_word*/
       
 18323     break;
       
 18324 
       
 18325 /****
       
 18326  *UINT_TO_DWORD
       
 18327  */
       
 18328     case function_uint_to_dword :
       
 18329     {
       
 18330         symbol_c *last_type_symbol = NULL;
       
 18331 
       
 18332         {
       
 18333             symbol_c *IN_type_symbol = param_data_type;
       
 18334             last_type_symbol = param_data_type;
       
 18335             
       
 18336             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18337             {
       
 18338         
       
 18339                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18340                 return return_type_symbol;
       
 18341                 
       
 18342             }
       
 18343             
       
 18344             ERROR;
       
 18345         }
       
 18346         
       
 18347     }/*function_uint_to_dword*/
       
 18348     break;
       
 18349 
       
 18350 /****
       
 18351  *UINT_TO_LWORD
       
 18352  */
       
 18353     case function_uint_to_lword :
       
 18354     {
       
 18355         symbol_c *last_type_symbol = NULL;
       
 18356 
       
 18357         {
       
 18358             symbol_c *IN_type_symbol = param_data_type;
       
 18359             last_type_symbol = param_data_type;
       
 18360             
       
 18361             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18362             {
       
 18363         
       
 18364                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18365                 return return_type_symbol;
       
 18366                 
       
 18367             }
       
 18368             
       
 18369             ERROR;
       
 18370         }
       
 18371         
       
 18372     }/*function_uint_to_lword*/
       
 18373     break;
       
 18374 
       
 18375 /****
       
 18376  *UINT_TO_STRING
       
 18377  */
       
 18378     case function_uint_to_string :
       
 18379     {
       
 18380         symbol_c *last_type_symbol = NULL;
       
 18381 
       
 18382         {
       
 18383             symbol_c *IN_type_symbol = param_data_type;
       
 18384             last_type_symbol = param_data_type;
       
 18385             
       
 18386             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18387             {
       
 18388         
       
 18389                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18390                 return return_type_symbol;
       
 18391                 
       
 18392             }
       
 18393             
       
 18394             ERROR;
       
 18395         }
       
 18396         
       
 18397     }/*function_uint_to_string*/
       
 18398     break;
       
 18399 
       
 18400 /****
       
 18401  *UINT_TO_DATE
       
 18402  */
       
 18403     case function_uint_to_date :
       
 18404     {
       
 18405         symbol_c *last_type_symbol = NULL;
       
 18406 
       
 18407         {
       
 18408             symbol_c *IN_type_symbol = param_data_type;
       
 18409             last_type_symbol = param_data_type;
       
 18410             
       
 18411             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18412             {
       
 18413         
       
 18414                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18415                 return return_type_symbol;
       
 18416                 
       
 18417             }
       
 18418             
       
 18419             ERROR;
       
 18420         }
       
 18421         
       
 18422     }/*function_uint_to_date*/
       
 18423     break;
       
 18424 
       
 18425 /****
       
 18426  *UINT_TO_TOD
       
 18427  */
       
 18428     case function_uint_to_tod :
       
 18429     {
       
 18430         symbol_c *last_type_symbol = NULL;
       
 18431 
       
 18432         {
       
 18433             symbol_c *IN_type_symbol = param_data_type;
       
 18434             last_type_symbol = param_data_type;
       
 18435             
       
 18436             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18437             {
       
 18438         
       
 18439                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18440                 return return_type_symbol;
       
 18441                 
       
 18442             }
       
 18443             
       
 18444             ERROR;
       
 18445         }
       
 18446         
       
 18447     }/*function_uint_to_tod*/
       
 18448     break;
       
 18449 
       
 18450 /****
       
 18451  *UINT_TO_DT
       
 18452  */
       
 18453     case function_uint_to_dt :
       
 18454     {
       
 18455         symbol_c *last_type_symbol = NULL;
       
 18456 
       
 18457         {
       
 18458             symbol_c *IN_type_symbol = param_data_type;
       
 18459             last_type_symbol = param_data_type;
       
 18460             
       
 18461             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 18462             {
       
 18463         
       
 18464                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18465                 return return_type_symbol;
       
 18466                 
       
 18467             }
       
 18468             
       
 18469             ERROR;
       
 18470         }
       
 18471         
       
 18472     }/*function_uint_to_dt*/
       
 18473     break;
       
 18474 
       
 18475 /****
       
 18476  *UDINT_TO_REAL
       
 18477  */
       
 18478     case function_udint_to_real :
       
 18479     {
       
 18480         symbol_c *last_type_symbol = NULL;
       
 18481 
       
 18482         {
       
 18483             symbol_c *IN_type_symbol = param_data_type;
       
 18484             last_type_symbol = param_data_type;
       
 18485             
       
 18486             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18487             {
       
 18488         
       
 18489                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18490                 return return_type_symbol;
       
 18491                 
       
 18492             }
       
 18493             
       
 18494             ERROR;
       
 18495         }
       
 18496         
       
 18497     }/*function_udint_to_real*/
       
 18498     break;
       
 18499 
       
 18500 /****
       
 18501  *UDINT_TO_LREAL
       
 18502  */
       
 18503     case function_udint_to_lreal :
       
 18504     {
       
 18505         symbol_c *last_type_symbol = NULL;
       
 18506 
       
 18507         {
       
 18508             symbol_c *IN_type_symbol = param_data_type;
       
 18509             last_type_symbol = param_data_type;
       
 18510             
       
 18511             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18512             {
       
 18513         
       
 18514                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18515                 return return_type_symbol;
       
 18516                 
       
 18517             }
       
 18518             
       
 18519             ERROR;
       
 18520         }
       
 18521         
       
 18522     }/*function_udint_to_lreal*/
       
 18523     break;
       
 18524 
       
 18525 /****
       
 18526  *UDINT_TO_SINT
       
 18527  */
       
 18528     case function_udint_to_sint :
       
 18529     {
       
 18530         symbol_c *last_type_symbol = NULL;
       
 18531 
       
 18532         {
       
 18533             symbol_c *IN_type_symbol = param_data_type;
       
 18534             last_type_symbol = param_data_type;
       
 18535             
       
 18536             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18537             {
       
 18538         
       
 18539                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18540                 return return_type_symbol;
       
 18541                 
       
 18542             }
       
 18543             
       
 18544             ERROR;
       
 18545         }
       
 18546         
       
 18547     }/*function_udint_to_sint*/
       
 18548     break;
       
 18549 
       
 18550 /****
       
 18551  *UDINT_TO_INT
       
 18552  */
       
 18553     case function_udint_to_int :
       
 18554     {
       
 18555         symbol_c *last_type_symbol = NULL;
       
 18556 
       
 18557         {
       
 18558             symbol_c *IN_type_symbol = param_data_type;
       
 18559             last_type_symbol = param_data_type;
       
 18560             
       
 18561             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18562             {
       
 18563         
       
 18564                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18565                 return return_type_symbol;
       
 18566                 
       
 18567             }
       
 18568             
       
 18569             ERROR;
       
 18570         }
       
 18571         
       
 18572     }/*function_udint_to_int*/
       
 18573     break;
       
 18574 
       
 18575 /****
       
 18576  *UDINT_TO_DINT
       
 18577  */
       
 18578     case function_udint_to_dint :
       
 18579     {
       
 18580         symbol_c *last_type_symbol = NULL;
       
 18581 
       
 18582         {
       
 18583             symbol_c *IN_type_symbol = param_data_type;
       
 18584             last_type_symbol = param_data_type;
       
 18585             
       
 18586             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18587             {
       
 18588         
       
 18589                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18590                 return return_type_symbol;
       
 18591                 
       
 18592             }
       
 18593             
       
 18594             ERROR;
       
 18595         }
       
 18596         
       
 18597     }/*function_udint_to_dint*/
       
 18598     break;
       
 18599 
       
 18600 /****
       
 18601  *UDINT_TO_LINT
       
 18602  */
       
 18603     case function_udint_to_lint :
       
 18604     {
       
 18605         symbol_c *last_type_symbol = NULL;
       
 18606 
       
 18607         {
       
 18608             symbol_c *IN_type_symbol = param_data_type;
       
 18609             last_type_symbol = param_data_type;
       
 18610             
       
 18611             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18612             {
       
 18613         
       
 18614                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18615                 return return_type_symbol;
       
 18616                 
       
 18617             }
       
 18618             
       
 18619             ERROR;
       
 18620         }
       
 18621         
       
 18622     }/*function_udint_to_lint*/
       
 18623     break;
       
 18624 
       
 18625 /****
       
 18626  *UDINT_TO_USINT
       
 18627  */
       
 18628     case function_udint_to_usint :
       
 18629     {
       
 18630         symbol_c *last_type_symbol = NULL;
       
 18631 
       
 18632         {
       
 18633             symbol_c *IN_type_symbol = param_data_type;
       
 18634             last_type_symbol = param_data_type;
       
 18635             
       
 18636             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18637             {
       
 18638         
       
 18639                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18640                 return return_type_symbol;
       
 18641                 
       
 18642             }
       
 18643             
       
 18644             ERROR;
       
 18645         }
       
 18646         
       
 18647     }/*function_udint_to_usint*/
       
 18648     break;
       
 18649 
       
 18650 /****
       
 18651  *UDINT_TO_UINT
       
 18652  */
       
 18653     case function_udint_to_uint :
       
 18654     {
       
 18655         symbol_c *last_type_symbol = NULL;
       
 18656 
       
 18657         {
       
 18658             symbol_c *IN_type_symbol = param_data_type;
       
 18659             last_type_symbol = param_data_type;
       
 18660             
       
 18661             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 16809             {
 18662             {
 16810         
 18663         
 16811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18664                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16812                 return return_type_symbol;
 18665                 return return_type_symbol;
 16813                 
 18666                 
 16814             }
 18667             }
 16815             
 18668             
 16816             ERROR;
 18669             ERROR;
 16817         }
 18670         }
 16818         
 18671         
 16819     }/*function_lreal_to_uint*/
 18672     }/*function_udint_to_uint*/
 16820     break;
 18673     break;
 16821 
 18674 
 16822 /****
 18675 /****
 16823  *LREAL_TO_UDINT
 18676  *UDINT_TO_ULINT
 16824  */
 18677  */
 16825     case function_lreal_to_udint :
 18678     case function_udint_to_ulint :
 16826     {
 18679     {
 16827         symbol_c *last_type_symbol = NULL;
 18680         symbol_c *last_type_symbol = NULL;
 16828 
 18681 
 16829         {
 18682         {
 16830             symbol_c *IN_type_symbol = param_data_type;
 18683             symbol_c *IN_type_symbol = param_data_type;
 16831             last_type_symbol = param_data_type;
 18684             last_type_symbol = param_data_type;
 16832             
 18685             
 16833             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 18686             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18687             {
       
 18688         
       
 18689                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18690                 return return_type_symbol;
       
 18691                 
       
 18692             }
       
 18693             
       
 18694             ERROR;
       
 18695         }
       
 18696         
       
 18697     }/*function_udint_to_ulint*/
       
 18698     break;
       
 18699 
       
 18700 /****
       
 18701  *UDINT_TO_TIME
       
 18702  */
       
 18703     case function_udint_to_time :
       
 18704     {
       
 18705         symbol_c *last_type_symbol = NULL;
       
 18706 
       
 18707         {
       
 18708             symbol_c *IN_type_symbol = param_data_type;
       
 18709             last_type_symbol = param_data_type;
       
 18710             
       
 18711             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18712             {
       
 18713         
       
 18714                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18715                 return return_type_symbol;
       
 18716                 
       
 18717             }
       
 18718             
       
 18719             ERROR;
       
 18720         }
       
 18721         
       
 18722     }/*function_udint_to_time*/
       
 18723     break;
       
 18724 
       
 18725 /****
       
 18726  *UDINT_TO_BOOL
       
 18727  */
       
 18728     case function_udint_to_bool :
       
 18729     {
       
 18730         symbol_c *last_type_symbol = NULL;
       
 18731 
       
 18732         {
       
 18733             symbol_c *IN_type_symbol = param_data_type;
       
 18734             last_type_symbol = param_data_type;
       
 18735             
       
 18736             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18737             {
       
 18738         
       
 18739                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18740                 return return_type_symbol;
       
 18741                 
       
 18742             }
       
 18743             
       
 18744             ERROR;
       
 18745         }
       
 18746         
       
 18747     }/*function_udint_to_bool*/
       
 18748     break;
       
 18749 
       
 18750 /****
       
 18751  *UDINT_TO_BYTE
       
 18752  */
       
 18753     case function_udint_to_byte :
       
 18754     {
       
 18755         symbol_c *last_type_symbol = NULL;
       
 18756 
       
 18757         {
       
 18758             symbol_c *IN_type_symbol = param_data_type;
       
 18759             last_type_symbol = param_data_type;
       
 18760             
       
 18761             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18762             {
       
 18763         
       
 18764                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18765                 return return_type_symbol;
       
 18766                 
       
 18767             }
       
 18768             
       
 18769             ERROR;
       
 18770         }
       
 18771         
       
 18772     }/*function_udint_to_byte*/
       
 18773     break;
       
 18774 
       
 18775 /****
       
 18776  *UDINT_TO_WORD
       
 18777  */
       
 18778     case function_udint_to_word :
       
 18779     {
       
 18780         symbol_c *last_type_symbol = NULL;
       
 18781 
       
 18782         {
       
 18783             symbol_c *IN_type_symbol = param_data_type;
       
 18784             last_type_symbol = param_data_type;
       
 18785             
       
 18786             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18787             {
       
 18788         
       
 18789                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18790                 return return_type_symbol;
       
 18791                 
       
 18792             }
       
 18793             
       
 18794             ERROR;
       
 18795         }
       
 18796         
       
 18797     }/*function_udint_to_word*/
       
 18798     break;
       
 18799 
       
 18800 /****
       
 18801  *UDINT_TO_DWORD
       
 18802  */
       
 18803     case function_udint_to_dword :
       
 18804     {
       
 18805         symbol_c *last_type_symbol = NULL;
       
 18806 
       
 18807         {
       
 18808             symbol_c *IN_type_symbol = param_data_type;
       
 18809             last_type_symbol = param_data_type;
       
 18810             
       
 18811             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18812             {
       
 18813         
       
 18814                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18815                 return return_type_symbol;
       
 18816                 
       
 18817             }
       
 18818             
       
 18819             ERROR;
       
 18820         }
       
 18821         
       
 18822     }/*function_udint_to_dword*/
       
 18823     break;
       
 18824 
       
 18825 /****
       
 18826  *UDINT_TO_LWORD
       
 18827  */
       
 18828     case function_udint_to_lword :
       
 18829     {
       
 18830         symbol_c *last_type_symbol = NULL;
       
 18831 
       
 18832         {
       
 18833             symbol_c *IN_type_symbol = param_data_type;
       
 18834             last_type_symbol = param_data_type;
       
 18835             
       
 18836             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18837             {
       
 18838         
       
 18839                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18840                 return return_type_symbol;
       
 18841                 
       
 18842             }
       
 18843             
       
 18844             ERROR;
       
 18845         }
       
 18846         
       
 18847     }/*function_udint_to_lword*/
       
 18848     break;
       
 18849 
       
 18850 /****
       
 18851  *UDINT_TO_STRING
       
 18852  */
       
 18853     case function_udint_to_string :
       
 18854     {
       
 18855         symbol_c *last_type_symbol = NULL;
       
 18856 
       
 18857         {
       
 18858             symbol_c *IN_type_symbol = param_data_type;
       
 18859             last_type_symbol = param_data_type;
       
 18860             
       
 18861             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18862             {
       
 18863         
       
 18864                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18865                 return return_type_symbol;
       
 18866                 
       
 18867             }
       
 18868             
       
 18869             ERROR;
       
 18870         }
       
 18871         
       
 18872     }/*function_udint_to_string*/
       
 18873     break;
       
 18874 
       
 18875 /****
       
 18876  *UDINT_TO_DATE
       
 18877  */
       
 18878     case function_udint_to_date :
       
 18879     {
       
 18880         symbol_c *last_type_symbol = NULL;
       
 18881 
       
 18882         {
       
 18883             symbol_c *IN_type_symbol = param_data_type;
       
 18884             last_type_symbol = param_data_type;
       
 18885             
       
 18886             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18887             {
       
 18888         
       
 18889                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18890                 return return_type_symbol;
       
 18891                 
       
 18892             }
       
 18893             
       
 18894             ERROR;
       
 18895         }
       
 18896         
       
 18897     }/*function_udint_to_date*/
       
 18898     break;
       
 18899 
       
 18900 /****
       
 18901  *UDINT_TO_TOD
       
 18902  */
       
 18903     case function_udint_to_tod :
       
 18904     {
       
 18905         symbol_c *last_type_symbol = NULL;
       
 18906 
       
 18907         {
       
 18908             symbol_c *IN_type_symbol = param_data_type;
       
 18909             last_type_symbol = param_data_type;
       
 18910             
       
 18911             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18912             {
       
 18913         
       
 18914                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18915                 return return_type_symbol;
       
 18916                 
       
 18917             }
       
 18918             
       
 18919             ERROR;
       
 18920         }
       
 18921         
       
 18922     }/*function_udint_to_tod*/
       
 18923     break;
       
 18924 
       
 18925 /****
       
 18926  *UDINT_TO_DT
       
 18927  */
       
 18928     case function_udint_to_dt :
       
 18929     {
       
 18930         symbol_c *last_type_symbol = NULL;
       
 18931 
       
 18932         {
       
 18933             symbol_c *IN_type_symbol = param_data_type;
       
 18934             last_type_symbol = param_data_type;
       
 18935             
       
 18936             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 18937             {
       
 18938         
       
 18939                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18940                 return return_type_symbol;
       
 18941                 
       
 18942             }
       
 18943             
       
 18944             ERROR;
       
 18945         }
       
 18946         
       
 18947     }/*function_udint_to_dt*/
       
 18948     break;
       
 18949 
       
 18950 /****
       
 18951  *ULINT_TO_REAL
       
 18952  */
       
 18953     case function_ulint_to_real :
       
 18954     {
       
 18955         symbol_c *last_type_symbol = NULL;
       
 18956 
       
 18957         {
       
 18958             symbol_c *IN_type_symbol = param_data_type;
       
 18959             last_type_symbol = param_data_type;
       
 18960             
       
 18961             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 18962             {
       
 18963         
       
 18964                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18965                 return return_type_symbol;
       
 18966                 
       
 18967             }
       
 18968             
       
 18969             ERROR;
       
 18970         }
       
 18971         
       
 18972     }/*function_ulint_to_real*/
       
 18973     break;
       
 18974 
       
 18975 /****
       
 18976  *ULINT_TO_LREAL
       
 18977  */
       
 18978     case function_ulint_to_lreal :
       
 18979     {
       
 18980         symbol_c *last_type_symbol = NULL;
       
 18981 
       
 18982         {
       
 18983             symbol_c *IN_type_symbol = param_data_type;
       
 18984             last_type_symbol = param_data_type;
       
 18985             
       
 18986             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 18987             {
       
 18988         
       
 18989                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18990                 return return_type_symbol;
       
 18991                 
       
 18992             }
       
 18993             
       
 18994             ERROR;
       
 18995         }
       
 18996         
       
 18997     }/*function_ulint_to_lreal*/
       
 18998     break;
       
 18999 
       
 19000 /****
       
 19001  *ULINT_TO_SINT
       
 19002  */
       
 19003     case function_ulint_to_sint :
       
 19004     {
       
 19005         symbol_c *last_type_symbol = NULL;
       
 19006 
       
 19007         {
       
 19008             symbol_c *IN_type_symbol = param_data_type;
       
 19009             last_type_symbol = param_data_type;
       
 19010             
       
 19011             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19012             {
       
 19013         
       
 19014                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19015                 return return_type_symbol;
       
 19016                 
       
 19017             }
       
 19018             
       
 19019             ERROR;
       
 19020         }
       
 19021         
       
 19022     }/*function_ulint_to_sint*/
       
 19023     break;
       
 19024 
       
 19025 /****
       
 19026  *ULINT_TO_INT
       
 19027  */
       
 19028     case function_ulint_to_int :
       
 19029     {
       
 19030         symbol_c *last_type_symbol = NULL;
       
 19031 
       
 19032         {
       
 19033             symbol_c *IN_type_symbol = param_data_type;
       
 19034             last_type_symbol = param_data_type;
       
 19035             
       
 19036             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19037             {
       
 19038         
       
 19039                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19040                 return return_type_symbol;
       
 19041                 
       
 19042             }
       
 19043             
       
 19044             ERROR;
       
 19045         }
       
 19046         
       
 19047     }/*function_ulint_to_int*/
       
 19048     break;
       
 19049 
       
 19050 /****
       
 19051  *ULINT_TO_DINT
       
 19052  */
       
 19053     case function_ulint_to_dint :
       
 19054     {
       
 19055         symbol_c *last_type_symbol = NULL;
       
 19056 
       
 19057         {
       
 19058             symbol_c *IN_type_symbol = param_data_type;
       
 19059             last_type_symbol = param_data_type;
       
 19060             
       
 19061             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19062             {
       
 19063         
       
 19064                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19065                 return return_type_symbol;
       
 19066                 
       
 19067             }
       
 19068             
       
 19069             ERROR;
       
 19070         }
       
 19071         
       
 19072     }/*function_ulint_to_dint*/
       
 19073     break;
       
 19074 
       
 19075 /****
       
 19076  *ULINT_TO_LINT
       
 19077  */
       
 19078     case function_ulint_to_lint :
       
 19079     {
       
 19080         symbol_c *last_type_symbol = NULL;
       
 19081 
       
 19082         {
       
 19083             symbol_c *IN_type_symbol = param_data_type;
       
 19084             last_type_symbol = param_data_type;
       
 19085             
       
 19086             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19087             {
       
 19088         
       
 19089                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19090                 return return_type_symbol;
       
 19091                 
       
 19092             }
       
 19093             
       
 19094             ERROR;
       
 19095         }
       
 19096         
       
 19097     }/*function_ulint_to_lint*/
       
 19098     break;
       
 19099 
       
 19100 /****
       
 19101  *ULINT_TO_USINT
       
 19102  */
       
 19103     case function_ulint_to_usint :
       
 19104     {
       
 19105         symbol_c *last_type_symbol = NULL;
       
 19106 
       
 19107         {
       
 19108             symbol_c *IN_type_symbol = param_data_type;
       
 19109             last_type_symbol = param_data_type;
       
 19110             
       
 19111             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19112             {
       
 19113         
       
 19114                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19115                 return return_type_symbol;
       
 19116                 
       
 19117             }
       
 19118             
       
 19119             ERROR;
       
 19120         }
       
 19121         
       
 19122     }/*function_ulint_to_usint*/
       
 19123     break;
       
 19124 
       
 19125 /****
       
 19126  *ULINT_TO_UINT
       
 19127  */
       
 19128     case function_ulint_to_uint :
       
 19129     {
       
 19130         symbol_c *last_type_symbol = NULL;
       
 19131 
       
 19132         {
       
 19133             symbol_c *IN_type_symbol = param_data_type;
       
 19134             last_type_symbol = param_data_type;
       
 19135             
       
 19136             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19137             {
       
 19138         
       
 19139                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19140                 return return_type_symbol;
       
 19141                 
       
 19142             }
       
 19143             
       
 19144             ERROR;
       
 19145         }
       
 19146         
       
 19147     }/*function_ulint_to_uint*/
       
 19148     break;
       
 19149 
       
 19150 /****
       
 19151  *ULINT_TO_UDINT
       
 19152  */
       
 19153     case function_ulint_to_udint :
       
 19154     {
       
 19155         symbol_c *last_type_symbol = NULL;
       
 19156 
       
 19157         {
       
 19158             symbol_c *IN_type_symbol = param_data_type;
       
 19159             last_type_symbol = param_data_type;
       
 19160             
       
 19161             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 16834             {
 19162             {
 16835         
 19163         
 16836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19164                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16837                 return return_type_symbol;
 19165                 return return_type_symbol;
 16838                 
 19166                 
 16839             }
 19167             }
 16840             
 19168             
 16841             ERROR;
 19169             ERROR;
 16842         }
 19170         }
 16843         
 19171         
 16844     }/*function_lreal_to_udint*/
 19172     }/*function_ulint_to_udint*/
 16845     break;
 19173     break;
 16846 
 19174 
 16847 /****
 19175 /****
 16848  *LREAL_TO_ULINT
 19176  *ULINT_TO_TIME
 16849  */
 19177  */
 16850     case function_lreal_to_ulint :
 19178     case function_ulint_to_time :
 16851     {
 19179     {
 16852         symbol_c *last_type_symbol = NULL;
 19180         symbol_c *last_type_symbol = NULL;
 16853 
 19181 
 16854         {
 19182         {
 16855             symbol_c *IN_type_symbol = param_data_type;
 19183             symbol_c *IN_type_symbol = param_data_type;
 16856             last_type_symbol = param_data_type;
 19184             last_type_symbol = param_data_type;
 16857             
 19185             
 16858             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19186             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19187             {
       
 19188         
       
 19189                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19190                 return return_type_symbol;
       
 19191                 
       
 19192             }
       
 19193             
       
 19194             ERROR;
       
 19195         }
       
 19196         
       
 19197     }/*function_ulint_to_time*/
       
 19198     break;
       
 19199 
       
 19200 /****
       
 19201  *ULINT_TO_BOOL
       
 19202  */
       
 19203     case function_ulint_to_bool :
       
 19204     {
       
 19205         symbol_c *last_type_symbol = NULL;
       
 19206 
       
 19207         {
       
 19208             symbol_c *IN_type_symbol = param_data_type;
       
 19209             last_type_symbol = param_data_type;
       
 19210             
       
 19211             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19212             {
       
 19213         
       
 19214                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19215                 return return_type_symbol;
       
 19216                 
       
 19217             }
       
 19218             
       
 19219             ERROR;
       
 19220         }
       
 19221         
       
 19222     }/*function_ulint_to_bool*/
       
 19223     break;
       
 19224 
       
 19225 /****
       
 19226  *ULINT_TO_BYTE
       
 19227  */
       
 19228     case function_ulint_to_byte :
       
 19229     {
       
 19230         symbol_c *last_type_symbol = NULL;
       
 19231 
       
 19232         {
       
 19233             symbol_c *IN_type_symbol = param_data_type;
       
 19234             last_type_symbol = param_data_type;
       
 19235             
       
 19236             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19237             {
       
 19238         
       
 19239                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19240                 return return_type_symbol;
       
 19241                 
       
 19242             }
       
 19243             
       
 19244             ERROR;
       
 19245         }
       
 19246         
       
 19247     }/*function_ulint_to_byte*/
       
 19248     break;
       
 19249 
       
 19250 /****
       
 19251  *ULINT_TO_WORD
       
 19252  */
       
 19253     case function_ulint_to_word :
       
 19254     {
       
 19255         symbol_c *last_type_symbol = NULL;
       
 19256 
       
 19257         {
       
 19258             symbol_c *IN_type_symbol = param_data_type;
       
 19259             last_type_symbol = param_data_type;
       
 19260             
       
 19261             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19262             {
       
 19263         
       
 19264                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19265                 return return_type_symbol;
       
 19266                 
       
 19267             }
       
 19268             
       
 19269             ERROR;
       
 19270         }
       
 19271         
       
 19272     }/*function_ulint_to_word*/
       
 19273     break;
       
 19274 
       
 19275 /****
       
 19276  *ULINT_TO_DWORD
       
 19277  */
       
 19278     case function_ulint_to_dword :
       
 19279     {
       
 19280         symbol_c *last_type_symbol = NULL;
       
 19281 
       
 19282         {
       
 19283             symbol_c *IN_type_symbol = param_data_type;
       
 19284             last_type_symbol = param_data_type;
       
 19285             
       
 19286             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19287             {
       
 19288         
       
 19289                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19290                 return return_type_symbol;
       
 19291                 
       
 19292             }
       
 19293             
       
 19294             ERROR;
       
 19295         }
       
 19296         
       
 19297     }/*function_ulint_to_dword*/
       
 19298     break;
       
 19299 
       
 19300 /****
       
 19301  *ULINT_TO_LWORD
       
 19302  */
       
 19303     case function_ulint_to_lword :
       
 19304     {
       
 19305         symbol_c *last_type_symbol = NULL;
       
 19306 
       
 19307         {
       
 19308             symbol_c *IN_type_symbol = param_data_type;
       
 19309             last_type_symbol = param_data_type;
       
 19310             
       
 19311             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19312             {
       
 19313         
       
 19314                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19315                 return return_type_symbol;
       
 19316                 
       
 19317             }
       
 19318             
       
 19319             ERROR;
       
 19320         }
       
 19321         
       
 19322     }/*function_ulint_to_lword*/
       
 19323     break;
       
 19324 
       
 19325 /****
       
 19326  *ULINT_TO_STRING
       
 19327  */
       
 19328     case function_ulint_to_string :
       
 19329     {
       
 19330         symbol_c *last_type_symbol = NULL;
       
 19331 
       
 19332         {
       
 19333             symbol_c *IN_type_symbol = param_data_type;
       
 19334             last_type_symbol = param_data_type;
       
 19335             
       
 19336             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19337             {
       
 19338         
       
 19339                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19340                 return return_type_symbol;
       
 19341                 
       
 19342             }
       
 19343             
       
 19344             ERROR;
       
 19345         }
       
 19346         
       
 19347     }/*function_ulint_to_string*/
       
 19348     break;
       
 19349 
       
 19350 /****
       
 19351  *ULINT_TO_DATE
       
 19352  */
       
 19353     case function_ulint_to_date :
       
 19354     {
       
 19355         symbol_c *last_type_symbol = NULL;
       
 19356 
       
 19357         {
       
 19358             symbol_c *IN_type_symbol = param_data_type;
       
 19359             last_type_symbol = param_data_type;
       
 19360             
       
 19361             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19362             {
       
 19363         
       
 19364                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19365                 return return_type_symbol;
       
 19366                 
       
 19367             }
       
 19368             
       
 19369             ERROR;
       
 19370         }
       
 19371         
       
 19372     }/*function_ulint_to_date*/
       
 19373     break;
       
 19374 
       
 19375 /****
       
 19376  *ULINT_TO_TOD
       
 19377  */
       
 19378     case function_ulint_to_tod :
       
 19379     {
       
 19380         symbol_c *last_type_symbol = NULL;
       
 19381 
       
 19382         {
       
 19383             symbol_c *IN_type_symbol = param_data_type;
       
 19384             last_type_symbol = param_data_type;
       
 19385             
       
 19386             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19387             {
       
 19388         
       
 19389                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19390                 return return_type_symbol;
       
 19391                 
       
 19392             }
       
 19393             
       
 19394             ERROR;
       
 19395         }
       
 19396         
       
 19397     }/*function_ulint_to_tod*/
       
 19398     break;
       
 19399 
       
 19400 /****
       
 19401  *ULINT_TO_DT
       
 19402  */
       
 19403     case function_ulint_to_dt :
       
 19404     {
       
 19405         symbol_c *last_type_symbol = NULL;
       
 19406 
       
 19407         {
       
 19408             symbol_c *IN_type_symbol = param_data_type;
       
 19409             last_type_symbol = param_data_type;
       
 19410             
       
 19411             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 19412             {
       
 19413         
       
 19414                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19415                 return return_type_symbol;
       
 19416                 
       
 19417             }
       
 19418             
       
 19419             ERROR;
       
 19420         }
       
 19421         
       
 19422     }/*function_ulint_to_dt*/
       
 19423     break;
       
 19424 
       
 19425 /****
       
 19426  *TIME_TO_REAL
       
 19427  */
       
 19428     case function_time_to_real :
       
 19429     {
       
 19430         symbol_c *last_type_symbol = NULL;
       
 19431 
       
 19432         {
       
 19433             symbol_c *IN_type_symbol = param_data_type;
       
 19434             last_type_symbol = param_data_type;
       
 19435             
       
 19436             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19437             {
       
 19438         
       
 19439                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19440                 return return_type_symbol;
       
 19441                 
       
 19442             }
       
 19443             
       
 19444             ERROR;
       
 19445         }
       
 19446         
       
 19447     }/*function_time_to_real*/
       
 19448     break;
       
 19449 
       
 19450 /****
       
 19451  *TIME_TO_LREAL
       
 19452  */
       
 19453     case function_time_to_lreal :
       
 19454     {
       
 19455         symbol_c *last_type_symbol = NULL;
       
 19456 
       
 19457         {
       
 19458             symbol_c *IN_type_symbol = param_data_type;
       
 19459             last_type_symbol = param_data_type;
       
 19460             
       
 19461             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19462             {
       
 19463         
       
 19464                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19465                 return return_type_symbol;
       
 19466                 
       
 19467             }
       
 19468             
       
 19469             ERROR;
       
 19470         }
       
 19471         
       
 19472     }/*function_time_to_lreal*/
       
 19473     break;
       
 19474 
       
 19475 /****
       
 19476  *TIME_TO_SINT
       
 19477  */
       
 19478     case function_time_to_sint :
       
 19479     {
       
 19480         symbol_c *last_type_symbol = NULL;
       
 19481 
       
 19482         {
       
 19483             symbol_c *IN_type_symbol = param_data_type;
       
 19484             last_type_symbol = param_data_type;
       
 19485             
       
 19486             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19487             {
       
 19488         
       
 19489                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19490                 return return_type_symbol;
       
 19491                 
       
 19492             }
       
 19493             
       
 19494             ERROR;
       
 19495         }
       
 19496         
       
 19497     }/*function_time_to_sint*/
       
 19498     break;
       
 19499 
       
 19500 /****
       
 19501  *TIME_TO_INT
       
 19502  */
       
 19503     case function_time_to_int :
       
 19504     {
       
 19505         symbol_c *last_type_symbol = NULL;
       
 19506 
       
 19507         {
       
 19508             symbol_c *IN_type_symbol = param_data_type;
       
 19509             last_type_symbol = param_data_type;
       
 19510             
       
 19511             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19512             {
       
 19513         
       
 19514                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19515                 return return_type_symbol;
       
 19516                 
       
 19517             }
       
 19518             
       
 19519             ERROR;
       
 19520         }
       
 19521         
       
 19522     }/*function_time_to_int*/
       
 19523     break;
       
 19524 
       
 19525 /****
       
 19526  *TIME_TO_DINT
       
 19527  */
       
 19528     case function_time_to_dint :
       
 19529     {
       
 19530         symbol_c *last_type_symbol = NULL;
       
 19531 
       
 19532         {
       
 19533             symbol_c *IN_type_symbol = param_data_type;
       
 19534             last_type_symbol = param_data_type;
       
 19535             
       
 19536             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19537             {
       
 19538         
       
 19539                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19540                 return return_type_symbol;
       
 19541                 
       
 19542             }
       
 19543             
       
 19544             ERROR;
       
 19545         }
       
 19546         
       
 19547     }/*function_time_to_dint*/
       
 19548     break;
       
 19549 
       
 19550 /****
       
 19551  *TIME_TO_LINT
       
 19552  */
       
 19553     case function_time_to_lint :
       
 19554     {
       
 19555         symbol_c *last_type_symbol = NULL;
       
 19556 
       
 19557         {
       
 19558             symbol_c *IN_type_symbol = param_data_type;
       
 19559             last_type_symbol = param_data_type;
       
 19560             
       
 19561             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19562             {
       
 19563         
       
 19564                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19565                 return return_type_symbol;
       
 19566                 
       
 19567             }
       
 19568             
       
 19569             ERROR;
       
 19570         }
       
 19571         
       
 19572     }/*function_time_to_lint*/
       
 19573     break;
       
 19574 
       
 19575 /****
       
 19576  *TIME_TO_USINT
       
 19577  */
       
 19578     case function_time_to_usint :
       
 19579     {
       
 19580         symbol_c *last_type_symbol = NULL;
       
 19581 
       
 19582         {
       
 19583             symbol_c *IN_type_symbol = param_data_type;
       
 19584             last_type_symbol = param_data_type;
       
 19585             
       
 19586             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19587             {
       
 19588         
       
 19589                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19590                 return return_type_symbol;
       
 19591                 
       
 19592             }
       
 19593             
       
 19594             ERROR;
       
 19595         }
       
 19596         
       
 19597     }/*function_time_to_usint*/
       
 19598     break;
       
 19599 
       
 19600 /****
       
 19601  *TIME_TO_UINT
       
 19602  */
       
 19603     case function_time_to_uint :
       
 19604     {
       
 19605         symbol_c *last_type_symbol = NULL;
       
 19606 
       
 19607         {
       
 19608             symbol_c *IN_type_symbol = param_data_type;
       
 19609             last_type_symbol = param_data_type;
       
 19610             
       
 19611             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19612             {
       
 19613         
       
 19614                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19615                 return return_type_symbol;
       
 19616                 
       
 19617             }
       
 19618             
       
 19619             ERROR;
       
 19620         }
       
 19621         
       
 19622     }/*function_time_to_uint*/
       
 19623     break;
       
 19624 
       
 19625 /****
       
 19626  *TIME_TO_UDINT
       
 19627  */
       
 19628     case function_time_to_udint :
       
 19629     {
       
 19630         symbol_c *last_type_symbol = NULL;
       
 19631 
       
 19632         {
       
 19633             symbol_c *IN_type_symbol = param_data_type;
       
 19634             last_type_symbol = param_data_type;
       
 19635             
       
 19636             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19637             {
       
 19638         
       
 19639                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19640                 return return_type_symbol;
       
 19641                 
       
 19642             }
       
 19643             
       
 19644             ERROR;
       
 19645         }
       
 19646         
       
 19647     }/*function_time_to_udint*/
       
 19648     break;
       
 19649 
       
 19650 /****
       
 19651  *TIME_TO_ULINT
       
 19652  */
       
 19653     case function_time_to_ulint :
       
 19654     {
       
 19655         symbol_c *last_type_symbol = NULL;
       
 19656 
       
 19657         {
       
 19658             symbol_c *IN_type_symbol = param_data_type;
       
 19659             last_type_symbol = param_data_type;
       
 19660             
       
 19661             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 16859             {
 19662             {
 16860         
 19663         
 16861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19664                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16862                 return return_type_symbol;
 19665                 return return_type_symbol;
 16863                 
 19666                 
 16864             }
 19667             }
 16865             
 19668             
 16866             ERROR;
 19669             ERROR;
 16867         }
 19670         }
 16868         
 19671         
 16869     }/*function_lreal_to_ulint*/
 19672     }/*function_time_to_ulint*/
 16870     break;
 19673     break;
 16871 
 19674 
 16872 /****
 19675 /****
 16873  *LREAL_TO_TIME
 19676  *TIME_TO_BOOL
 16874  */
 19677  */
 16875     case function_lreal_to_time :
 19678     case function_time_to_bool :
 16876     {
 19679     {
 16877         symbol_c *last_type_symbol = NULL;
 19680         symbol_c *last_type_symbol = NULL;
 16878 
 19681 
 16879         {
 19682         {
 16880             symbol_c *IN_type_symbol = param_data_type;
 19683             symbol_c *IN_type_symbol = param_data_type;
 16881             last_type_symbol = param_data_type;
 19684             last_type_symbol = param_data_type;
 16882             
 19685             
 16883             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19686             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19687             {
       
 19688         
       
 19689                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19690                 return return_type_symbol;
       
 19691                 
       
 19692             }
       
 19693             
       
 19694             ERROR;
       
 19695         }
       
 19696         
       
 19697     }/*function_time_to_bool*/
       
 19698     break;
       
 19699 
       
 19700 /****
       
 19701  *TIME_TO_BYTE
       
 19702  */
       
 19703     case function_time_to_byte :
       
 19704     {
       
 19705         symbol_c *last_type_symbol = NULL;
       
 19706 
       
 19707         {
       
 19708             symbol_c *IN_type_symbol = param_data_type;
       
 19709             last_type_symbol = param_data_type;
       
 19710             
       
 19711             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19712             {
       
 19713         
       
 19714                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19715                 return return_type_symbol;
       
 19716                 
       
 19717             }
       
 19718             
       
 19719             ERROR;
       
 19720         }
       
 19721         
       
 19722     }/*function_time_to_byte*/
       
 19723     break;
       
 19724 
       
 19725 /****
       
 19726  *TIME_TO_WORD
       
 19727  */
       
 19728     case function_time_to_word :
       
 19729     {
       
 19730         symbol_c *last_type_symbol = NULL;
       
 19731 
       
 19732         {
       
 19733             symbol_c *IN_type_symbol = param_data_type;
       
 19734             last_type_symbol = param_data_type;
       
 19735             
       
 19736             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19737             {
       
 19738         
       
 19739                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19740                 return return_type_symbol;
       
 19741                 
       
 19742             }
       
 19743             
       
 19744             ERROR;
       
 19745         }
       
 19746         
       
 19747     }/*function_time_to_word*/
       
 19748     break;
       
 19749 
       
 19750 /****
       
 19751  *TIME_TO_DWORD
       
 19752  */
       
 19753     case function_time_to_dword :
       
 19754     {
       
 19755         symbol_c *last_type_symbol = NULL;
       
 19756 
       
 19757         {
       
 19758             symbol_c *IN_type_symbol = param_data_type;
       
 19759             last_type_symbol = param_data_type;
       
 19760             
       
 19761             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19762             {
       
 19763         
       
 19764                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19765                 return return_type_symbol;
       
 19766                 
       
 19767             }
       
 19768             
       
 19769             ERROR;
       
 19770         }
       
 19771         
       
 19772     }/*function_time_to_dword*/
       
 19773     break;
       
 19774 
       
 19775 /****
       
 19776  *TIME_TO_LWORD
       
 19777  */
       
 19778     case function_time_to_lword :
       
 19779     {
       
 19780         symbol_c *last_type_symbol = NULL;
       
 19781 
       
 19782         {
       
 19783             symbol_c *IN_type_symbol = param_data_type;
       
 19784             last_type_symbol = param_data_type;
       
 19785             
       
 19786             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19787             {
       
 19788         
       
 19789                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19790                 return return_type_symbol;
       
 19791                 
       
 19792             }
       
 19793             
       
 19794             ERROR;
       
 19795         }
       
 19796         
       
 19797     }/*function_time_to_lword*/
       
 19798     break;
       
 19799 
       
 19800 /****
       
 19801  *TIME_TO_STRING
       
 19802  */
       
 19803     case function_time_to_string :
       
 19804     {
       
 19805         symbol_c *last_type_symbol = NULL;
       
 19806 
       
 19807         {
       
 19808             symbol_c *IN_type_symbol = param_data_type;
       
 19809             last_type_symbol = param_data_type;
       
 19810             
       
 19811             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 19812             {
       
 19813         
       
 19814                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19815                 return return_type_symbol;
       
 19816                 
       
 19817             }
       
 19818             
       
 19819             ERROR;
       
 19820         }
       
 19821         
       
 19822     }/*function_time_to_string*/
       
 19823     break;
       
 19824 
       
 19825 /****
       
 19826  *BOOL_TO_REAL
       
 19827  */
       
 19828     case function_bool_to_real :
       
 19829     {
       
 19830         symbol_c *last_type_symbol = NULL;
       
 19831 
       
 19832         {
       
 19833             symbol_c *IN_type_symbol = param_data_type;
       
 19834             last_type_symbol = param_data_type;
       
 19835             
       
 19836             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19837             {
       
 19838         
       
 19839                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19840                 return return_type_symbol;
       
 19841                 
       
 19842             }
       
 19843             
       
 19844             ERROR;
       
 19845         }
       
 19846         
       
 19847     }/*function_bool_to_real*/
       
 19848     break;
       
 19849 
       
 19850 /****
       
 19851  *BOOL_TO_LREAL
       
 19852  */
       
 19853     case function_bool_to_lreal :
       
 19854     {
       
 19855         symbol_c *last_type_symbol = NULL;
       
 19856 
       
 19857         {
       
 19858             symbol_c *IN_type_symbol = param_data_type;
       
 19859             last_type_symbol = param_data_type;
       
 19860             
       
 19861             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19862             {
       
 19863         
       
 19864                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19865                 return return_type_symbol;
       
 19866                 
       
 19867             }
       
 19868             
       
 19869             ERROR;
       
 19870         }
       
 19871         
       
 19872     }/*function_bool_to_lreal*/
       
 19873     break;
       
 19874 
       
 19875 /****
       
 19876  *BOOL_TO_SINT
       
 19877  */
       
 19878     case function_bool_to_sint :
       
 19879     {
       
 19880         symbol_c *last_type_symbol = NULL;
       
 19881 
       
 19882         {
       
 19883             symbol_c *IN_type_symbol = param_data_type;
       
 19884             last_type_symbol = param_data_type;
       
 19885             
       
 19886             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19887             {
       
 19888         
       
 19889                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19890                 return return_type_symbol;
       
 19891                 
       
 19892             }
       
 19893             
       
 19894             ERROR;
       
 19895         }
       
 19896         
       
 19897     }/*function_bool_to_sint*/
       
 19898     break;
       
 19899 
       
 19900 /****
       
 19901  *BOOL_TO_INT
       
 19902  */
       
 19903     case function_bool_to_int :
       
 19904     {
       
 19905         symbol_c *last_type_symbol = NULL;
       
 19906 
       
 19907         {
       
 19908             symbol_c *IN_type_symbol = param_data_type;
       
 19909             last_type_symbol = param_data_type;
       
 19910             
       
 19911             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19912             {
       
 19913         
       
 19914                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19915                 return return_type_symbol;
       
 19916                 
       
 19917             }
       
 19918             
       
 19919             ERROR;
       
 19920         }
       
 19921         
       
 19922     }/*function_bool_to_int*/
       
 19923     break;
       
 19924 
       
 19925 /****
       
 19926  *BOOL_TO_DINT
       
 19927  */
       
 19928     case function_bool_to_dint :
       
 19929     {
       
 19930         symbol_c *last_type_symbol = NULL;
       
 19931 
       
 19932         {
       
 19933             symbol_c *IN_type_symbol = param_data_type;
       
 19934             last_type_symbol = param_data_type;
       
 19935             
       
 19936             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19937             {
       
 19938         
       
 19939                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19940                 return return_type_symbol;
       
 19941                 
       
 19942             }
       
 19943             
       
 19944             ERROR;
       
 19945         }
       
 19946         
       
 19947     }/*function_bool_to_dint*/
       
 19948     break;
       
 19949 
       
 19950 /****
       
 19951  *BOOL_TO_LINT
       
 19952  */
       
 19953     case function_bool_to_lint :
       
 19954     {
       
 19955         symbol_c *last_type_symbol = NULL;
       
 19956 
       
 19957         {
       
 19958             symbol_c *IN_type_symbol = param_data_type;
       
 19959             last_type_symbol = param_data_type;
       
 19960             
       
 19961             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19962             {
       
 19963         
       
 19964                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19965                 return return_type_symbol;
       
 19966                 
       
 19967             }
       
 19968             
       
 19969             ERROR;
       
 19970         }
       
 19971         
       
 19972     }/*function_bool_to_lint*/
       
 19973     break;
       
 19974 
       
 19975 /****
       
 19976  *BOOL_TO_USINT
       
 19977  */
       
 19978     case function_bool_to_usint :
       
 19979     {
       
 19980         symbol_c *last_type_symbol = NULL;
       
 19981 
       
 19982         {
       
 19983             symbol_c *IN_type_symbol = param_data_type;
       
 19984             last_type_symbol = param_data_type;
       
 19985             
       
 19986             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 19987             {
       
 19988         
       
 19989                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19990                 return return_type_symbol;
       
 19991                 
       
 19992             }
       
 19993             
       
 19994             ERROR;
       
 19995         }
       
 19996         
       
 19997     }/*function_bool_to_usint*/
       
 19998     break;
       
 19999 
       
 20000 /****
       
 20001  *BOOL_TO_UINT
       
 20002  */
       
 20003     case function_bool_to_uint :
       
 20004     {
       
 20005         symbol_c *last_type_symbol = NULL;
       
 20006 
       
 20007         {
       
 20008             symbol_c *IN_type_symbol = param_data_type;
       
 20009             last_type_symbol = param_data_type;
       
 20010             
       
 20011             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20012             {
       
 20013         
       
 20014                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20015                 return return_type_symbol;
       
 20016                 
       
 20017             }
       
 20018             
       
 20019             ERROR;
       
 20020         }
       
 20021         
       
 20022     }/*function_bool_to_uint*/
       
 20023     break;
       
 20024 
       
 20025 /****
       
 20026  *BOOL_TO_UDINT
       
 20027  */
       
 20028     case function_bool_to_udint :
       
 20029     {
       
 20030         symbol_c *last_type_symbol = NULL;
       
 20031 
       
 20032         {
       
 20033             symbol_c *IN_type_symbol = param_data_type;
       
 20034             last_type_symbol = param_data_type;
       
 20035             
       
 20036             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20037             {
       
 20038         
       
 20039                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20040                 return return_type_symbol;
       
 20041                 
       
 20042             }
       
 20043             
       
 20044             ERROR;
       
 20045         }
       
 20046         
       
 20047     }/*function_bool_to_udint*/
       
 20048     break;
       
 20049 
       
 20050 /****
       
 20051  *BOOL_TO_ULINT
       
 20052  */
       
 20053     case function_bool_to_ulint :
       
 20054     {
       
 20055         symbol_c *last_type_symbol = NULL;
       
 20056 
       
 20057         {
       
 20058             symbol_c *IN_type_symbol = param_data_type;
       
 20059             last_type_symbol = param_data_type;
       
 20060             
       
 20061             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20062             {
       
 20063         
       
 20064                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20065                 return return_type_symbol;
       
 20066                 
       
 20067             }
       
 20068             
       
 20069             ERROR;
       
 20070         }
       
 20071         
       
 20072     }/*function_bool_to_ulint*/
       
 20073     break;
       
 20074 
       
 20075 /****
       
 20076  *BOOL_TO_TIME
       
 20077  */
       
 20078     case function_bool_to_time :
       
 20079     {
       
 20080         symbol_c *last_type_symbol = NULL;
       
 20081 
       
 20082         {
       
 20083             symbol_c *IN_type_symbol = param_data_type;
       
 20084             last_type_symbol = param_data_type;
       
 20085             
       
 20086             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 16884             {
 20087             {
 16885         
 20088         
 16886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 20089                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16887                 return return_type_symbol;
 20090                 return return_type_symbol;
 16888                 
 20091                 
 16889             }
 20092             }
 16890             
 20093             
 16891             ERROR;
 20094             ERROR;
 16892         }
 20095         }
 16893         
 20096         
 16894     }/*function_lreal_to_time*/
 20097     }/*function_bool_to_time*/
 16895     break;
 20098     break;
 16896 
 20099 
 16897 /****
 20100 /****
 16898  *LREAL_TO_BOOL
 20101  *BOOL_TO_BYTE
 16899  */
 20102  */
 16900     case function_lreal_to_bool :
 20103     case function_bool_to_byte :
 16901     {
 20104     {
 16902         symbol_c *last_type_symbol = NULL;
 20105         symbol_c *last_type_symbol = NULL;
 16903 
 20106 
 16904         {
 20107         {
 16905             symbol_c *IN_type_symbol = param_data_type;
 20108             symbol_c *IN_type_symbol = param_data_type;
 16906             last_type_symbol = param_data_type;
 20109             last_type_symbol = param_data_type;
 16907             
 20110             
 16908             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 20111             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20112             {
       
 20113         
       
 20114                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20115                 return return_type_symbol;
       
 20116                 
       
 20117             }
       
 20118             
       
 20119             ERROR;
       
 20120         }
       
 20121         
       
 20122     }/*function_bool_to_byte*/
       
 20123     break;
       
 20124 
       
 20125 /****
       
 20126  *BOOL_TO_WORD
       
 20127  */
       
 20128     case function_bool_to_word :
       
 20129     {
       
 20130         symbol_c *last_type_symbol = NULL;
       
 20131 
       
 20132         {
       
 20133             symbol_c *IN_type_symbol = param_data_type;
       
 20134             last_type_symbol = param_data_type;
       
 20135             
       
 20136             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20137             {
       
 20138         
       
 20139                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20140                 return return_type_symbol;
       
 20141                 
       
 20142             }
       
 20143             
       
 20144             ERROR;
       
 20145         }
       
 20146         
       
 20147     }/*function_bool_to_word*/
       
 20148     break;
       
 20149 
       
 20150 /****
       
 20151  *BOOL_TO_DWORD
       
 20152  */
       
 20153     case function_bool_to_dword :
       
 20154     {
       
 20155         symbol_c *last_type_symbol = NULL;
       
 20156 
       
 20157         {
       
 20158             symbol_c *IN_type_symbol = param_data_type;
       
 20159             last_type_symbol = param_data_type;
       
 20160             
       
 20161             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20162             {
       
 20163         
       
 20164                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20165                 return return_type_symbol;
       
 20166                 
       
 20167             }
       
 20168             
       
 20169             ERROR;
       
 20170         }
       
 20171         
       
 20172     }/*function_bool_to_dword*/
       
 20173     break;
       
 20174 
       
 20175 /****
       
 20176  *BOOL_TO_LWORD
       
 20177  */
       
 20178     case function_bool_to_lword :
       
 20179     {
       
 20180         symbol_c *last_type_symbol = NULL;
       
 20181 
       
 20182         {
       
 20183             symbol_c *IN_type_symbol = param_data_type;
       
 20184             last_type_symbol = param_data_type;
       
 20185             
       
 20186             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20187             {
       
 20188         
       
 20189                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20190                 return return_type_symbol;
       
 20191                 
       
 20192             }
       
 20193             
       
 20194             ERROR;
       
 20195         }
       
 20196         
       
 20197     }/*function_bool_to_lword*/
       
 20198     break;
       
 20199 
       
 20200 /****
       
 20201  *BOOL_TO_STRING
       
 20202  */
       
 20203     case function_bool_to_string :
       
 20204     {
       
 20205         symbol_c *last_type_symbol = NULL;
       
 20206 
       
 20207         {
       
 20208             symbol_c *IN_type_symbol = param_data_type;
       
 20209             last_type_symbol = param_data_type;
       
 20210             
       
 20211             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20212             {
       
 20213         
       
 20214                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20215                 return return_type_symbol;
       
 20216                 
       
 20217             }
       
 20218             
       
 20219             ERROR;
       
 20220         }
       
 20221         
       
 20222     }/*function_bool_to_string*/
       
 20223     break;
       
 20224 
       
 20225 /****
       
 20226  *BOOL_TO_DATE
       
 20227  */
       
 20228     case function_bool_to_date :
       
 20229     {
       
 20230         symbol_c *last_type_symbol = NULL;
       
 20231 
       
 20232         {
       
 20233             symbol_c *IN_type_symbol = param_data_type;
       
 20234             last_type_symbol = param_data_type;
       
 20235             
       
 20236             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20237             {
       
 20238         
       
 20239                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20240                 return return_type_symbol;
       
 20241                 
       
 20242             }
       
 20243             
       
 20244             ERROR;
       
 20245         }
       
 20246         
       
 20247     }/*function_bool_to_date*/
       
 20248     break;
       
 20249 
       
 20250 /****
       
 20251  *BOOL_TO_TOD
       
 20252  */
       
 20253     case function_bool_to_tod :
       
 20254     {
       
 20255         symbol_c *last_type_symbol = NULL;
       
 20256 
       
 20257         {
       
 20258             symbol_c *IN_type_symbol = param_data_type;
       
 20259             last_type_symbol = param_data_type;
       
 20260             
       
 20261             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20262             {
       
 20263         
       
 20264                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20265                 return return_type_symbol;
       
 20266                 
       
 20267             }
       
 20268             
       
 20269             ERROR;
       
 20270         }
       
 20271         
       
 20272     }/*function_bool_to_tod*/
       
 20273     break;
       
 20274 
       
 20275 /****
       
 20276  *BOOL_TO_DT
       
 20277  */
       
 20278     case function_bool_to_dt :
       
 20279     {
       
 20280         symbol_c *last_type_symbol = NULL;
       
 20281 
       
 20282         {
       
 20283             symbol_c *IN_type_symbol = param_data_type;
       
 20284             last_type_symbol = param_data_type;
       
 20285             
       
 20286             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 20287             {
       
 20288         
       
 20289                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20290                 return return_type_symbol;
       
 20291                 
       
 20292             }
       
 20293             
       
 20294             ERROR;
       
 20295         }
       
 20296         
       
 20297     }/*function_bool_to_dt*/
       
 20298     break;
       
 20299 
       
 20300 /****
       
 20301  *BYTE_TO_REAL
       
 20302  */
       
 20303     case function_byte_to_real :
       
 20304     {
       
 20305         symbol_c *last_type_symbol = NULL;
       
 20306 
       
 20307         {
       
 20308             symbol_c *IN_type_symbol = param_data_type;
       
 20309             last_type_symbol = param_data_type;
       
 20310             
       
 20311             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20312             {
       
 20313         
       
 20314                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20315                 return return_type_symbol;
       
 20316                 
       
 20317             }
       
 20318             
       
 20319             ERROR;
       
 20320         }
       
 20321         
       
 20322     }/*function_byte_to_real*/
       
 20323     break;
       
 20324 
       
 20325 /****
       
 20326  *BYTE_TO_LREAL
       
 20327  */
       
 20328     case function_byte_to_lreal :
       
 20329     {
       
 20330         symbol_c *last_type_symbol = NULL;
       
 20331 
       
 20332         {
       
 20333             symbol_c *IN_type_symbol = param_data_type;
       
 20334             last_type_symbol = param_data_type;
       
 20335             
       
 20336             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20337             {
       
 20338         
       
 20339                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20340                 return return_type_symbol;
       
 20341                 
       
 20342             }
       
 20343             
       
 20344             ERROR;
       
 20345         }
       
 20346         
       
 20347     }/*function_byte_to_lreal*/
       
 20348     break;
       
 20349 
       
 20350 /****
       
 20351  *BYTE_TO_SINT
       
 20352  */
       
 20353     case function_byte_to_sint :
       
 20354     {
       
 20355         symbol_c *last_type_symbol = NULL;
       
 20356 
       
 20357         {
       
 20358             symbol_c *IN_type_symbol = param_data_type;
       
 20359             last_type_symbol = param_data_type;
       
 20360             
       
 20361             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20362             {
       
 20363         
       
 20364                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20365                 return return_type_symbol;
       
 20366                 
       
 20367             }
       
 20368             
       
 20369             ERROR;
       
 20370         }
       
 20371         
       
 20372     }/*function_byte_to_sint*/
       
 20373     break;
       
 20374 
       
 20375 /****
       
 20376  *BYTE_TO_INT
       
 20377  */
       
 20378     case function_byte_to_int :
       
 20379     {
       
 20380         symbol_c *last_type_symbol = NULL;
       
 20381 
       
 20382         {
       
 20383             symbol_c *IN_type_symbol = param_data_type;
       
 20384             last_type_symbol = param_data_type;
       
 20385             
       
 20386             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20387             {
       
 20388         
       
 20389                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20390                 return return_type_symbol;
       
 20391                 
       
 20392             }
       
 20393             
       
 20394             ERROR;
       
 20395         }
       
 20396         
       
 20397     }/*function_byte_to_int*/
       
 20398     break;
       
 20399 
       
 20400 /****
       
 20401  *BYTE_TO_DINT
       
 20402  */
       
 20403     case function_byte_to_dint :
       
 20404     {
       
 20405         symbol_c *last_type_symbol = NULL;
       
 20406 
       
 20407         {
       
 20408             symbol_c *IN_type_symbol = param_data_type;
       
 20409             last_type_symbol = param_data_type;
       
 20410             
       
 20411             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20412             {
       
 20413         
       
 20414                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20415                 return return_type_symbol;
       
 20416                 
       
 20417             }
       
 20418             
       
 20419             ERROR;
       
 20420         }
       
 20421         
       
 20422     }/*function_byte_to_dint*/
       
 20423     break;
       
 20424 
       
 20425 /****
       
 20426  *BYTE_TO_LINT
       
 20427  */
       
 20428     case function_byte_to_lint :
       
 20429     {
       
 20430         symbol_c *last_type_symbol = NULL;
       
 20431 
       
 20432         {
       
 20433             symbol_c *IN_type_symbol = param_data_type;
       
 20434             last_type_symbol = param_data_type;
       
 20435             
       
 20436             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20437             {
       
 20438         
       
 20439                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20440                 return return_type_symbol;
       
 20441                 
       
 20442             }
       
 20443             
       
 20444             ERROR;
       
 20445         }
       
 20446         
       
 20447     }/*function_byte_to_lint*/
       
 20448     break;
       
 20449 
       
 20450 /****
       
 20451  *BYTE_TO_USINT
       
 20452  */
       
 20453     case function_byte_to_usint :
       
 20454     {
       
 20455         symbol_c *last_type_symbol = NULL;
       
 20456 
       
 20457         {
       
 20458             symbol_c *IN_type_symbol = param_data_type;
       
 20459             last_type_symbol = param_data_type;
       
 20460             
       
 20461             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20462             {
       
 20463         
       
 20464                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20465                 return return_type_symbol;
       
 20466                 
       
 20467             }
       
 20468             
       
 20469             ERROR;
       
 20470         }
       
 20471         
       
 20472     }/*function_byte_to_usint*/
       
 20473     break;
       
 20474 
       
 20475 /****
       
 20476  *BYTE_TO_UINT
       
 20477  */
       
 20478     case function_byte_to_uint :
       
 20479     {
       
 20480         symbol_c *last_type_symbol = NULL;
       
 20481 
       
 20482         {
       
 20483             symbol_c *IN_type_symbol = param_data_type;
       
 20484             last_type_symbol = param_data_type;
       
 20485             
       
 20486             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20487             {
       
 20488         
       
 20489                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20490                 return return_type_symbol;
       
 20491                 
       
 20492             }
       
 20493             
       
 20494             ERROR;
       
 20495         }
       
 20496         
       
 20497     }/*function_byte_to_uint*/
       
 20498     break;
       
 20499 
       
 20500 /****
       
 20501  *BYTE_TO_UDINT
       
 20502  */
       
 20503     case function_byte_to_udint :
       
 20504     {
       
 20505         symbol_c *last_type_symbol = NULL;
       
 20506 
       
 20507         {
       
 20508             symbol_c *IN_type_symbol = param_data_type;
       
 20509             last_type_symbol = param_data_type;
       
 20510             
       
 20511             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20512             {
       
 20513         
       
 20514                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20515                 return return_type_symbol;
       
 20516                 
       
 20517             }
       
 20518             
       
 20519             ERROR;
       
 20520         }
       
 20521         
       
 20522     }/*function_byte_to_udint*/
       
 20523     break;
       
 20524 
       
 20525 /****
       
 20526  *BYTE_TO_ULINT
       
 20527  */
       
 20528     case function_byte_to_ulint :
       
 20529     {
       
 20530         symbol_c *last_type_symbol = NULL;
       
 20531 
       
 20532         {
       
 20533             symbol_c *IN_type_symbol = param_data_type;
       
 20534             last_type_symbol = param_data_type;
       
 20535             
       
 20536             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20537             {
       
 20538         
       
 20539                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20540                 return return_type_symbol;
       
 20541                 
       
 20542             }
       
 20543             
       
 20544             ERROR;
       
 20545         }
       
 20546         
       
 20547     }/*function_byte_to_ulint*/
       
 20548     break;
       
 20549 
       
 20550 /****
       
 20551  *BYTE_TO_TIME
       
 20552  */
       
 20553     case function_byte_to_time :
       
 20554     {
       
 20555         symbol_c *last_type_symbol = NULL;
       
 20556 
       
 20557         {
       
 20558             symbol_c *IN_type_symbol = param_data_type;
       
 20559             last_type_symbol = param_data_type;
       
 20560             
       
 20561             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20562             {
       
 20563         
       
 20564                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20565                 return return_type_symbol;
       
 20566                 
       
 20567             }
       
 20568             
       
 20569             ERROR;
       
 20570         }
       
 20571         
       
 20572     }/*function_byte_to_time*/
       
 20573     break;
       
 20574 
       
 20575 /****
       
 20576  *BYTE_TO_BOOL
       
 20577  */
       
 20578     case function_byte_to_bool :
       
 20579     {
       
 20580         symbol_c *last_type_symbol = NULL;
       
 20581 
       
 20582         {
       
 20583             symbol_c *IN_type_symbol = param_data_type;
       
 20584             last_type_symbol = param_data_type;
       
 20585             
       
 20586             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
 16909             {
 20587             {
 16910         
 20588         
 16911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 20589                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16912                 return return_type_symbol;
 20590                 return return_type_symbol;
 16913                 
 20591                 
 16914             }
 20592             }
 16915             
 20593             
 16916             ERROR;
 20594             ERROR;
 16917         }
 20595         }
 16918         
 20596         
 16919     }/*function_lreal_to_bool*/
 20597     }/*function_byte_to_bool*/
 16920     break;
 20598     break;
 16921 
 20599 
 16922 /****
 20600 /****
 16923  *LREAL_TO_BYTE
 20601  *BYTE_TO_WORD
 16924  */
 20602  */
 16925     case function_lreal_to_byte :
 20603     case function_byte_to_word :
 16926     {
 20604     {
 16927         symbol_c *last_type_symbol = NULL;
 20605         symbol_c *last_type_symbol = NULL;
 16928 
 20606 
 16929         {
 20607         {
 16930             symbol_c *IN_type_symbol = param_data_type;
 20608             symbol_c *IN_type_symbol = param_data_type;
 16931             last_type_symbol = param_data_type;
 20609             last_type_symbol = param_data_type;
 16932             
 20610             
 16933             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 20611             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20612             {
       
 20613         
       
 20614                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20615                 return return_type_symbol;
       
 20616                 
       
 20617             }
       
 20618             
       
 20619             ERROR;
       
 20620         }
       
 20621         
       
 20622     }/*function_byte_to_word*/
       
 20623     break;
       
 20624 
       
 20625 /****
       
 20626  *BYTE_TO_DWORD
       
 20627  */
       
 20628     case function_byte_to_dword :
       
 20629     {
       
 20630         symbol_c *last_type_symbol = NULL;
       
 20631 
       
 20632         {
       
 20633             symbol_c *IN_type_symbol = param_data_type;
       
 20634             last_type_symbol = param_data_type;
       
 20635             
       
 20636             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20637             {
       
 20638         
       
 20639                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20640                 return return_type_symbol;
       
 20641                 
       
 20642             }
       
 20643             
       
 20644             ERROR;
       
 20645         }
       
 20646         
       
 20647     }/*function_byte_to_dword*/
       
 20648     break;
       
 20649 
       
 20650 /****
       
 20651  *BYTE_TO_LWORD
       
 20652  */
       
 20653     case function_byte_to_lword :
       
 20654     {
       
 20655         symbol_c *last_type_symbol = NULL;
       
 20656 
       
 20657         {
       
 20658             symbol_c *IN_type_symbol = param_data_type;
       
 20659             last_type_symbol = param_data_type;
       
 20660             
       
 20661             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20662             {
       
 20663         
       
 20664                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20665                 return return_type_symbol;
       
 20666                 
       
 20667             }
       
 20668             
       
 20669             ERROR;
       
 20670         }
       
 20671         
       
 20672     }/*function_byte_to_lword*/
       
 20673     break;
       
 20674 
       
 20675 /****
       
 20676  *BYTE_TO_STRING
       
 20677  */
       
 20678     case function_byte_to_string :
       
 20679     {
       
 20680         symbol_c *last_type_symbol = NULL;
       
 20681 
       
 20682         {
       
 20683             symbol_c *IN_type_symbol = param_data_type;
       
 20684             last_type_symbol = param_data_type;
       
 20685             
       
 20686             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20687             {
       
 20688         
       
 20689                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20690                 return return_type_symbol;
       
 20691                 
       
 20692             }
       
 20693             
       
 20694             ERROR;
       
 20695         }
       
 20696         
       
 20697     }/*function_byte_to_string*/
       
 20698     break;
       
 20699 
       
 20700 /****
       
 20701  *BYTE_TO_DATE
       
 20702  */
       
 20703     case function_byte_to_date :
       
 20704     {
       
 20705         symbol_c *last_type_symbol = NULL;
       
 20706 
       
 20707         {
       
 20708             symbol_c *IN_type_symbol = param_data_type;
       
 20709             last_type_symbol = param_data_type;
       
 20710             
       
 20711             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20712             {
       
 20713         
       
 20714                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20715                 return return_type_symbol;
       
 20716                 
       
 20717             }
       
 20718             
       
 20719             ERROR;
       
 20720         }
       
 20721         
       
 20722     }/*function_byte_to_date*/
       
 20723     break;
       
 20724 
       
 20725 /****
       
 20726  *BYTE_TO_TOD
       
 20727  */
       
 20728     case function_byte_to_tod :
       
 20729     {
       
 20730         symbol_c *last_type_symbol = NULL;
       
 20731 
       
 20732         {
       
 20733             symbol_c *IN_type_symbol = param_data_type;
       
 20734             last_type_symbol = param_data_type;
       
 20735             
       
 20736             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20737             {
       
 20738         
       
 20739                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20740                 return return_type_symbol;
       
 20741                 
       
 20742             }
       
 20743             
       
 20744             ERROR;
       
 20745         }
       
 20746         
       
 20747     }/*function_byte_to_tod*/
       
 20748     break;
       
 20749 
       
 20750 /****
       
 20751  *BYTE_TO_DT
       
 20752  */
       
 20753     case function_byte_to_dt :
       
 20754     {
       
 20755         symbol_c *last_type_symbol = NULL;
       
 20756 
       
 20757         {
       
 20758             symbol_c *IN_type_symbol = param_data_type;
       
 20759             last_type_symbol = param_data_type;
       
 20760             
       
 20761             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 20762             {
       
 20763         
       
 20764                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20765                 return return_type_symbol;
       
 20766                 
       
 20767             }
       
 20768             
       
 20769             ERROR;
       
 20770         }
       
 20771         
       
 20772     }/*function_byte_to_dt*/
       
 20773     break;
       
 20774 
       
 20775 /****
       
 20776  *WORD_TO_REAL
       
 20777  */
       
 20778     case function_word_to_real :
       
 20779     {
       
 20780         symbol_c *last_type_symbol = NULL;
       
 20781 
       
 20782         {
       
 20783             symbol_c *IN_type_symbol = param_data_type;
       
 20784             last_type_symbol = param_data_type;
       
 20785             
       
 20786             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20787             {
       
 20788         
       
 20789                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20790                 return return_type_symbol;
       
 20791                 
       
 20792             }
       
 20793             
       
 20794             ERROR;
       
 20795         }
       
 20796         
       
 20797     }/*function_word_to_real*/
       
 20798     break;
       
 20799 
       
 20800 /****
       
 20801  *WORD_TO_LREAL
       
 20802  */
       
 20803     case function_word_to_lreal :
       
 20804     {
       
 20805         symbol_c *last_type_symbol = NULL;
       
 20806 
       
 20807         {
       
 20808             symbol_c *IN_type_symbol = param_data_type;
       
 20809             last_type_symbol = param_data_type;
       
 20810             
       
 20811             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20812             {
       
 20813         
       
 20814                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20815                 return return_type_symbol;
       
 20816                 
       
 20817             }
       
 20818             
       
 20819             ERROR;
       
 20820         }
       
 20821         
       
 20822     }/*function_word_to_lreal*/
       
 20823     break;
       
 20824 
       
 20825 /****
       
 20826  *WORD_TO_SINT
       
 20827  */
       
 20828     case function_word_to_sint :
       
 20829     {
       
 20830         symbol_c *last_type_symbol = NULL;
       
 20831 
       
 20832         {
       
 20833             symbol_c *IN_type_symbol = param_data_type;
       
 20834             last_type_symbol = param_data_type;
       
 20835             
       
 20836             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20837             {
       
 20838         
       
 20839                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20840                 return return_type_symbol;
       
 20841                 
       
 20842             }
       
 20843             
       
 20844             ERROR;
       
 20845         }
       
 20846         
       
 20847     }/*function_word_to_sint*/
       
 20848     break;
       
 20849 
       
 20850 /****
       
 20851  *WORD_TO_INT
       
 20852  */
       
 20853     case function_word_to_int :
       
 20854     {
       
 20855         symbol_c *last_type_symbol = NULL;
       
 20856 
       
 20857         {
       
 20858             symbol_c *IN_type_symbol = param_data_type;
       
 20859             last_type_symbol = param_data_type;
       
 20860             
       
 20861             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20862             {
       
 20863         
       
 20864                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20865                 return return_type_symbol;
       
 20866                 
       
 20867             }
       
 20868             
       
 20869             ERROR;
       
 20870         }
       
 20871         
       
 20872     }/*function_word_to_int*/
       
 20873     break;
       
 20874 
       
 20875 /****
       
 20876  *WORD_TO_DINT
       
 20877  */
       
 20878     case function_word_to_dint :
       
 20879     {
       
 20880         symbol_c *last_type_symbol = NULL;
       
 20881 
       
 20882         {
       
 20883             symbol_c *IN_type_symbol = param_data_type;
       
 20884             last_type_symbol = param_data_type;
       
 20885             
       
 20886             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20887             {
       
 20888         
       
 20889                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20890                 return return_type_symbol;
       
 20891                 
       
 20892             }
       
 20893             
       
 20894             ERROR;
       
 20895         }
       
 20896         
       
 20897     }/*function_word_to_dint*/
       
 20898     break;
       
 20899 
       
 20900 /****
       
 20901  *WORD_TO_LINT
       
 20902  */
       
 20903     case function_word_to_lint :
       
 20904     {
       
 20905         symbol_c *last_type_symbol = NULL;
       
 20906 
       
 20907         {
       
 20908             symbol_c *IN_type_symbol = param_data_type;
       
 20909             last_type_symbol = param_data_type;
       
 20910             
       
 20911             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20912             {
       
 20913         
       
 20914                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20915                 return return_type_symbol;
       
 20916                 
       
 20917             }
       
 20918             
       
 20919             ERROR;
       
 20920         }
       
 20921         
       
 20922     }/*function_word_to_lint*/
       
 20923     break;
       
 20924 
       
 20925 /****
       
 20926  *WORD_TO_USINT
       
 20927  */
       
 20928     case function_word_to_usint :
       
 20929     {
       
 20930         symbol_c *last_type_symbol = NULL;
       
 20931 
       
 20932         {
       
 20933             symbol_c *IN_type_symbol = param_data_type;
       
 20934             last_type_symbol = param_data_type;
       
 20935             
       
 20936             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20937             {
       
 20938         
       
 20939                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20940                 return return_type_symbol;
       
 20941                 
       
 20942             }
       
 20943             
       
 20944             ERROR;
       
 20945         }
       
 20946         
       
 20947     }/*function_word_to_usint*/
       
 20948     break;
       
 20949 
       
 20950 /****
       
 20951  *WORD_TO_UINT
       
 20952  */
       
 20953     case function_word_to_uint :
       
 20954     {
       
 20955         symbol_c *last_type_symbol = NULL;
       
 20956 
       
 20957         {
       
 20958             symbol_c *IN_type_symbol = param_data_type;
       
 20959             last_type_symbol = param_data_type;
       
 20960             
       
 20961             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20962             {
       
 20963         
       
 20964                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20965                 return return_type_symbol;
       
 20966                 
       
 20967             }
       
 20968             
       
 20969             ERROR;
       
 20970         }
       
 20971         
       
 20972     }/*function_word_to_uint*/
       
 20973     break;
       
 20974 
       
 20975 /****
       
 20976  *WORD_TO_UDINT
       
 20977  */
       
 20978     case function_word_to_udint :
       
 20979     {
       
 20980         symbol_c *last_type_symbol = NULL;
       
 20981 
       
 20982         {
       
 20983             symbol_c *IN_type_symbol = param_data_type;
       
 20984             last_type_symbol = param_data_type;
       
 20985             
       
 20986             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 20987             {
       
 20988         
       
 20989                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20990                 return return_type_symbol;
       
 20991                 
       
 20992             }
       
 20993             
       
 20994             ERROR;
       
 20995         }
       
 20996         
       
 20997     }/*function_word_to_udint*/
       
 20998     break;
       
 20999 
       
 21000 /****
       
 21001  *WORD_TO_ULINT
       
 21002  */
       
 21003     case function_word_to_ulint :
       
 21004     {
       
 21005         symbol_c *last_type_symbol = NULL;
       
 21006 
       
 21007         {
       
 21008             symbol_c *IN_type_symbol = param_data_type;
       
 21009             last_type_symbol = param_data_type;
       
 21010             
       
 21011             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21012             {
       
 21013         
       
 21014                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21015                 return return_type_symbol;
       
 21016                 
       
 21017             }
       
 21018             
       
 21019             ERROR;
       
 21020         }
       
 21021         
       
 21022     }/*function_word_to_ulint*/
       
 21023     break;
       
 21024 
       
 21025 /****
       
 21026  *WORD_TO_TIME
       
 21027  */
       
 21028     case function_word_to_time :
       
 21029     {
       
 21030         symbol_c *last_type_symbol = NULL;
       
 21031 
       
 21032         {
       
 21033             symbol_c *IN_type_symbol = param_data_type;
       
 21034             last_type_symbol = param_data_type;
       
 21035             
       
 21036             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21037             {
       
 21038         
       
 21039                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21040                 return return_type_symbol;
       
 21041                 
       
 21042             }
       
 21043             
       
 21044             ERROR;
       
 21045         }
       
 21046         
       
 21047     }/*function_word_to_time*/
       
 21048     break;
       
 21049 
       
 21050 /****
       
 21051  *WORD_TO_BOOL
       
 21052  */
       
 21053     case function_word_to_bool :
       
 21054     {
       
 21055         symbol_c *last_type_symbol = NULL;
       
 21056 
       
 21057         {
       
 21058             symbol_c *IN_type_symbol = param_data_type;
       
 21059             last_type_symbol = param_data_type;
       
 21060             
       
 21061             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21062             {
       
 21063         
       
 21064                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21065                 return return_type_symbol;
       
 21066                 
       
 21067             }
       
 21068             
       
 21069             ERROR;
       
 21070         }
       
 21071         
       
 21072     }/*function_word_to_bool*/
       
 21073     break;
       
 21074 
       
 21075 /****
       
 21076  *WORD_TO_BYTE
       
 21077  */
       
 21078     case function_word_to_byte :
       
 21079     {
       
 21080         symbol_c *last_type_symbol = NULL;
       
 21081 
       
 21082         {
       
 21083             symbol_c *IN_type_symbol = param_data_type;
       
 21084             last_type_symbol = param_data_type;
       
 21085             
       
 21086             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
 16934             {
 21087             {
 16935         
 21088         
 16936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 21089                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16937                 return return_type_symbol;
 21090                 return return_type_symbol;
 16938                 
 21091                 
 16939             }
 21092             }
 16940             
 21093             
 16941             ERROR;
 21094             ERROR;
 16942         }
 21095         }
 16943         
 21096         
 16944     }/*function_lreal_to_byte*/
 21097     }/*function_word_to_byte*/
 16945     break;
 21098     break;
 16946 
 21099 
 16947 /****
 21100 /****
 16948  *LREAL_TO_WORD
 21101  *WORD_TO_DWORD
 16949  */
 21102  */
 16950     case function_lreal_to_word :
 21103     case function_word_to_dword :
 16951     {
 21104     {
 16952         symbol_c *last_type_symbol = NULL;
 21105         symbol_c *last_type_symbol = NULL;
 16953 
 21106 
 16954         {
 21107         {
 16955             symbol_c *IN_type_symbol = param_data_type;
 21108             symbol_c *IN_type_symbol = param_data_type;
 16956             last_type_symbol = param_data_type;
 21109             last_type_symbol = param_data_type;
 16957             
 21110             
 16958             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 21111             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21112             {
       
 21113         
       
 21114                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21115                 return return_type_symbol;
       
 21116                 
       
 21117             }
       
 21118             
       
 21119             ERROR;
       
 21120         }
       
 21121         
       
 21122     }/*function_word_to_dword*/
       
 21123     break;
       
 21124 
       
 21125 /****
       
 21126  *WORD_TO_LWORD
       
 21127  */
       
 21128     case function_word_to_lword :
       
 21129     {
       
 21130         symbol_c *last_type_symbol = NULL;
       
 21131 
       
 21132         {
       
 21133             symbol_c *IN_type_symbol = param_data_type;
       
 21134             last_type_symbol = param_data_type;
       
 21135             
       
 21136             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21137             {
       
 21138         
       
 21139                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21140                 return return_type_symbol;
       
 21141                 
       
 21142             }
       
 21143             
       
 21144             ERROR;
       
 21145         }
       
 21146         
       
 21147     }/*function_word_to_lword*/
       
 21148     break;
       
 21149 
       
 21150 /****
       
 21151  *WORD_TO_STRING
       
 21152  */
       
 21153     case function_word_to_string :
       
 21154     {
       
 21155         symbol_c *last_type_symbol = NULL;
       
 21156 
       
 21157         {
       
 21158             symbol_c *IN_type_symbol = param_data_type;
       
 21159             last_type_symbol = param_data_type;
       
 21160             
       
 21161             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21162             {
       
 21163         
       
 21164                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21165                 return return_type_symbol;
       
 21166                 
       
 21167             }
       
 21168             
       
 21169             ERROR;
       
 21170         }
       
 21171         
       
 21172     }/*function_word_to_string*/
       
 21173     break;
       
 21174 
       
 21175 /****
       
 21176  *WORD_TO_DATE
       
 21177  */
       
 21178     case function_word_to_date :
       
 21179     {
       
 21180         symbol_c *last_type_symbol = NULL;
       
 21181 
       
 21182         {
       
 21183             symbol_c *IN_type_symbol = param_data_type;
       
 21184             last_type_symbol = param_data_type;
       
 21185             
       
 21186             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21187             {
       
 21188         
       
 21189                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21190                 return return_type_symbol;
       
 21191                 
       
 21192             }
       
 21193             
       
 21194             ERROR;
       
 21195         }
       
 21196         
       
 21197     }/*function_word_to_date*/
       
 21198     break;
       
 21199 
       
 21200 /****
       
 21201  *WORD_TO_TOD
       
 21202  */
       
 21203     case function_word_to_tod :
       
 21204     {
       
 21205         symbol_c *last_type_symbol = NULL;
       
 21206 
       
 21207         {
       
 21208             symbol_c *IN_type_symbol = param_data_type;
       
 21209             last_type_symbol = param_data_type;
       
 21210             
       
 21211             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21212             {
       
 21213         
       
 21214                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21215                 return return_type_symbol;
       
 21216                 
       
 21217             }
       
 21218             
       
 21219             ERROR;
       
 21220         }
       
 21221         
       
 21222     }/*function_word_to_tod*/
       
 21223     break;
       
 21224 
       
 21225 /****
       
 21226  *WORD_TO_DT
       
 21227  */
       
 21228     case function_word_to_dt :
       
 21229     {
       
 21230         symbol_c *last_type_symbol = NULL;
       
 21231 
       
 21232         {
       
 21233             symbol_c *IN_type_symbol = param_data_type;
       
 21234             last_type_symbol = param_data_type;
       
 21235             
       
 21236             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 21237             {
       
 21238         
       
 21239                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21240                 return return_type_symbol;
       
 21241                 
       
 21242             }
       
 21243             
       
 21244             ERROR;
       
 21245         }
       
 21246         
       
 21247     }/*function_word_to_dt*/
       
 21248     break;
       
 21249 
       
 21250 /****
       
 21251  *DWORD_TO_REAL
       
 21252  */
       
 21253     case function_dword_to_real :
       
 21254     {
       
 21255         symbol_c *last_type_symbol = NULL;
       
 21256 
       
 21257         {
       
 21258             symbol_c *IN_type_symbol = param_data_type;
       
 21259             last_type_symbol = param_data_type;
       
 21260             
       
 21261             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21262             {
       
 21263         
       
 21264                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21265                 return return_type_symbol;
       
 21266                 
       
 21267             }
       
 21268             
       
 21269             ERROR;
       
 21270         }
       
 21271         
       
 21272     }/*function_dword_to_real*/
       
 21273     break;
       
 21274 
       
 21275 /****
       
 21276  *DWORD_TO_LREAL
       
 21277  */
       
 21278     case function_dword_to_lreal :
       
 21279     {
       
 21280         symbol_c *last_type_symbol = NULL;
       
 21281 
       
 21282         {
       
 21283             symbol_c *IN_type_symbol = param_data_type;
       
 21284             last_type_symbol = param_data_type;
       
 21285             
       
 21286             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21287             {
       
 21288         
       
 21289                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21290                 return return_type_symbol;
       
 21291                 
       
 21292             }
       
 21293             
       
 21294             ERROR;
       
 21295         }
       
 21296         
       
 21297     }/*function_dword_to_lreal*/
       
 21298     break;
       
 21299 
       
 21300 /****
       
 21301  *DWORD_TO_SINT
       
 21302  */
       
 21303     case function_dword_to_sint :
       
 21304     {
       
 21305         symbol_c *last_type_symbol = NULL;
       
 21306 
       
 21307         {
       
 21308             symbol_c *IN_type_symbol = param_data_type;
       
 21309             last_type_symbol = param_data_type;
       
 21310             
       
 21311             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21312             {
       
 21313         
       
 21314                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21315                 return return_type_symbol;
       
 21316                 
       
 21317             }
       
 21318             
       
 21319             ERROR;
       
 21320         }
       
 21321         
       
 21322     }/*function_dword_to_sint*/
       
 21323     break;
       
 21324 
       
 21325 /****
       
 21326  *DWORD_TO_INT
       
 21327  */
       
 21328     case function_dword_to_int :
       
 21329     {
       
 21330         symbol_c *last_type_symbol = NULL;
       
 21331 
       
 21332         {
       
 21333             symbol_c *IN_type_symbol = param_data_type;
       
 21334             last_type_symbol = param_data_type;
       
 21335             
       
 21336             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21337             {
       
 21338         
       
 21339                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21340                 return return_type_symbol;
       
 21341                 
       
 21342             }
       
 21343             
       
 21344             ERROR;
       
 21345         }
       
 21346         
       
 21347     }/*function_dword_to_int*/
       
 21348     break;
       
 21349 
       
 21350 /****
       
 21351  *DWORD_TO_DINT
       
 21352  */
       
 21353     case function_dword_to_dint :
       
 21354     {
       
 21355         symbol_c *last_type_symbol = NULL;
       
 21356 
       
 21357         {
       
 21358             symbol_c *IN_type_symbol = param_data_type;
       
 21359             last_type_symbol = param_data_type;
       
 21360             
       
 21361             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21362             {
       
 21363         
       
 21364                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21365                 return return_type_symbol;
       
 21366                 
       
 21367             }
       
 21368             
       
 21369             ERROR;
       
 21370         }
       
 21371         
       
 21372     }/*function_dword_to_dint*/
       
 21373     break;
       
 21374 
       
 21375 /****
       
 21376  *DWORD_TO_LINT
       
 21377  */
       
 21378     case function_dword_to_lint :
       
 21379     {
       
 21380         symbol_c *last_type_symbol = NULL;
       
 21381 
       
 21382         {
       
 21383             symbol_c *IN_type_symbol = param_data_type;
       
 21384             last_type_symbol = param_data_type;
       
 21385             
       
 21386             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21387             {
       
 21388         
       
 21389                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21390                 return return_type_symbol;
       
 21391                 
       
 21392             }
       
 21393             
       
 21394             ERROR;
       
 21395         }
       
 21396         
       
 21397     }/*function_dword_to_lint*/
       
 21398     break;
       
 21399 
       
 21400 /****
       
 21401  *DWORD_TO_USINT
       
 21402  */
       
 21403     case function_dword_to_usint :
       
 21404     {
       
 21405         symbol_c *last_type_symbol = NULL;
       
 21406 
       
 21407         {
       
 21408             symbol_c *IN_type_symbol = param_data_type;
       
 21409             last_type_symbol = param_data_type;
       
 21410             
       
 21411             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21412             {
       
 21413         
       
 21414                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21415                 return return_type_symbol;
       
 21416                 
       
 21417             }
       
 21418             
       
 21419             ERROR;
       
 21420         }
       
 21421         
       
 21422     }/*function_dword_to_usint*/
       
 21423     break;
       
 21424 
       
 21425 /****
       
 21426  *DWORD_TO_UINT
       
 21427  */
       
 21428     case function_dword_to_uint :
       
 21429     {
       
 21430         symbol_c *last_type_symbol = NULL;
       
 21431 
       
 21432         {
       
 21433             symbol_c *IN_type_symbol = param_data_type;
       
 21434             last_type_symbol = param_data_type;
       
 21435             
       
 21436             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21437             {
       
 21438         
       
 21439                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21440                 return return_type_symbol;
       
 21441                 
       
 21442             }
       
 21443             
       
 21444             ERROR;
       
 21445         }
       
 21446         
       
 21447     }/*function_dword_to_uint*/
       
 21448     break;
       
 21449 
       
 21450 /****
       
 21451  *DWORD_TO_UDINT
       
 21452  */
       
 21453     case function_dword_to_udint :
       
 21454     {
       
 21455         symbol_c *last_type_symbol = NULL;
       
 21456 
       
 21457         {
       
 21458             symbol_c *IN_type_symbol = param_data_type;
       
 21459             last_type_symbol = param_data_type;
       
 21460             
       
 21461             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21462             {
       
 21463         
       
 21464                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21465                 return return_type_symbol;
       
 21466                 
       
 21467             }
       
 21468             
       
 21469             ERROR;
       
 21470         }
       
 21471         
       
 21472     }/*function_dword_to_udint*/
       
 21473     break;
       
 21474 
       
 21475 /****
       
 21476  *DWORD_TO_ULINT
       
 21477  */
       
 21478     case function_dword_to_ulint :
       
 21479     {
       
 21480         symbol_c *last_type_symbol = NULL;
       
 21481 
       
 21482         {
       
 21483             symbol_c *IN_type_symbol = param_data_type;
       
 21484             last_type_symbol = param_data_type;
       
 21485             
       
 21486             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21487             {
       
 21488         
       
 21489                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21490                 return return_type_symbol;
       
 21491                 
       
 21492             }
       
 21493             
       
 21494             ERROR;
       
 21495         }
       
 21496         
       
 21497     }/*function_dword_to_ulint*/
       
 21498     break;
       
 21499 
       
 21500 /****
       
 21501  *DWORD_TO_TIME
       
 21502  */
       
 21503     case function_dword_to_time :
       
 21504     {
       
 21505         symbol_c *last_type_symbol = NULL;
       
 21506 
       
 21507         {
       
 21508             symbol_c *IN_type_symbol = param_data_type;
       
 21509             last_type_symbol = param_data_type;
       
 21510             
       
 21511             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21512             {
       
 21513         
       
 21514                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21515                 return return_type_symbol;
       
 21516                 
       
 21517             }
       
 21518             
       
 21519             ERROR;
       
 21520         }
       
 21521         
       
 21522     }/*function_dword_to_time*/
       
 21523     break;
       
 21524 
       
 21525 /****
       
 21526  *DWORD_TO_BOOL
       
 21527  */
       
 21528     case function_dword_to_bool :
       
 21529     {
       
 21530         symbol_c *last_type_symbol = NULL;
       
 21531 
       
 21532         {
       
 21533             symbol_c *IN_type_symbol = param_data_type;
       
 21534             last_type_symbol = param_data_type;
       
 21535             
       
 21536             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21537             {
       
 21538         
       
 21539                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21540                 return return_type_symbol;
       
 21541                 
       
 21542             }
       
 21543             
       
 21544             ERROR;
       
 21545         }
       
 21546         
       
 21547     }/*function_dword_to_bool*/
       
 21548     break;
       
 21549 
       
 21550 /****
       
 21551  *DWORD_TO_BYTE
       
 21552  */
       
 21553     case function_dword_to_byte :
       
 21554     {
       
 21555         symbol_c *last_type_symbol = NULL;
       
 21556 
       
 21557         {
       
 21558             symbol_c *IN_type_symbol = param_data_type;
       
 21559             last_type_symbol = param_data_type;
       
 21560             
       
 21561             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21562             {
       
 21563         
       
 21564                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21565                 return return_type_symbol;
       
 21566                 
       
 21567             }
       
 21568             
       
 21569             ERROR;
       
 21570         }
       
 21571         
       
 21572     }/*function_dword_to_byte*/
       
 21573     break;
       
 21574 
       
 21575 /****
       
 21576  *DWORD_TO_WORD
       
 21577  */
       
 21578     case function_dword_to_word :
       
 21579     {
       
 21580         symbol_c *last_type_symbol = NULL;
       
 21581 
       
 21582         {
       
 21583             symbol_c *IN_type_symbol = param_data_type;
       
 21584             last_type_symbol = param_data_type;
       
 21585             
       
 21586             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 16959             {
 21587             {
 16960         
 21588         
 16961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 21589                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16962                 return return_type_symbol;
 21590                 return return_type_symbol;
 16963                 
 21591                 
 16964             }
 21592             }
 16965             
 21593             
 16966             ERROR;
 21594             ERROR;
 16967         }
 21595         }
 16968         
 21596         
 16969     }/*function_lreal_to_word*/
 21597     }/*function_dword_to_word*/
 16970     break;
 21598     break;
 16971 
 21599 
 16972 /****
 21600 /****
 16973  *LREAL_TO_DWORD
 21601  *DWORD_TO_LWORD
 16974  */
 21602  */
 16975     case function_lreal_to_dword :
 21603     case function_dword_to_lword :
 16976     {
 21604     {
 16977         symbol_c *last_type_symbol = NULL;
 21605         symbol_c *last_type_symbol = NULL;
 16978 
 21606 
 16979         {
 21607         {
 16980             symbol_c *IN_type_symbol = param_data_type;
 21608             symbol_c *IN_type_symbol = param_data_type;
 16981             last_type_symbol = param_data_type;
 21609             last_type_symbol = param_data_type;
 16982             
 21610             
 16983             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 21611             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21612             {
       
 21613         
       
 21614                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21615                 return return_type_symbol;
       
 21616                 
       
 21617             }
       
 21618             
       
 21619             ERROR;
       
 21620         }
       
 21621         
       
 21622     }/*function_dword_to_lword*/
       
 21623     break;
       
 21624 
       
 21625 /****
       
 21626  *DWORD_TO_STRING
       
 21627  */
       
 21628     case function_dword_to_string :
       
 21629     {
       
 21630         symbol_c *last_type_symbol = NULL;
       
 21631 
       
 21632         {
       
 21633             symbol_c *IN_type_symbol = param_data_type;
       
 21634             last_type_symbol = param_data_type;
       
 21635             
       
 21636             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21637             {
       
 21638         
       
 21639                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21640                 return return_type_symbol;
       
 21641                 
       
 21642             }
       
 21643             
       
 21644             ERROR;
       
 21645         }
       
 21646         
       
 21647     }/*function_dword_to_string*/
       
 21648     break;
       
 21649 
       
 21650 /****
       
 21651  *DWORD_TO_DATE
       
 21652  */
       
 21653     case function_dword_to_date :
       
 21654     {
       
 21655         symbol_c *last_type_symbol = NULL;
       
 21656 
       
 21657         {
       
 21658             symbol_c *IN_type_symbol = param_data_type;
       
 21659             last_type_symbol = param_data_type;
       
 21660             
       
 21661             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21662             {
       
 21663         
       
 21664                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21665                 return return_type_symbol;
       
 21666                 
       
 21667             }
       
 21668             
       
 21669             ERROR;
       
 21670         }
       
 21671         
       
 21672     }/*function_dword_to_date*/
       
 21673     break;
       
 21674 
       
 21675 /****
       
 21676  *DWORD_TO_TOD
       
 21677  */
       
 21678     case function_dword_to_tod :
       
 21679     {
       
 21680         symbol_c *last_type_symbol = NULL;
       
 21681 
       
 21682         {
       
 21683             symbol_c *IN_type_symbol = param_data_type;
       
 21684             last_type_symbol = param_data_type;
       
 21685             
       
 21686             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21687             {
       
 21688         
       
 21689                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21690                 return return_type_symbol;
       
 21691                 
       
 21692             }
       
 21693             
       
 21694             ERROR;
       
 21695         }
       
 21696         
       
 21697     }/*function_dword_to_tod*/
       
 21698     break;
       
 21699 
       
 21700 /****
       
 21701  *DWORD_TO_DT
       
 21702  */
       
 21703     case function_dword_to_dt :
       
 21704     {
       
 21705         symbol_c *last_type_symbol = NULL;
       
 21706 
       
 21707         {
       
 21708             symbol_c *IN_type_symbol = param_data_type;
       
 21709             last_type_symbol = param_data_type;
       
 21710             
       
 21711             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 21712             {
       
 21713         
       
 21714                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21715                 return return_type_symbol;
       
 21716                 
       
 21717             }
       
 21718             
       
 21719             ERROR;
       
 21720         }
       
 21721         
       
 21722     }/*function_dword_to_dt*/
       
 21723     break;
       
 21724 
       
 21725 /****
       
 21726  *LWORD_TO_REAL
       
 21727  */
       
 21728     case function_lword_to_real :
       
 21729     {
       
 21730         symbol_c *last_type_symbol = NULL;
       
 21731 
       
 21732         {
       
 21733             symbol_c *IN_type_symbol = param_data_type;
       
 21734             last_type_symbol = param_data_type;
       
 21735             
       
 21736             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21737             {
       
 21738         
       
 21739                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21740                 return return_type_symbol;
       
 21741                 
       
 21742             }
       
 21743             
       
 21744             ERROR;
       
 21745         }
       
 21746         
       
 21747     }/*function_lword_to_real*/
       
 21748     break;
       
 21749 
       
 21750 /****
       
 21751  *LWORD_TO_LREAL
       
 21752  */
       
 21753     case function_lword_to_lreal :
       
 21754     {
       
 21755         symbol_c *last_type_symbol = NULL;
       
 21756 
       
 21757         {
       
 21758             symbol_c *IN_type_symbol = param_data_type;
       
 21759             last_type_symbol = param_data_type;
       
 21760             
       
 21761             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21762             {
       
 21763         
       
 21764                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21765                 return return_type_symbol;
       
 21766                 
       
 21767             }
       
 21768             
       
 21769             ERROR;
       
 21770         }
       
 21771         
       
 21772     }/*function_lword_to_lreal*/
       
 21773     break;
       
 21774 
       
 21775 /****
       
 21776  *LWORD_TO_SINT
       
 21777  */
       
 21778     case function_lword_to_sint :
       
 21779     {
       
 21780         symbol_c *last_type_symbol = NULL;
       
 21781 
       
 21782         {
       
 21783             symbol_c *IN_type_symbol = param_data_type;
       
 21784             last_type_symbol = param_data_type;
       
 21785             
       
 21786             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21787             {
       
 21788         
       
 21789                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21790                 return return_type_symbol;
       
 21791                 
       
 21792             }
       
 21793             
       
 21794             ERROR;
       
 21795         }
       
 21796         
       
 21797     }/*function_lword_to_sint*/
       
 21798     break;
       
 21799 
       
 21800 /****
       
 21801  *LWORD_TO_INT
       
 21802  */
       
 21803     case function_lword_to_int :
       
 21804     {
       
 21805         symbol_c *last_type_symbol = NULL;
       
 21806 
       
 21807         {
       
 21808             symbol_c *IN_type_symbol = param_data_type;
       
 21809             last_type_symbol = param_data_type;
       
 21810             
       
 21811             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21812             {
       
 21813         
       
 21814                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21815                 return return_type_symbol;
       
 21816                 
       
 21817             }
       
 21818             
       
 21819             ERROR;
       
 21820         }
       
 21821         
       
 21822     }/*function_lword_to_int*/
       
 21823     break;
       
 21824 
       
 21825 /****
       
 21826  *LWORD_TO_DINT
       
 21827  */
       
 21828     case function_lword_to_dint :
       
 21829     {
       
 21830         symbol_c *last_type_symbol = NULL;
       
 21831 
       
 21832         {
       
 21833             symbol_c *IN_type_symbol = param_data_type;
       
 21834             last_type_symbol = param_data_type;
       
 21835             
       
 21836             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21837             {
       
 21838         
       
 21839                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21840                 return return_type_symbol;
       
 21841                 
       
 21842             }
       
 21843             
       
 21844             ERROR;
       
 21845         }
       
 21846         
       
 21847     }/*function_lword_to_dint*/
       
 21848     break;
       
 21849 
       
 21850 /****
       
 21851  *LWORD_TO_LINT
       
 21852  */
       
 21853     case function_lword_to_lint :
       
 21854     {
       
 21855         symbol_c *last_type_symbol = NULL;
       
 21856 
       
 21857         {
       
 21858             symbol_c *IN_type_symbol = param_data_type;
       
 21859             last_type_symbol = param_data_type;
       
 21860             
       
 21861             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21862             {
       
 21863         
       
 21864                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21865                 return return_type_symbol;
       
 21866                 
       
 21867             }
       
 21868             
       
 21869             ERROR;
       
 21870         }
       
 21871         
       
 21872     }/*function_lword_to_lint*/
       
 21873     break;
       
 21874 
       
 21875 /****
       
 21876  *LWORD_TO_USINT
       
 21877  */
       
 21878     case function_lword_to_usint :
       
 21879     {
       
 21880         symbol_c *last_type_symbol = NULL;
       
 21881 
       
 21882         {
       
 21883             symbol_c *IN_type_symbol = param_data_type;
       
 21884             last_type_symbol = param_data_type;
       
 21885             
       
 21886             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21887             {
       
 21888         
       
 21889                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21890                 return return_type_symbol;
       
 21891                 
       
 21892             }
       
 21893             
       
 21894             ERROR;
       
 21895         }
       
 21896         
       
 21897     }/*function_lword_to_usint*/
       
 21898     break;
       
 21899 
       
 21900 /****
       
 21901  *LWORD_TO_UINT
       
 21902  */
       
 21903     case function_lword_to_uint :
       
 21904     {
       
 21905         symbol_c *last_type_symbol = NULL;
       
 21906 
       
 21907         {
       
 21908             symbol_c *IN_type_symbol = param_data_type;
       
 21909             last_type_symbol = param_data_type;
       
 21910             
       
 21911             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21912             {
       
 21913         
       
 21914                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21915                 return return_type_symbol;
       
 21916                 
       
 21917             }
       
 21918             
       
 21919             ERROR;
       
 21920         }
       
 21921         
       
 21922     }/*function_lword_to_uint*/
       
 21923     break;
       
 21924 
       
 21925 /****
       
 21926  *LWORD_TO_UDINT
       
 21927  */
       
 21928     case function_lword_to_udint :
       
 21929     {
       
 21930         symbol_c *last_type_symbol = NULL;
       
 21931 
       
 21932         {
       
 21933             symbol_c *IN_type_symbol = param_data_type;
       
 21934             last_type_symbol = param_data_type;
       
 21935             
       
 21936             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21937             {
       
 21938         
       
 21939                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21940                 return return_type_symbol;
       
 21941                 
       
 21942             }
       
 21943             
       
 21944             ERROR;
       
 21945         }
       
 21946         
       
 21947     }/*function_lword_to_udint*/
       
 21948     break;
       
 21949 
       
 21950 /****
       
 21951  *LWORD_TO_ULINT
       
 21952  */
       
 21953     case function_lword_to_ulint :
       
 21954     {
       
 21955         symbol_c *last_type_symbol = NULL;
       
 21956 
       
 21957         {
       
 21958             symbol_c *IN_type_symbol = param_data_type;
       
 21959             last_type_symbol = param_data_type;
       
 21960             
       
 21961             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21962             {
       
 21963         
       
 21964                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21965                 return return_type_symbol;
       
 21966                 
       
 21967             }
       
 21968             
       
 21969             ERROR;
       
 21970         }
       
 21971         
       
 21972     }/*function_lword_to_ulint*/
       
 21973     break;
       
 21974 
       
 21975 /****
       
 21976  *LWORD_TO_TIME
       
 21977  */
       
 21978     case function_lword_to_time :
       
 21979     {
       
 21980         symbol_c *last_type_symbol = NULL;
       
 21981 
       
 21982         {
       
 21983             symbol_c *IN_type_symbol = param_data_type;
       
 21984             last_type_symbol = param_data_type;
       
 21985             
       
 21986             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 21987             {
       
 21988         
       
 21989                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21990                 return return_type_symbol;
       
 21991                 
       
 21992             }
       
 21993             
       
 21994             ERROR;
       
 21995         }
       
 21996         
       
 21997     }/*function_lword_to_time*/
       
 21998     break;
       
 21999 
       
 22000 /****
       
 22001  *LWORD_TO_BOOL
       
 22002  */
       
 22003     case function_lword_to_bool :
       
 22004     {
       
 22005         symbol_c *last_type_symbol = NULL;
       
 22006 
       
 22007         {
       
 22008             symbol_c *IN_type_symbol = param_data_type;
       
 22009             last_type_symbol = param_data_type;
       
 22010             
       
 22011             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22012             {
       
 22013         
       
 22014                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22015                 return return_type_symbol;
       
 22016                 
       
 22017             }
       
 22018             
       
 22019             ERROR;
       
 22020         }
       
 22021         
       
 22022     }/*function_lword_to_bool*/
       
 22023     break;
       
 22024 
       
 22025 /****
       
 22026  *LWORD_TO_BYTE
       
 22027  */
       
 22028     case function_lword_to_byte :
       
 22029     {
       
 22030         symbol_c *last_type_symbol = NULL;
       
 22031 
       
 22032         {
       
 22033             symbol_c *IN_type_symbol = param_data_type;
       
 22034             last_type_symbol = param_data_type;
       
 22035             
       
 22036             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22037             {
       
 22038         
       
 22039                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22040                 return return_type_symbol;
       
 22041                 
       
 22042             }
       
 22043             
       
 22044             ERROR;
       
 22045         }
       
 22046         
       
 22047     }/*function_lword_to_byte*/
       
 22048     break;
       
 22049 
       
 22050 /****
       
 22051  *LWORD_TO_WORD
       
 22052  */
       
 22053     case function_lword_to_word :
       
 22054     {
       
 22055         symbol_c *last_type_symbol = NULL;
       
 22056 
       
 22057         {
       
 22058             symbol_c *IN_type_symbol = param_data_type;
       
 22059             last_type_symbol = param_data_type;
       
 22060             
       
 22061             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22062             {
       
 22063         
       
 22064                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22065                 return return_type_symbol;
       
 22066                 
       
 22067             }
       
 22068             
       
 22069             ERROR;
       
 22070         }
       
 22071         
       
 22072     }/*function_lword_to_word*/
       
 22073     break;
       
 22074 
       
 22075 /****
       
 22076  *LWORD_TO_DWORD
       
 22077  */
       
 22078     case function_lword_to_dword :
       
 22079     {
       
 22080         symbol_c *last_type_symbol = NULL;
       
 22081 
       
 22082         {
       
 22083             symbol_c *IN_type_symbol = param_data_type;
       
 22084             last_type_symbol = param_data_type;
       
 22085             
       
 22086             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
 16984             {
 22087             {
 16985         
 22088         
 16986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 22089                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 16987                 return return_type_symbol;
 22090                 return return_type_symbol;
 16988                 
 22091                 
 16989             }
 22092             }
 16990             
 22093             
 16991             ERROR;
 22094             ERROR;
 16992         }
 22095         }
 16993         
 22096         
 16994     }/*function_lreal_to_dword*/
 22097     }/*function_lword_to_dword*/
 16995     break;
 22098     break;
 16996 
 22099 
 16997 /****
 22100 /****
 16998  *LREAL_TO_LWORD
 22101  *LWORD_TO_STRING
 16999  */
 22102  */
 17000     case function_lreal_to_lword :
 22103     case function_lword_to_string :
 17001     {
 22104     {
 17002         symbol_c *last_type_symbol = NULL;
 22105         symbol_c *last_type_symbol = NULL;
 17003 
 22106 
 17004         {
 22107         {
 17005             symbol_c *IN_type_symbol = param_data_type;
 22108             symbol_c *IN_type_symbol = param_data_type;
 17006             last_type_symbol = param_data_type;
 22109             last_type_symbol = param_data_type;
 17007             
 22110             
 17008             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 22111             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22112             {
       
 22113         
       
 22114                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22115                 return return_type_symbol;
       
 22116                 
       
 22117             }
       
 22118             
       
 22119             ERROR;
       
 22120         }
       
 22121         
       
 22122     }/*function_lword_to_string*/
       
 22123     break;
       
 22124 
       
 22125 /****
       
 22126  *LWORD_TO_DATE
       
 22127  */
       
 22128     case function_lword_to_date :
       
 22129     {
       
 22130         symbol_c *last_type_symbol = NULL;
       
 22131 
       
 22132         {
       
 22133             symbol_c *IN_type_symbol = param_data_type;
       
 22134             last_type_symbol = param_data_type;
       
 22135             
       
 22136             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22137             {
       
 22138         
       
 22139                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22140                 return return_type_symbol;
       
 22141                 
       
 22142             }
       
 22143             
       
 22144             ERROR;
       
 22145         }
       
 22146         
       
 22147     }/*function_lword_to_date*/
       
 22148     break;
       
 22149 
       
 22150 /****
       
 22151  *LWORD_TO_TOD
       
 22152  */
       
 22153     case function_lword_to_tod :
       
 22154     {
       
 22155         symbol_c *last_type_symbol = NULL;
       
 22156 
       
 22157         {
       
 22158             symbol_c *IN_type_symbol = param_data_type;
       
 22159             last_type_symbol = param_data_type;
       
 22160             
       
 22161             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22162             {
       
 22163         
       
 22164                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22165                 return return_type_symbol;
       
 22166                 
       
 22167             }
       
 22168             
       
 22169             ERROR;
       
 22170         }
       
 22171         
       
 22172     }/*function_lword_to_tod*/
       
 22173     break;
       
 22174 
       
 22175 /****
       
 22176  *LWORD_TO_DT
       
 22177  */
       
 22178     case function_lword_to_dt :
       
 22179     {
       
 22180         symbol_c *last_type_symbol = NULL;
       
 22181 
       
 22182         {
       
 22183             symbol_c *IN_type_symbol = param_data_type;
       
 22184             last_type_symbol = param_data_type;
       
 22185             
       
 22186             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 22187             {
       
 22188         
       
 22189                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22190                 return return_type_symbol;
       
 22191                 
       
 22192             }
       
 22193             
       
 22194             ERROR;
       
 22195         }
       
 22196         
       
 22197     }/*function_lword_to_dt*/
       
 22198     break;
       
 22199 
       
 22200 /****
       
 22201  *STRING_TO_REAL
       
 22202  */
       
 22203     case function_string_to_real :
       
 22204     {
       
 22205         symbol_c *last_type_symbol = NULL;
       
 22206 
       
 22207         {
       
 22208             symbol_c *IN_type_symbol = param_data_type;
       
 22209             last_type_symbol = param_data_type;
       
 22210             
       
 22211             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22212             {
       
 22213         
       
 22214                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22215                 return return_type_symbol;
       
 22216                 
       
 22217             }
       
 22218             
       
 22219             ERROR;
       
 22220         }
       
 22221         
       
 22222     }/*function_string_to_real*/
       
 22223     break;
       
 22224 
       
 22225 /****
       
 22226  *STRING_TO_LREAL
       
 22227  */
       
 22228     case function_string_to_lreal :
       
 22229     {
       
 22230         symbol_c *last_type_symbol = NULL;
       
 22231 
       
 22232         {
       
 22233             symbol_c *IN_type_symbol = param_data_type;
       
 22234             last_type_symbol = param_data_type;
       
 22235             
       
 22236             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22237             {
       
 22238         
       
 22239                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22240                 return return_type_symbol;
       
 22241                 
       
 22242             }
       
 22243             
       
 22244             ERROR;
       
 22245         }
       
 22246         
       
 22247     }/*function_string_to_lreal*/
       
 22248     break;
       
 22249 
       
 22250 /****
       
 22251  *STRING_TO_SINT
       
 22252  */
       
 22253     case function_string_to_sint :
       
 22254     {
       
 22255         symbol_c *last_type_symbol = NULL;
       
 22256 
       
 22257         {
       
 22258             symbol_c *IN_type_symbol = param_data_type;
       
 22259             last_type_symbol = param_data_type;
       
 22260             
       
 22261             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22262             {
       
 22263         
       
 22264                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22265                 return return_type_symbol;
       
 22266                 
       
 22267             }
       
 22268             
       
 22269             ERROR;
       
 22270         }
       
 22271         
       
 22272     }/*function_string_to_sint*/
       
 22273     break;
       
 22274 
       
 22275 /****
       
 22276  *STRING_TO_INT
       
 22277  */
       
 22278     case function_string_to_int :
       
 22279     {
       
 22280         symbol_c *last_type_symbol = NULL;
       
 22281 
       
 22282         {
       
 22283             symbol_c *IN_type_symbol = param_data_type;
       
 22284             last_type_symbol = param_data_type;
       
 22285             
       
 22286             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22287             {
       
 22288         
       
 22289                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22290                 return return_type_symbol;
       
 22291                 
       
 22292             }
       
 22293             
       
 22294             ERROR;
       
 22295         }
       
 22296         
       
 22297     }/*function_string_to_int*/
       
 22298     break;
       
 22299 
       
 22300 /****
       
 22301  *STRING_TO_DINT
       
 22302  */
       
 22303     case function_string_to_dint :
       
 22304     {
       
 22305         symbol_c *last_type_symbol = NULL;
       
 22306 
       
 22307         {
       
 22308             symbol_c *IN_type_symbol = param_data_type;
       
 22309             last_type_symbol = param_data_type;
       
 22310             
       
 22311             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22312             {
       
 22313         
       
 22314                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22315                 return return_type_symbol;
       
 22316                 
       
 22317             }
       
 22318             
       
 22319             ERROR;
       
 22320         }
       
 22321         
       
 22322     }/*function_string_to_dint*/
       
 22323     break;
       
 22324 
       
 22325 /****
       
 22326  *STRING_TO_LINT
       
 22327  */
       
 22328     case function_string_to_lint :
       
 22329     {
       
 22330         symbol_c *last_type_symbol = NULL;
       
 22331 
       
 22332         {
       
 22333             symbol_c *IN_type_symbol = param_data_type;
       
 22334             last_type_symbol = param_data_type;
       
 22335             
       
 22336             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22337             {
       
 22338         
       
 22339                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22340                 return return_type_symbol;
       
 22341                 
       
 22342             }
       
 22343             
       
 22344             ERROR;
       
 22345         }
       
 22346         
       
 22347     }/*function_string_to_lint*/
       
 22348     break;
       
 22349 
       
 22350 /****
       
 22351  *STRING_TO_USINT
       
 22352  */
       
 22353     case function_string_to_usint :
       
 22354     {
       
 22355         symbol_c *last_type_symbol = NULL;
       
 22356 
       
 22357         {
       
 22358             symbol_c *IN_type_symbol = param_data_type;
       
 22359             last_type_symbol = param_data_type;
       
 22360             
       
 22361             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22362             {
       
 22363         
       
 22364                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22365                 return return_type_symbol;
       
 22366                 
       
 22367             }
       
 22368             
       
 22369             ERROR;
       
 22370         }
       
 22371         
       
 22372     }/*function_string_to_usint*/
       
 22373     break;
       
 22374 
       
 22375 /****
       
 22376  *STRING_TO_UINT
       
 22377  */
       
 22378     case function_string_to_uint :
       
 22379     {
       
 22380         symbol_c *last_type_symbol = NULL;
       
 22381 
       
 22382         {
       
 22383             symbol_c *IN_type_symbol = param_data_type;
       
 22384             last_type_symbol = param_data_type;
       
 22385             
       
 22386             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22387             {
       
 22388         
       
 22389                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22390                 return return_type_symbol;
       
 22391                 
       
 22392             }
       
 22393             
       
 22394             ERROR;
       
 22395         }
       
 22396         
       
 22397     }/*function_string_to_uint*/
       
 22398     break;
       
 22399 
       
 22400 /****
       
 22401  *STRING_TO_UDINT
       
 22402  */
       
 22403     case function_string_to_udint :
       
 22404     {
       
 22405         symbol_c *last_type_symbol = NULL;
       
 22406 
       
 22407         {
       
 22408             symbol_c *IN_type_symbol = param_data_type;
       
 22409             last_type_symbol = param_data_type;
       
 22410             
       
 22411             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22412             {
       
 22413         
       
 22414                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22415                 return return_type_symbol;
       
 22416                 
       
 22417             }
       
 22418             
       
 22419             ERROR;
       
 22420         }
       
 22421         
       
 22422     }/*function_string_to_udint*/
       
 22423     break;
       
 22424 
       
 22425 /****
       
 22426  *STRING_TO_ULINT
       
 22427  */
       
 22428     case function_string_to_ulint :
       
 22429     {
       
 22430         symbol_c *last_type_symbol = NULL;
       
 22431 
       
 22432         {
       
 22433             symbol_c *IN_type_symbol = param_data_type;
       
 22434             last_type_symbol = param_data_type;
       
 22435             
       
 22436             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22437             {
       
 22438         
       
 22439                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22440                 return return_type_symbol;
       
 22441                 
       
 22442             }
       
 22443             
       
 22444             ERROR;
       
 22445         }
       
 22446         
       
 22447     }/*function_string_to_ulint*/
       
 22448     break;
       
 22449 
       
 22450 /****
       
 22451  *STRING_TO_TIME
       
 22452  */
       
 22453     case function_string_to_time :
       
 22454     {
       
 22455         symbol_c *last_type_symbol = NULL;
       
 22456 
       
 22457         {
       
 22458             symbol_c *IN_type_symbol = param_data_type;
       
 22459             last_type_symbol = param_data_type;
       
 22460             
       
 22461             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22462             {
       
 22463         
       
 22464                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22465                 return return_type_symbol;
       
 22466                 
       
 22467             }
       
 22468             
       
 22469             ERROR;
       
 22470         }
       
 22471         
       
 22472     }/*function_string_to_time*/
       
 22473     break;
       
 22474 
       
 22475 /****
       
 22476  *STRING_TO_BOOL
       
 22477  */
       
 22478     case function_string_to_bool :
       
 22479     {
       
 22480         symbol_c *last_type_symbol = NULL;
       
 22481 
       
 22482         {
       
 22483             symbol_c *IN_type_symbol = param_data_type;
       
 22484             last_type_symbol = param_data_type;
       
 22485             
       
 22486             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22487             {
       
 22488         
       
 22489                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22490                 return return_type_symbol;
       
 22491                 
       
 22492             }
       
 22493             
       
 22494             ERROR;
       
 22495         }
       
 22496         
       
 22497     }/*function_string_to_bool*/
       
 22498     break;
       
 22499 
       
 22500 /****
       
 22501  *STRING_TO_BYTE
       
 22502  */
       
 22503     case function_string_to_byte :
       
 22504     {
       
 22505         symbol_c *last_type_symbol = NULL;
       
 22506 
       
 22507         {
       
 22508             symbol_c *IN_type_symbol = param_data_type;
       
 22509             last_type_symbol = param_data_type;
       
 22510             
       
 22511             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22512             {
       
 22513         
       
 22514                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22515                 return return_type_symbol;
       
 22516                 
       
 22517             }
       
 22518             
       
 22519             ERROR;
       
 22520         }
       
 22521         
       
 22522     }/*function_string_to_byte*/
       
 22523     break;
       
 22524 
       
 22525 /****
       
 22526  *STRING_TO_WORD
       
 22527  */
       
 22528     case function_string_to_word :
       
 22529     {
       
 22530         symbol_c *last_type_symbol = NULL;
       
 22531 
       
 22532         {
       
 22533             symbol_c *IN_type_symbol = param_data_type;
       
 22534             last_type_symbol = param_data_type;
       
 22535             
       
 22536             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22537             {
       
 22538         
       
 22539                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22540                 return return_type_symbol;
       
 22541                 
       
 22542             }
       
 22543             
       
 22544             ERROR;
       
 22545         }
       
 22546         
       
 22547     }/*function_string_to_word*/
       
 22548     break;
       
 22549 
       
 22550 /****
       
 22551  *STRING_TO_DWORD
       
 22552  */
       
 22553     case function_string_to_dword :
       
 22554     {
       
 22555         symbol_c *last_type_symbol = NULL;
       
 22556 
       
 22557         {
       
 22558             symbol_c *IN_type_symbol = param_data_type;
       
 22559             last_type_symbol = param_data_type;
       
 22560             
       
 22561             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22562             {
       
 22563         
       
 22564                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22565                 return return_type_symbol;
       
 22566                 
       
 22567             }
       
 22568             
       
 22569             ERROR;
       
 22570         }
       
 22571         
       
 22572     }/*function_string_to_dword*/
       
 22573     break;
       
 22574 
       
 22575 /****
       
 22576  *STRING_TO_LWORD
       
 22577  */
       
 22578     case function_string_to_lword :
       
 22579     {
       
 22580         symbol_c *last_type_symbol = NULL;
       
 22581 
       
 22582         {
       
 22583             symbol_c *IN_type_symbol = param_data_type;
       
 22584             last_type_symbol = param_data_type;
       
 22585             
       
 22586             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 17009             {
 22587             {
 17010         
 22588         
 17011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 22589                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17012                 return return_type_symbol;
 22590                 return return_type_symbol;
 17013                 
 22591                 
 17014             }
 22592             }
 17015             
 22593             
 17016             ERROR;
 22594             ERROR;
 17017         }
 22595         }
 17018         
 22596         
 17019     }/*function_lreal_to_lword*/
 22597     }/*function_string_to_lword*/
 17020     break;
 22598     break;
 17021 
 22599 
 17022 /****
 22600 /****
 17023  *LREAL_TO_STRING
 22601  *STRING_TO_DATE
 17024  */
 22602  */
 17025     case function_lreal_to_string :
 22603     case function_string_to_date :
 17026     {
 22604     {
 17027         symbol_c *last_type_symbol = NULL;
 22605         symbol_c *last_type_symbol = NULL;
 17028 
 22606 
 17029         {
 22607         {
 17030             symbol_c *IN_type_symbol = param_data_type;
 22608             symbol_c *IN_type_symbol = param_data_type;
 17031             last_type_symbol = param_data_type;
 22609             last_type_symbol = param_data_type;
 17032             
 22610             
 17033             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 22611             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22612             {
       
 22613         
       
 22614                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22615                 return return_type_symbol;
       
 22616                 
       
 22617             }
       
 22618             
       
 22619             ERROR;
       
 22620         }
       
 22621         
       
 22622     }/*function_string_to_date*/
       
 22623     break;
       
 22624 
       
 22625 /****
       
 22626  *STRING_TO_TOD
       
 22627  */
       
 22628     case function_string_to_tod :
       
 22629     {
       
 22630         symbol_c *last_type_symbol = NULL;
       
 22631 
       
 22632         {
       
 22633             symbol_c *IN_type_symbol = param_data_type;
       
 22634             last_type_symbol = param_data_type;
       
 22635             
       
 22636             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22637             {
       
 22638         
       
 22639                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22640                 return return_type_symbol;
       
 22641                 
       
 22642             }
       
 22643             
       
 22644             ERROR;
       
 22645         }
       
 22646         
       
 22647     }/*function_string_to_tod*/
       
 22648     break;
       
 22649 
       
 22650 /****
       
 22651  *STRING_TO_DT
       
 22652  */
       
 22653     case function_string_to_dt :
       
 22654     {
       
 22655         symbol_c *last_type_symbol = NULL;
       
 22656 
       
 22657         {
       
 22658             symbol_c *IN_type_symbol = param_data_type;
       
 22659             last_type_symbol = param_data_type;
       
 22660             
       
 22661             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 22662             {
       
 22663         
       
 22664                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22665                 return return_type_symbol;
       
 22666                 
       
 22667             }
       
 22668             
       
 22669             ERROR;
       
 22670         }
       
 22671         
       
 22672     }/*function_string_to_dt*/
       
 22673     break;
       
 22674 
       
 22675 /****
       
 22676  *DATE_TO_REAL
       
 22677  */
       
 22678     case function_date_to_real :
       
 22679     {
       
 22680         symbol_c *last_type_symbol = NULL;
       
 22681 
       
 22682         {
       
 22683             symbol_c *IN_type_symbol = param_data_type;
       
 22684             last_type_symbol = param_data_type;
       
 22685             
       
 22686             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22687             {
       
 22688         
       
 22689                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22690                 return return_type_symbol;
       
 22691                 
       
 22692             }
       
 22693             
       
 22694             ERROR;
       
 22695         }
       
 22696         
       
 22697     }/*function_date_to_real*/
       
 22698     break;
       
 22699 
       
 22700 /****
       
 22701  *DATE_TO_LREAL
       
 22702  */
       
 22703     case function_date_to_lreal :
       
 22704     {
       
 22705         symbol_c *last_type_symbol = NULL;
       
 22706 
       
 22707         {
       
 22708             symbol_c *IN_type_symbol = param_data_type;
       
 22709             last_type_symbol = param_data_type;
       
 22710             
       
 22711             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22712             {
       
 22713         
       
 22714                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22715                 return return_type_symbol;
       
 22716                 
       
 22717             }
       
 22718             
       
 22719             ERROR;
       
 22720         }
       
 22721         
       
 22722     }/*function_date_to_lreal*/
       
 22723     break;
       
 22724 
       
 22725 /****
       
 22726  *DATE_TO_SINT
       
 22727  */
       
 22728     case function_date_to_sint :
       
 22729     {
       
 22730         symbol_c *last_type_symbol = NULL;
       
 22731 
       
 22732         {
       
 22733             symbol_c *IN_type_symbol = param_data_type;
       
 22734             last_type_symbol = param_data_type;
       
 22735             
       
 22736             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22737             {
       
 22738         
       
 22739                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22740                 return return_type_symbol;
       
 22741                 
       
 22742             }
       
 22743             
       
 22744             ERROR;
       
 22745         }
       
 22746         
       
 22747     }/*function_date_to_sint*/
       
 22748     break;
       
 22749 
       
 22750 /****
       
 22751  *DATE_TO_INT
       
 22752  */
       
 22753     case function_date_to_int :
       
 22754     {
       
 22755         symbol_c *last_type_symbol = NULL;
       
 22756 
       
 22757         {
       
 22758             symbol_c *IN_type_symbol = param_data_type;
       
 22759             last_type_symbol = param_data_type;
       
 22760             
       
 22761             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22762             {
       
 22763         
       
 22764                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22765                 return return_type_symbol;
       
 22766                 
       
 22767             }
       
 22768             
       
 22769             ERROR;
       
 22770         }
       
 22771         
       
 22772     }/*function_date_to_int*/
       
 22773     break;
       
 22774 
       
 22775 /****
       
 22776  *DATE_TO_DINT
       
 22777  */
       
 22778     case function_date_to_dint :
       
 22779     {
       
 22780         symbol_c *last_type_symbol = NULL;
       
 22781 
       
 22782         {
       
 22783             symbol_c *IN_type_symbol = param_data_type;
       
 22784             last_type_symbol = param_data_type;
       
 22785             
       
 22786             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22787             {
       
 22788         
       
 22789                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22790                 return return_type_symbol;
       
 22791                 
       
 22792             }
       
 22793             
       
 22794             ERROR;
       
 22795         }
       
 22796         
       
 22797     }/*function_date_to_dint*/
       
 22798     break;
       
 22799 
       
 22800 /****
       
 22801  *DATE_TO_LINT
       
 22802  */
       
 22803     case function_date_to_lint :
       
 22804     {
       
 22805         symbol_c *last_type_symbol = NULL;
       
 22806 
       
 22807         {
       
 22808             symbol_c *IN_type_symbol = param_data_type;
       
 22809             last_type_symbol = param_data_type;
       
 22810             
       
 22811             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22812             {
       
 22813         
       
 22814                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22815                 return return_type_symbol;
       
 22816                 
       
 22817             }
       
 22818             
       
 22819             ERROR;
       
 22820         }
       
 22821         
       
 22822     }/*function_date_to_lint*/
       
 22823     break;
       
 22824 
       
 22825 /****
       
 22826  *DATE_TO_USINT
       
 22827  */
       
 22828     case function_date_to_usint :
       
 22829     {
       
 22830         symbol_c *last_type_symbol = NULL;
       
 22831 
       
 22832         {
       
 22833             symbol_c *IN_type_symbol = param_data_type;
       
 22834             last_type_symbol = param_data_type;
       
 22835             
       
 22836             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22837             {
       
 22838         
       
 22839                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22840                 return return_type_symbol;
       
 22841                 
       
 22842             }
       
 22843             
       
 22844             ERROR;
       
 22845         }
       
 22846         
       
 22847     }/*function_date_to_usint*/
       
 22848     break;
       
 22849 
       
 22850 /****
       
 22851  *DATE_TO_UINT
       
 22852  */
       
 22853     case function_date_to_uint :
       
 22854     {
       
 22855         symbol_c *last_type_symbol = NULL;
       
 22856 
       
 22857         {
       
 22858             symbol_c *IN_type_symbol = param_data_type;
       
 22859             last_type_symbol = param_data_type;
       
 22860             
       
 22861             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22862             {
       
 22863         
       
 22864                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22865                 return return_type_symbol;
       
 22866                 
       
 22867             }
       
 22868             
       
 22869             ERROR;
       
 22870         }
       
 22871         
       
 22872     }/*function_date_to_uint*/
       
 22873     break;
       
 22874 
       
 22875 /****
       
 22876  *DATE_TO_UDINT
       
 22877  */
       
 22878     case function_date_to_udint :
       
 22879     {
       
 22880         symbol_c *last_type_symbol = NULL;
       
 22881 
       
 22882         {
       
 22883             symbol_c *IN_type_symbol = param_data_type;
       
 22884             last_type_symbol = param_data_type;
       
 22885             
       
 22886             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22887             {
       
 22888         
       
 22889                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22890                 return return_type_symbol;
       
 22891                 
       
 22892             }
       
 22893             
       
 22894             ERROR;
       
 22895         }
       
 22896         
       
 22897     }/*function_date_to_udint*/
       
 22898     break;
       
 22899 
       
 22900 /****
       
 22901  *DATE_TO_ULINT
       
 22902  */
       
 22903     case function_date_to_ulint :
       
 22904     {
       
 22905         symbol_c *last_type_symbol = NULL;
       
 22906 
       
 22907         {
       
 22908             symbol_c *IN_type_symbol = param_data_type;
       
 22909             last_type_symbol = param_data_type;
       
 22910             
       
 22911             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22912             {
       
 22913         
       
 22914                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22915                 return return_type_symbol;
       
 22916                 
       
 22917             }
       
 22918             
       
 22919             ERROR;
       
 22920         }
       
 22921         
       
 22922     }/*function_date_to_ulint*/
       
 22923     break;
       
 22924 
       
 22925 /****
       
 22926  *DATE_TO_BOOL
       
 22927  */
       
 22928     case function_date_to_bool :
       
 22929     {
       
 22930         symbol_c *last_type_symbol = NULL;
       
 22931 
       
 22932         {
       
 22933             symbol_c *IN_type_symbol = param_data_type;
       
 22934             last_type_symbol = param_data_type;
       
 22935             
       
 22936             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22937             {
       
 22938         
       
 22939                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22940                 return return_type_symbol;
       
 22941                 
       
 22942             }
       
 22943             
       
 22944             ERROR;
       
 22945         }
       
 22946         
       
 22947     }/*function_date_to_bool*/
       
 22948     break;
       
 22949 
       
 22950 /****
       
 22951  *DATE_TO_BYTE
       
 22952  */
       
 22953     case function_date_to_byte :
       
 22954     {
       
 22955         symbol_c *last_type_symbol = NULL;
       
 22956 
       
 22957         {
       
 22958             symbol_c *IN_type_symbol = param_data_type;
       
 22959             last_type_symbol = param_data_type;
       
 22960             
       
 22961             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22962             {
       
 22963         
       
 22964                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22965                 return return_type_symbol;
       
 22966                 
       
 22967             }
       
 22968             
       
 22969             ERROR;
       
 22970         }
       
 22971         
       
 22972     }/*function_date_to_byte*/
       
 22973     break;
       
 22974 
       
 22975 /****
       
 22976  *DATE_TO_WORD
       
 22977  */
       
 22978     case function_date_to_word :
       
 22979     {
       
 22980         symbol_c *last_type_symbol = NULL;
       
 22981 
       
 22982         {
       
 22983             symbol_c *IN_type_symbol = param_data_type;
       
 22984             last_type_symbol = param_data_type;
       
 22985             
       
 22986             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 22987             {
       
 22988         
       
 22989                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22990                 return return_type_symbol;
       
 22991                 
       
 22992             }
       
 22993             
       
 22994             ERROR;
       
 22995         }
       
 22996         
       
 22997     }/*function_date_to_word*/
       
 22998     break;
       
 22999 
       
 23000 /****
       
 23001  *DATE_TO_DWORD
       
 23002  */
       
 23003     case function_date_to_dword :
       
 23004     {
       
 23005         symbol_c *last_type_symbol = NULL;
       
 23006 
       
 23007         {
       
 23008             symbol_c *IN_type_symbol = param_data_type;
       
 23009             last_type_symbol = param_data_type;
       
 23010             
       
 23011             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 23012             {
       
 23013         
       
 23014                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23015                 return return_type_symbol;
       
 23016                 
       
 23017             }
       
 23018             
       
 23019             ERROR;
       
 23020         }
       
 23021         
       
 23022     }/*function_date_to_dword*/
       
 23023     break;
       
 23024 
       
 23025 /****
       
 23026  *DATE_TO_LWORD
       
 23027  */
       
 23028     case function_date_to_lword :
       
 23029     {
       
 23030         symbol_c *last_type_symbol = NULL;
       
 23031 
       
 23032         {
       
 23033             symbol_c *IN_type_symbol = param_data_type;
       
 23034             last_type_symbol = param_data_type;
       
 23035             
       
 23036             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 23037             {
       
 23038         
       
 23039                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23040                 return return_type_symbol;
       
 23041                 
       
 23042             }
       
 23043             
       
 23044             ERROR;
       
 23045         }
       
 23046         
       
 23047     }/*function_date_to_lword*/
       
 23048     break;
       
 23049 
       
 23050 /****
       
 23051  *DATE_TO_STRING
       
 23052  */
       
 23053     case function_date_to_string :
       
 23054     {
       
 23055         symbol_c *last_type_symbol = NULL;
       
 23056 
       
 23057         {
       
 23058             symbol_c *IN_type_symbol = param_data_type;
       
 23059             last_type_symbol = param_data_type;
       
 23060             
       
 23061             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 17034             {
 23062             {
 17035         
 23063         
 17036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 23064                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17037                 return return_type_symbol;
 23065                 return return_type_symbol;
 17038                 
 23066                 
 17039             }
 23067             }
 17040             
 23068             
 17041             ERROR;
 23069             ERROR;
 17042         }
 23070         }
 17043         
 23071         
 17044     }/*function_lreal_to_string*/
 23072     }/*function_date_to_string*/
 17045     break;
 23073     break;
 17046 
 23074 
 17047 /****
 23075 /****
 17048  *LREAL_TO_WSTRING
 23076  *TOD_TO_REAL
 17049  */
 23077  */
 17050     case function_lreal_to_wstring :
 23078     case function_tod_to_real :
 17051     {
 23079     {
 17052         symbol_c *last_type_symbol = NULL;
 23080         symbol_c *last_type_symbol = NULL;
 17053 
 23081 
 17054         {
 23082         {
 17055             symbol_c *IN_type_symbol = param_data_type;
 23083             symbol_c *IN_type_symbol = param_data_type;
 17056             last_type_symbol = param_data_type;
 23084             last_type_symbol = param_data_type;
 17057             
 23085             
 17058             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 23086             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17059             {
       
 17060         
       
 17061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 17062                 return return_type_symbol;
       
 17063                 
       
 17064             }
       
 17065             
       
 17066             ERROR;
       
 17067         }
       
 17068         
       
 17069     }/*function_lreal_to_wstring*/
       
 17070     break;
       
 17071 
       
 17072 /****
       
 17073  *LREAL_TO_DATE
       
 17074  */
       
 17075     case function_lreal_to_date :
       
 17076     {
       
 17077         symbol_c *last_type_symbol = NULL;
       
 17078 
       
 17079         {
       
 17080             symbol_c *IN_type_symbol = param_data_type;
       
 17081             last_type_symbol = param_data_type;
       
 17082             
       
 17083             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 17084             {
       
 17085         
       
 17086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17087                 return return_type_symbol;
       
 17088                 
       
 17089             }
       
 17090             
       
 17091             ERROR;
       
 17092         }
       
 17093         
       
 17094     }/*function_lreal_to_date*/
       
 17095     break;
       
 17096 
       
 17097 /****
       
 17098  *LREAL_TO_TOD
       
 17099  */
       
 17100     case function_lreal_to_tod :
       
 17101     {
       
 17102         symbol_c *last_type_symbol = NULL;
       
 17103 
       
 17104         {
       
 17105             symbol_c *IN_type_symbol = param_data_type;
       
 17106             last_type_symbol = param_data_type;
       
 17107             
       
 17108             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 17109             {
       
 17110         
       
 17111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17112                 return return_type_symbol;
       
 17113                 
       
 17114             }
       
 17115             
       
 17116             ERROR;
       
 17117         }
       
 17118         
       
 17119     }/*function_lreal_to_tod*/
       
 17120     break;
       
 17121 
       
 17122 /****
       
 17123  *LREAL_TO_DT
       
 17124  */
       
 17125     case function_lreal_to_dt :
       
 17126     {
       
 17127         symbol_c *last_type_symbol = NULL;
       
 17128 
       
 17129         {
       
 17130             symbol_c *IN_type_symbol = param_data_type;
       
 17131             last_type_symbol = param_data_type;
       
 17132             
       
 17133             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
       
 17134             {
       
 17135         
       
 17136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17137                 return return_type_symbol;
       
 17138                 
       
 17139             }
       
 17140             
       
 17141             ERROR;
       
 17142         }
       
 17143         
       
 17144     }/*function_lreal_to_dt*/
       
 17145     break;
       
 17146 
       
 17147 /****
       
 17148  *SINT_TO_REAL
       
 17149  */
       
 17150     case function_sint_to_real :
       
 17151     {
       
 17152         symbol_c *last_type_symbol = NULL;
       
 17153 
       
 17154         {
       
 17155             symbol_c *IN_type_symbol = param_data_type;
       
 17156             last_type_symbol = param_data_type;
       
 17157             
       
 17158             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17159             {
 23087             {
 17160         
 23088         
 17161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 23089                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17162                 return return_type_symbol;
 23090                 return return_type_symbol;
 17163                 
 23091                 
 17164             }
 23092             }
 17165             
 23093             
 17166             ERROR;
 23094             ERROR;
 17167         }
 23095         }
 17168         
 23096         
 17169     }/*function_sint_to_real*/
 23097     }/*function_tod_to_real*/
 17170     break;
 23098     break;
 17171 
 23099 
 17172 /****
 23100 /****
 17173  *SINT_TO_LREAL
 23101  *TOD_TO_LREAL
 17174  */
 23102  */
 17175     case function_sint_to_lreal :
 23103     case function_tod_to_lreal :
 17176     {
 23104     {
 17177         symbol_c *last_type_symbol = NULL;
 23105         symbol_c *last_type_symbol = NULL;
 17178 
 23106 
 17179         {
 23107         {
 17180             symbol_c *IN_type_symbol = param_data_type;
 23108             symbol_c *IN_type_symbol = param_data_type;
 17181             last_type_symbol = param_data_type;
 23109             last_type_symbol = param_data_type;
 17182             
 23110             
 17183             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23111             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17184             {
 23112             {
 17185         
 23113         
 17186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 23114                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17187                 return return_type_symbol;
 23115                 return return_type_symbol;
 17188                 
 23116                 
 17189             }
 23117             }
 17190             
 23118             
 17191             ERROR;
 23119             ERROR;
 17192         }
 23120         }
 17193         
 23121         
 17194     }/*function_sint_to_lreal*/
 23122     }/*function_tod_to_lreal*/
 17195     break;
 23123     break;
 17196 
 23124 
 17197 /****
 23125 /****
 17198  *SINT_TO_INT
 23126  *TOD_TO_SINT
 17199  */
 23127  */
 17200     case function_sint_to_int :
 23128     case function_tod_to_sint :
 17201     {
 23129     {
 17202         symbol_c *last_type_symbol = NULL;
 23130         symbol_c *last_type_symbol = NULL;
 17203 
 23131 
 17204         {
 23132         {
 17205             symbol_c *IN_type_symbol = param_data_type;
 23133             symbol_c *IN_type_symbol = param_data_type;
 17206             last_type_symbol = param_data_type;
 23134             last_type_symbol = param_data_type;
 17207             
 23135             
 17208             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23136             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 23137             {
       
 23138         
       
 23139                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23140                 return return_type_symbol;
       
 23141                 
       
 23142             }
       
 23143             
       
 23144             ERROR;
       
 23145         }
       
 23146         
       
 23147     }/*function_tod_to_sint*/
       
 23148     break;
       
 23149 
       
 23150 /****
       
 23151  *TOD_TO_INT
       
 23152  */
       
 23153     case function_tod_to_int :
       
 23154     {
       
 23155         symbol_c *last_type_symbol = NULL;
       
 23156 
       
 23157         {
       
 23158             symbol_c *IN_type_symbol = param_data_type;
       
 23159             last_type_symbol = param_data_type;
       
 23160             
       
 23161             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17209             {
 23162             {
 17210         
 23163         
 17211                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 23164                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17212                 return return_type_symbol;
 23165                 return return_type_symbol;
 17213                 
 23166                 
 17214             }
 23167             }
 17215             
 23168             
 17216             ERROR;
 23169             ERROR;
 17217         }
 23170         }
 17218         
 23171         
 17219     }/*function_sint_to_int*/
 23172     }/*function_tod_to_int*/
 17220     break;
 23173     break;
 17221 
 23174 
 17222 /****
 23175 /****
 17223  *SINT_TO_DINT
 23176  *TOD_TO_DINT
 17224  */
 23177  */
 17225     case function_sint_to_dint :
 23178     case function_tod_to_dint :
 17226     {
 23179     {
 17227         symbol_c *last_type_symbol = NULL;
 23180         symbol_c *last_type_symbol = NULL;
 17228 
 23181 
 17229         {
 23182         {
 17230             symbol_c *IN_type_symbol = param_data_type;
 23183             symbol_c *IN_type_symbol = param_data_type;
 17231             last_type_symbol = param_data_type;
 23184             last_type_symbol = param_data_type;
 17232             
 23185             
 17233             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23186             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17234             {
 23187             {
 17235         
 23188         
 17236                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 23189                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17237                 return return_type_symbol;
 23190                 return return_type_symbol;
 17238                 
 23191                 
 17239             }
 23192             }
 17240             
 23193             
 17241             ERROR;
 23194             ERROR;
 17242         }
 23195         }
 17243         
 23196         
 17244     }/*function_sint_to_dint*/
 23197     }/*function_tod_to_dint*/
 17245     break;
 23198     break;
 17246 
 23199 
 17247 /****
 23200 /****
 17248  *SINT_TO_LINT
 23201  *TOD_TO_LINT
 17249  */
 23202  */
 17250     case function_sint_to_lint :
 23203     case function_tod_to_lint :
 17251     {
 23204     {
 17252         symbol_c *last_type_symbol = NULL;
 23205         symbol_c *last_type_symbol = NULL;
 17253 
 23206 
 17254         {
 23207         {
 17255             symbol_c *IN_type_symbol = param_data_type;
 23208             symbol_c *IN_type_symbol = param_data_type;
 17256             last_type_symbol = param_data_type;
 23209             last_type_symbol = param_data_type;
 17257             
 23210             
 17258             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23211             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17259             {
 23212             {
 17260         
 23213         
 17261                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 23214                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17262                 return return_type_symbol;
 23215                 return return_type_symbol;
 17263                 
 23216                 
 17264             }
 23217             }
 17265             
 23218             
 17266             ERROR;
 23219             ERROR;
 17267         }
 23220         }
 17268         
 23221         
 17269     }/*function_sint_to_lint*/
 23222     }/*function_tod_to_lint*/
 17270     break;
 23223     break;
 17271 
 23224 
 17272 /****
 23225 /****
 17273  *SINT_TO_USINT
 23226  *TOD_TO_USINT
 17274  */
 23227  */
 17275     case function_sint_to_usint :
 23228     case function_tod_to_usint :
 17276     {
 23229     {
 17277         symbol_c *last_type_symbol = NULL;
 23230         symbol_c *last_type_symbol = NULL;
 17278 
 23231 
 17279         {
 23232         {
 17280             symbol_c *IN_type_symbol = param_data_type;
 23233             symbol_c *IN_type_symbol = param_data_type;
 17281             last_type_symbol = param_data_type;
 23234             last_type_symbol = param_data_type;
 17282             
 23235             
 17283             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23236             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17284             {
 23237             {
 17285         
 23238         
 17286                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 23239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 17287                 return return_type_symbol;
 23240                 return return_type_symbol;
 17288                 
 23241                 
 17289             }
 23242             }
 17290             
 23243             
 17291             ERROR;
 23244             ERROR;
 17292         }
 23245         }
 17293         
 23246         
 17294     }/*function_sint_to_usint*/
 23247     }/*function_tod_to_usint*/
 17295     break;
 23248     break;
 17296 
 23249 
 17297 /****
 23250 /****
 17298  *SINT_TO_UINT
 23251  *TOD_TO_UINT
 17299  */
 23252  */
 17300     case function_sint_to_uint :
 23253     case function_tod_to_uint :
 17301     {
 23254     {
 17302         symbol_c *last_type_symbol = NULL;
 23255         symbol_c *last_type_symbol = NULL;
 17303 
 23256 
 17304         {
 23257         {
 17305             symbol_c *IN_type_symbol = param_data_type;
 23258             symbol_c *IN_type_symbol = param_data_type;
 17306             last_type_symbol = param_data_type;
 23259             last_type_symbol = param_data_type;
 17307             
 23260             
 17308             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23261             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17309             {
 23262             {
 17310         
 23263         
 17311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 23264                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 17312                 return return_type_symbol;
 23265                 return return_type_symbol;
 17313                 
 23266                 
 17314             }
 23267             }
 17315             
 23268             
 17316             ERROR;
 23269             ERROR;
 17317         }
 23270         }
 17318         
 23271         
 17319     }/*function_sint_to_uint*/
 23272     }/*function_tod_to_uint*/
 17320     break;
 23273     break;
 17321 
 23274 
 17322 /****
 23275 /****
 17323  *SINT_TO_UDINT
 23276  *TOD_TO_UDINT
 17324  */
 23277  */
 17325     case function_sint_to_udint :
 23278     case function_tod_to_udint :
 17326     {
 23279     {
 17327         symbol_c *last_type_symbol = NULL;
 23280         symbol_c *last_type_symbol = NULL;
 17328 
 23281 
 17329         {
 23282         {
 17330             symbol_c *IN_type_symbol = param_data_type;
 23283             symbol_c *IN_type_symbol = param_data_type;
 17331             last_type_symbol = param_data_type;
 23284             last_type_symbol = param_data_type;
 17332             
 23285             
 17333             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23286             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17334             {
 23287             {
 17335         
 23288         
 17336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 23289                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17337                 return return_type_symbol;
 23290                 return return_type_symbol;
 17338                 
 23291                 
 17339             }
 23292             }
 17340             
 23293             
 17341             ERROR;
 23294             ERROR;
 17342         }
 23295         }
 17343         
 23296         
 17344     }/*function_sint_to_udint*/
 23297     }/*function_tod_to_udint*/
 17345     break;
 23298     break;
 17346 
 23299 
 17347 /****
 23300 /****
 17348  *SINT_TO_ULINT
 23301  *TOD_TO_ULINT
 17349  */
 23302  */
 17350     case function_sint_to_ulint :
 23303     case function_tod_to_ulint :
 17351     {
 23304     {
 17352         symbol_c *last_type_symbol = NULL;
 23305         symbol_c *last_type_symbol = NULL;
 17353 
 23306 
 17354         {
 23307         {
 17355             symbol_c *IN_type_symbol = param_data_type;
 23308             symbol_c *IN_type_symbol = param_data_type;
 17356             last_type_symbol = param_data_type;
 23309             last_type_symbol = param_data_type;
 17357             
 23310             
 17358             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23311             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17359             {
 23312             {
 17360         
 23313         
 17361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 23314                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17362                 return return_type_symbol;
 23315                 return return_type_symbol;
 17363                 
 23316                 
 17364             }
 23317             }
 17365             
 23318             
 17366             ERROR;
 23319             ERROR;
 17367         }
 23320         }
 17368         
 23321         
 17369     }/*function_sint_to_ulint*/
 23322     }/*function_tod_to_ulint*/
 17370     break;
 23323     break;
 17371 
 23324 
 17372 /****
 23325 /****
 17373  *SINT_TO_TIME
 23326  *TOD_TO_BOOL
 17374  */
 23327  */
 17375     case function_sint_to_time :
 23328     case function_tod_to_bool :
 17376     {
 23329     {
 17377         symbol_c *last_type_symbol = NULL;
 23330         symbol_c *last_type_symbol = NULL;
 17378 
 23331 
 17379         {
 23332         {
 17380             symbol_c *IN_type_symbol = param_data_type;
 23333             symbol_c *IN_type_symbol = param_data_type;
 17381             last_type_symbol = param_data_type;
 23334             last_type_symbol = param_data_type;
 17382             
 23335             
 17383             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23336             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17384             {
       
 17385         
       
 17386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17387                 return return_type_symbol;
       
 17388                 
       
 17389             }
       
 17390             
       
 17391             ERROR;
       
 17392         }
       
 17393         
       
 17394     }/*function_sint_to_time*/
       
 17395     break;
       
 17396 
       
 17397 /****
       
 17398  *SINT_TO_BOOL
       
 17399  */
       
 17400     case function_sint_to_bool :
       
 17401     {
       
 17402         symbol_c *last_type_symbol = NULL;
       
 17403 
       
 17404         {
       
 17405             symbol_c *IN_type_symbol = param_data_type;
       
 17406             last_type_symbol = param_data_type;
       
 17407             
       
 17408             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17409             {
 23337             {
 17410         
 23338         
 17411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 23339                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17412                 return return_type_symbol;
 23340                 return return_type_symbol;
 17413                 
 23341                 
 17414             }
 23342             }
 17415             
 23343             
 17416             ERROR;
 23344             ERROR;
 17417         }
 23345         }
 17418         
 23346         
 17419     }/*function_sint_to_bool*/
 23347     }/*function_tod_to_bool*/
 17420     break;
 23348     break;
 17421 
 23349 
 17422 /****
 23350 /****
 17423  *SINT_TO_BYTE
 23351  *TOD_TO_BYTE
 17424  */
 23352  */
 17425     case function_sint_to_byte :
 23353     case function_tod_to_byte :
 17426     {
 23354     {
 17427         symbol_c *last_type_symbol = NULL;
 23355         symbol_c *last_type_symbol = NULL;
 17428 
 23356 
 17429         {
 23357         {
 17430             symbol_c *IN_type_symbol = param_data_type;
 23358             symbol_c *IN_type_symbol = param_data_type;
 17431             last_type_symbol = param_data_type;
 23359             last_type_symbol = param_data_type;
 17432             
 23360             
 17433             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23361             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17434             {
 23362             {
 17435         
 23363         
 17436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 23364                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17437                 return return_type_symbol;
 23365                 return return_type_symbol;
 17438                 
 23366                 
 17439             }
 23367             }
 17440             
 23368             
 17441             ERROR;
 23369             ERROR;
 17442         }
 23370         }
 17443         
 23371         
 17444     }/*function_sint_to_byte*/
 23372     }/*function_tod_to_byte*/
 17445     break;
 23373     break;
 17446 
 23374 
 17447 /****
 23375 /****
 17448  *SINT_TO_WORD
 23376  *TOD_TO_WORD
 17449  */
 23377  */
 17450     case function_sint_to_word :
 23378     case function_tod_to_word :
 17451     {
 23379     {
 17452         symbol_c *last_type_symbol = NULL;
 23380         symbol_c *last_type_symbol = NULL;
 17453 
 23381 
 17454         {
 23382         {
 17455             symbol_c *IN_type_symbol = param_data_type;
 23383             symbol_c *IN_type_symbol = param_data_type;
 17456             last_type_symbol = param_data_type;
 23384             last_type_symbol = param_data_type;
 17457             
 23385             
 17458             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23386             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17459             {
 23387             {
 17460         
 23388         
 17461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 23389                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17462                 return return_type_symbol;
 23390                 return return_type_symbol;
 17463                 
 23391                 
 17464             }
 23392             }
 17465             
 23393             
 17466             ERROR;
 23394             ERROR;
 17467         }
 23395         }
 17468         
 23396         
 17469     }/*function_sint_to_word*/
 23397     }/*function_tod_to_word*/
 17470     break;
 23398     break;
 17471 
 23399 
 17472 /****
 23400 /****
 17473  *SINT_TO_DWORD
 23401  *TOD_TO_DWORD
 17474  */
 23402  */
 17475     case function_sint_to_dword :
 23403     case function_tod_to_dword :
 17476     {
 23404     {
 17477         symbol_c *last_type_symbol = NULL;
 23405         symbol_c *last_type_symbol = NULL;
 17478 
 23406 
 17479         {
 23407         {
 17480             symbol_c *IN_type_symbol = param_data_type;
 23408             symbol_c *IN_type_symbol = param_data_type;
 17481             last_type_symbol = param_data_type;
 23409             last_type_symbol = param_data_type;
 17482             
 23410             
 17483             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23411             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17484             {
 23412             {
 17485         
 23413         
 17486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 23414                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17487                 return return_type_symbol;
 23415                 return return_type_symbol;
 17488                 
 23416                 
 17489             }
 23417             }
 17490             
 23418             
 17491             ERROR;
 23419             ERROR;
 17492         }
 23420         }
 17493         
 23421         
 17494     }/*function_sint_to_dword*/
 23422     }/*function_tod_to_dword*/
 17495     break;
 23423     break;
 17496 
 23424 
 17497 /****
 23425 /****
 17498  *SINT_TO_LWORD
 23426  *TOD_TO_LWORD
 17499  */
 23427  */
 17500     case function_sint_to_lword :
 23428     case function_tod_to_lword :
 17501     {
 23429     {
 17502         symbol_c *last_type_symbol = NULL;
 23430         symbol_c *last_type_symbol = NULL;
 17503 
 23431 
 17504         {
 23432         {
 17505             symbol_c *IN_type_symbol = param_data_type;
 23433             symbol_c *IN_type_symbol = param_data_type;
 17506             last_type_symbol = param_data_type;
 23434             last_type_symbol = param_data_type;
 17507             
 23435             
 17508             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23436             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17509             {
 23437             {
 17510         
 23438         
 17511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 23439                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17512                 return return_type_symbol;
 23440                 return return_type_symbol;
 17513                 
 23441                 
 17514             }
 23442             }
 17515             
 23443             
 17516             ERROR;
 23444             ERROR;
 17517         }
 23445         }
 17518         
 23446         
 17519     }/*function_sint_to_lword*/
 23447     }/*function_tod_to_lword*/
 17520     break;
 23448     break;
 17521 
 23449 
 17522 /****
 23450 /****
 17523  *SINT_TO_STRING
 23451  *TOD_TO_STRING
 17524  */
 23452  */
 17525     case function_sint_to_string :
 23453     case function_tod_to_string :
 17526     {
 23454     {
 17527         symbol_c *last_type_symbol = NULL;
 23455         symbol_c *last_type_symbol = NULL;
 17528 
 23456 
 17529         {
 23457         {
 17530             symbol_c *IN_type_symbol = param_data_type;
 23458             symbol_c *IN_type_symbol = param_data_type;
 17531             last_type_symbol = param_data_type;
 23459             last_type_symbol = param_data_type;
 17532             
 23460             
 17533             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23461             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 17534             {
 23462             {
 17535         
 23463         
 17536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 23464                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17537                 return return_type_symbol;
 23465                 return return_type_symbol;
 17538                 
 23466                 
 17539             }
 23467             }
 17540             
 23468             
 17541             ERROR;
 23469             ERROR;
 17542         }
 23470         }
 17543         
 23471         
 17544     }/*function_sint_to_string*/
 23472     }/*function_tod_to_string*/
 17545     break;
 23473     break;
 17546 
 23474 
 17547 /****
 23475 /****
 17548  *SINT_TO_WSTRING
 23476  *DT_TO_REAL
 17549  */
 23477  */
 17550     case function_sint_to_wstring :
 23478     case function_dt_to_real :
 17551     {
 23479     {
 17552         symbol_c *last_type_symbol = NULL;
 23480         symbol_c *last_type_symbol = NULL;
 17553 
 23481 
 17554         {
 23482         {
 17555             symbol_c *IN_type_symbol = param_data_type;
 23483             symbol_c *IN_type_symbol = param_data_type;
 17556             last_type_symbol = param_data_type;
 23484             last_type_symbol = param_data_type;
 17557             
 23485             
 17558             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 23486             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17559             {
       
 17560         
       
 17561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 17562                 return return_type_symbol;
       
 17563                 
       
 17564             }
       
 17565             
       
 17566             ERROR;
       
 17567         }
       
 17568         
       
 17569     }/*function_sint_to_wstring*/
       
 17570     break;
       
 17571 
       
 17572 /****
       
 17573  *SINT_TO_DATE
       
 17574  */
       
 17575     case function_sint_to_date :
       
 17576     {
       
 17577         symbol_c *last_type_symbol = NULL;
       
 17578 
       
 17579         {
       
 17580             symbol_c *IN_type_symbol = param_data_type;
       
 17581             last_type_symbol = param_data_type;
       
 17582             
       
 17583             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17584             {
       
 17585         
       
 17586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17587                 return return_type_symbol;
       
 17588                 
       
 17589             }
       
 17590             
       
 17591             ERROR;
       
 17592         }
       
 17593         
       
 17594     }/*function_sint_to_date*/
       
 17595     break;
       
 17596 
       
 17597 /****
       
 17598  *SINT_TO_TOD
       
 17599  */
       
 17600     case function_sint_to_tod :
       
 17601     {
       
 17602         symbol_c *last_type_symbol = NULL;
       
 17603 
       
 17604         {
       
 17605             symbol_c *IN_type_symbol = param_data_type;
       
 17606             last_type_symbol = param_data_type;
       
 17607             
       
 17608             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17609             {
       
 17610         
       
 17611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17612                 return return_type_symbol;
       
 17613                 
       
 17614             }
       
 17615             
       
 17616             ERROR;
       
 17617         }
       
 17618         
       
 17619     }/*function_sint_to_tod*/
       
 17620     break;
       
 17621 
       
 17622 /****
       
 17623  *SINT_TO_DT
       
 17624  */
       
 17625     case function_sint_to_dt :
       
 17626     {
       
 17627         symbol_c *last_type_symbol = NULL;
       
 17628 
       
 17629         {
       
 17630             symbol_c *IN_type_symbol = param_data_type;
       
 17631             last_type_symbol = param_data_type;
       
 17632             
       
 17633             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 17634             {
       
 17635         
       
 17636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17637                 return return_type_symbol;
       
 17638                 
       
 17639             }
       
 17640             
       
 17641             ERROR;
       
 17642         }
       
 17643         
       
 17644     }/*function_sint_to_dt*/
       
 17645     break;
       
 17646 
       
 17647 /****
       
 17648  *INT_TO_REAL
       
 17649  */
       
 17650     case function_int_to_real :
       
 17651     {
       
 17652         symbol_c *last_type_symbol = NULL;
       
 17653 
       
 17654         {
       
 17655             symbol_c *IN_type_symbol = param_data_type;
       
 17656             last_type_symbol = param_data_type;
       
 17657             
       
 17658             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 17659             {
 23487             {
 17660         
 23488         
 17661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 23489                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17662                 return return_type_symbol;
 23490                 return return_type_symbol;
 17663                 
 23491                 
 17664             }
 23492             }
 17665             
 23493             
 17666             ERROR;
 23494             ERROR;
 17667         }
 23495         }
 17668         
 23496         
 17669     }/*function_int_to_real*/
 23497     }/*function_dt_to_real*/
 17670     break;
 23498     break;
 17671 
 23499 
 17672 /****
 23500 /****
 17673  *INT_TO_LREAL
 23501  *DT_TO_LREAL
 17674  */
 23502  */
 17675     case function_int_to_lreal :
 23503     case function_dt_to_lreal :
 17676     {
 23504     {
 17677         symbol_c *last_type_symbol = NULL;
 23505         symbol_c *last_type_symbol = NULL;
 17678 
 23506 
 17679         {
 23507         {
 17680             symbol_c *IN_type_symbol = param_data_type;
 23508             symbol_c *IN_type_symbol = param_data_type;
 17681             last_type_symbol = param_data_type;
 23509             last_type_symbol = param_data_type;
 17682             
 23510             
 17683             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23511             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17684             {
 23512             {
 17685         
 23513         
 17686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 23514                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17687                 return return_type_symbol;
 23515                 return return_type_symbol;
 17688                 
 23516                 
 17689             }
 23517             }
 17690             
 23518             
 17691             ERROR;
 23519             ERROR;
 17692         }
 23520         }
 17693         
 23521         
 17694     }/*function_int_to_lreal*/
 23522     }/*function_dt_to_lreal*/
 17695     break;
 23523     break;
 17696 
 23524 
 17697 /****
 23525 /****
 17698  *INT_TO_SINT
 23526  *DT_TO_SINT
 17699  */
 23527  */
 17700     case function_int_to_sint :
 23528     case function_dt_to_sint :
 17701     {
 23529     {
 17702         symbol_c *last_type_symbol = NULL;
 23530         symbol_c *last_type_symbol = NULL;
 17703 
 23531 
 17704         {
 23532         {
 17705             symbol_c *IN_type_symbol = param_data_type;
 23533             symbol_c *IN_type_symbol = param_data_type;
 17706             last_type_symbol = param_data_type;
 23534             last_type_symbol = param_data_type;
 17707             
 23535             
 17708             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23536             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17709             {
 23537             {
 17710         
 23538         
 17711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 23539                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17712                 return return_type_symbol;
 23540                 return return_type_symbol;
 17713                 
 23541                 
 17714             }
 23542             }
 17715             
 23543             
 17716             ERROR;
 23544             ERROR;
 17717         }
 23545         }
 17718         
 23546         
 17719     }/*function_int_to_sint*/
 23547     }/*function_dt_to_sint*/
 17720     break;
 23548     break;
 17721 
 23549 
 17722 /****
 23550 /****
 17723  *INT_TO_DINT
 23551  *DT_TO_INT
 17724  */
 23552  */
 17725     case function_int_to_dint :
 23553     case function_dt_to_int :
 17726     {
 23554     {
 17727         symbol_c *last_type_symbol = NULL;
 23555         symbol_c *last_type_symbol = NULL;
 17728 
 23556 
 17729         {
 23557         {
 17730             symbol_c *IN_type_symbol = param_data_type;
 23558             symbol_c *IN_type_symbol = param_data_type;
 17731             last_type_symbol = param_data_type;
 23559             last_type_symbol = param_data_type;
 17732             
 23560             
 17733             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23561             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 23562             {
       
 23563         
       
 23564                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23565                 return return_type_symbol;
       
 23566                 
       
 23567             }
       
 23568             
       
 23569             ERROR;
       
 23570         }
       
 23571         
       
 23572     }/*function_dt_to_int*/
       
 23573     break;
       
 23574 
       
 23575 /****
       
 23576  *DT_TO_DINT
       
 23577  */
       
 23578     case function_dt_to_dint :
       
 23579     {
       
 23580         symbol_c *last_type_symbol = NULL;
       
 23581 
       
 23582         {
       
 23583             symbol_c *IN_type_symbol = param_data_type;
       
 23584             last_type_symbol = param_data_type;
       
 23585             
       
 23586             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17734             {
 23587             {
 17735         
 23588         
 17736                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 23589                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17737                 return return_type_symbol;
 23590                 return return_type_symbol;
 17738                 
 23591                 
 17739             }
 23592             }
 17740             
 23593             
 17741             ERROR;
 23594             ERROR;
 17742         }
 23595         }
 17743         
 23596         
 17744     }/*function_int_to_dint*/
 23597     }/*function_dt_to_dint*/
 17745     break;
 23598     break;
 17746 
 23599 
 17747 /****
 23600 /****
 17748  *INT_TO_LINT
 23601  *DT_TO_LINT
 17749  */
 23602  */
 17750     case function_int_to_lint :
 23603     case function_dt_to_lint :
 17751     {
 23604     {
 17752         symbol_c *last_type_symbol = NULL;
 23605         symbol_c *last_type_symbol = NULL;
 17753 
 23606 
 17754         {
 23607         {
 17755             symbol_c *IN_type_symbol = param_data_type;
 23608             symbol_c *IN_type_symbol = param_data_type;
 17756             last_type_symbol = param_data_type;
 23609             last_type_symbol = param_data_type;
 17757             
 23610             
 17758             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23611             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17759             {
 23612             {
 17760         
 23613         
 17761                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 23614                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17762                 return return_type_symbol;
 23615                 return return_type_symbol;
 17763                 
 23616                 
 17764             }
 23617             }
 17765             
 23618             
 17766             ERROR;
 23619             ERROR;
 17767         }
 23620         }
 17768         
 23621         
 17769     }/*function_int_to_lint*/
 23622     }/*function_dt_to_lint*/
 17770     break;
 23623     break;
 17771 
 23624 
 17772 /****
 23625 /****
 17773  *INT_TO_USINT
 23626  *DT_TO_USINT
 17774  */
 23627  */
 17775     case function_int_to_usint :
 23628     case function_dt_to_usint :
 17776     {
 23629     {
 17777         symbol_c *last_type_symbol = NULL;
 23630         symbol_c *last_type_symbol = NULL;
 17778 
 23631 
 17779         {
 23632         {
 17780             symbol_c *IN_type_symbol = param_data_type;
 23633             symbol_c *IN_type_symbol = param_data_type;
 17781             last_type_symbol = param_data_type;
 23634             last_type_symbol = param_data_type;
 17782             
 23635             
 17783             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23636             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17784             {
 23637             {
 17785         
 23638         
 17786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 23639                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 17787                 return return_type_symbol;
 23640                 return return_type_symbol;
 17788                 
 23641                 
 17789             }
 23642             }
 17790             
 23643             
 17791             ERROR;
 23644             ERROR;
 17792         }
 23645         }
 17793         
 23646         
 17794     }/*function_int_to_usint*/
 23647     }/*function_dt_to_usint*/
 17795     break;
 23648     break;
 17796 
 23649 
 17797 /****
 23650 /****
 17798  *INT_TO_UINT
 23651  *DT_TO_UINT
 17799  */
 23652  */
 17800     case function_int_to_uint :
 23653     case function_dt_to_uint :
 17801     {
 23654     {
 17802         symbol_c *last_type_symbol = NULL;
 23655         symbol_c *last_type_symbol = NULL;
 17803 
 23656 
 17804         {
 23657         {
 17805             symbol_c *IN_type_symbol = param_data_type;
 23658             symbol_c *IN_type_symbol = param_data_type;
 17806             last_type_symbol = param_data_type;
 23659             last_type_symbol = param_data_type;
 17807             
 23660             
 17808             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23661             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17809             {
 23662             {
 17810         
 23663         
 17811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 23664                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 17812                 return return_type_symbol;
 23665                 return return_type_symbol;
 17813                 
 23666                 
 17814             }
 23667             }
 17815             
 23668             
 17816             ERROR;
 23669             ERROR;
 17817         }
 23670         }
 17818         
 23671         
 17819     }/*function_int_to_uint*/
 23672     }/*function_dt_to_uint*/
 17820     break;
 23673     break;
 17821 
 23674 
 17822 /****
 23675 /****
 17823  *INT_TO_UDINT
 23676  *DT_TO_UDINT
 17824  */
 23677  */
 17825     case function_int_to_udint :
 23678     case function_dt_to_udint :
 17826     {
 23679     {
 17827         symbol_c *last_type_symbol = NULL;
 23680         symbol_c *last_type_symbol = NULL;
 17828 
 23681 
 17829         {
 23682         {
 17830             symbol_c *IN_type_symbol = param_data_type;
 23683             symbol_c *IN_type_symbol = param_data_type;
 17831             last_type_symbol = param_data_type;
 23684             last_type_symbol = param_data_type;
 17832             
 23685             
 17833             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23686             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17834             {
 23687             {
 17835         
 23688         
 17836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 23689                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17837                 return return_type_symbol;
 23690                 return return_type_symbol;
 17838                 
 23691                 
 17839             }
 23692             }
 17840             
 23693             
 17841             ERROR;
 23694             ERROR;
 17842         }
 23695         }
 17843         
 23696         
 17844     }/*function_int_to_udint*/
 23697     }/*function_dt_to_udint*/
 17845     break;
 23698     break;
 17846 
 23699 
 17847 /****
 23700 /****
 17848  *INT_TO_ULINT
 23701  *DT_TO_ULINT
 17849  */
 23702  */
 17850     case function_int_to_ulint :
 23703     case function_dt_to_ulint :
 17851     {
 23704     {
 17852         symbol_c *last_type_symbol = NULL;
 23705         symbol_c *last_type_symbol = NULL;
 17853 
 23706 
 17854         {
 23707         {
 17855             symbol_c *IN_type_symbol = param_data_type;
 23708             symbol_c *IN_type_symbol = param_data_type;
 17856             last_type_symbol = param_data_type;
 23709             last_type_symbol = param_data_type;
 17857             
 23710             
 17858             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23711             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17859             {
 23712             {
 17860         
 23713         
 17861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 23714                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17862                 return return_type_symbol;
 23715                 return return_type_symbol;
 17863                 
 23716                 
 17864             }
 23717             }
 17865             
 23718             
 17866             ERROR;
 23719             ERROR;
 17867         }
 23720         }
 17868         
 23721         
 17869     }/*function_int_to_ulint*/
 23722     }/*function_dt_to_ulint*/
 17870     break;
 23723     break;
 17871 
 23724 
 17872 /****
 23725 /****
 17873  *INT_TO_TIME
 23726  *DT_TO_BOOL
 17874  */
 23727  */
 17875     case function_int_to_time :
 23728     case function_dt_to_bool :
 17876     {
 23729     {
 17877         symbol_c *last_type_symbol = NULL;
 23730         symbol_c *last_type_symbol = NULL;
 17878 
 23731 
 17879         {
 23732         {
 17880             symbol_c *IN_type_symbol = param_data_type;
 23733             symbol_c *IN_type_symbol = param_data_type;
 17881             last_type_symbol = param_data_type;
 23734             last_type_symbol = param_data_type;
 17882             
 23735             
 17883             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23736             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17884             {
       
 17885         
       
 17886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17887                 return return_type_symbol;
       
 17888                 
       
 17889             }
       
 17890             
       
 17891             ERROR;
       
 17892         }
       
 17893         
       
 17894     }/*function_int_to_time*/
       
 17895     break;
       
 17896 
       
 17897 /****
       
 17898  *INT_TO_BOOL
       
 17899  */
       
 17900     case function_int_to_bool :
       
 17901     {
       
 17902         symbol_c *last_type_symbol = NULL;
       
 17903 
       
 17904         {
       
 17905             symbol_c *IN_type_symbol = param_data_type;
       
 17906             last_type_symbol = param_data_type;
       
 17907             
       
 17908             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 17909             {
 23737             {
 17910         
 23738         
 17911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 23739                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17912                 return return_type_symbol;
 23740                 return return_type_symbol;
 17913                 
 23741                 
 17914             }
 23742             }
 17915             
 23743             
 17916             ERROR;
 23744             ERROR;
 17917         }
 23745         }
 17918         
 23746         
 17919     }/*function_int_to_bool*/
 23747     }/*function_dt_to_bool*/
 17920     break;
 23748     break;
 17921 
 23749 
 17922 /****
 23750 /****
 17923  *INT_TO_BYTE
 23751  *DT_TO_BYTE
 17924  */
 23752  */
 17925     case function_int_to_byte :
 23753     case function_dt_to_byte :
 17926     {
 23754     {
 17927         symbol_c *last_type_symbol = NULL;
 23755         symbol_c *last_type_symbol = NULL;
 17928 
 23756 
 17929         {
 23757         {
 17930             symbol_c *IN_type_symbol = param_data_type;
 23758             symbol_c *IN_type_symbol = param_data_type;
 17931             last_type_symbol = param_data_type;
 23759             last_type_symbol = param_data_type;
 17932             
 23760             
 17933             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23761             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17934             {
 23762             {
 17935         
 23763         
 17936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 23764                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17937                 return return_type_symbol;
 23765                 return return_type_symbol;
 17938                 
 23766                 
 17939             }
 23767             }
 17940             
 23768             
 17941             ERROR;
 23769             ERROR;
 17942         }
 23770         }
 17943         
 23771         
 17944     }/*function_int_to_byte*/
 23772     }/*function_dt_to_byte*/
 17945     break;
 23773     break;
 17946 
 23774 
 17947 /****
 23775 /****
 17948  *INT_TO_WORD
 23776  *DT_TO_WORD
 17949  */
 23777  */
 17950     case function_int_to_word :
 23778     case function_dt_to_word :
 17951     {
 23779     {
 17952         symbol_c *last_type_symbol = NULL;
 23780         symbol_c *last_type_symbol = NULL;
 17953 
 23781 
 17954         {
 23782         {
 17955             symbol_c *IN_type_symbol = param_data_type;
 23783             symbol_c *IN_type_symbol = param_data_type;
 17956             last_type_symbol = param_data_type;
 23784             last_type_symbol = param_data_type;
 17957             
 23785             
 17958             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23786             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17959             {
 23787             {
 17960         
 23788         
 17961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 23789                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17962                 return return_type_symbol;
 23790                 return return_type_symbol;
 17963                 
 23791                 
 17964             }
 23792             }
 17965             
 23793             
 17966             ERROR;
 23794             ERROR;
 17967         }
 23795         }
 17968         
 23796         
 17969     }/*function_int_to_word*/
 23797     }/*function_dt_to_word*/
 17970     break;
 23798     break;
 17971 
 23799 
 17972 /****
 23800 /****
 17973  *INT_TO_DWORD
 23801  *DT_TO_DWORD
 17974  */
 23802  */
 17975     case function_int_to_dword :
 23803     case function_dt_to_dword :
 17976     {
 23804     {
 17977         symbol_c *last_type_symbol = NULL;
 23805         symbol_c *last_type_symbol = NULL;
 17978 
 23806 
 17979         {
 23807         {
 17980             symbol_c *IN_type_symbol = param_data_type;
 23808             symbol_c *IN_type_symbol = param_data_type;
 17981             last_type_symbol = param_data_type;
 23809             last_type_symbol = param_data_type;
 17982             
 23810             
 17983             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23811             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 17984             {
 23812             {
 17985         
 23813         
 17986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 23814                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17987                 return return_type_symbol;
 23815                 return return_type_symbol;
 17988                 
 23816                 
 17989             }
 23817             }
 17990             
 23818             
 17991             ERROR;
 23819             ERROR;
 17992         }
 23820         }
 17993         
 23821         
 17994     }/*function_int_to_dword*/
 23822     }/*function_dt_to_dword*/
 17995     break;
 23823     break;
 17996 
 23824 
 17997 /****
 23825 /****
 17998  *INT_TO_LWORD
 23826  *DT_TO_LWORD
 17999  */
 23827  */
 18000     case function_int_to_lword :
 23828     case function_dt_to_lword :
 18001     {
 23829     {
 18002         symbol_c *last_type_symbol = NULL;
 23830         symbol_c *last_type_symbol = NULL;
 18003 
 23831 
 18004         {
 23832         {
 18005             symbol_c *IN_type_symbol = param_data_type;
 23833             symbol_c *IN_type_symbol = param_data_type;
 18006             last_type_symbol = param_data_type;
 23834             last_type_symbol = param_data_type;
 18007             
 23835             
 18008             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23836             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 18009             {
 23837             {
 18010         
 23838         
 18011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 23839                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 18012                 return return_type_symbol;
 23840                 return return_type_symbol;
 18013                 
 23841                 
 18014             }
 23842             }
 18015             
 23843             
 18016             ERROR;
 23844             ERROR;
 18017         }
 23845         }
 18018         
 23846         
 18019     }/*function_int_to_lword*/
 23847     }/*function_dt_to_lword*/
 18020     break;
 23848     break;
 18021 
 23849 
 18022 /****
 23850 /****
 18023  *INT_TO_STRING
 23851  *DT_TO_STRING
 18024  */
 23852  */
 18025     case function_int_to_string :
 23853     case function_dt_to_string :
 18026     {
 23854     {
 18027         symbol_c *last_type_symbol = NULL;
 23855         symbol_c *last_type_symbol = NULL;
 18028 
 23856 
 18029         {
 23857         {
 18030             symbol_c *IN_type_symbol = param_data_type;
 23858             symbol_c *IN_type_symbol = param_data_type;
 18031             last_type_symbol = param_data_type;
 23859             last_type_symbol = param_data_type;
 18032             
 23860             
 18033             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23861             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 18034             {
 23862             {
 18035         
 23863         
 18036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 23864                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18037                 return return_type_symbol;
 23865                 return return_type_symbol;
 18038                 
 23866                 
 18039             }
 23867             }
 18040             
 23868             
 18041             ERROR;
 23869             ERROR;
 18042         }
 23870         }
 18043         
 23871         
 18044     }/*function_int_to_string*/
 23872     }/*function_dt_to_string*/
 18045     break;
 23873     break;
 18046 
 23874 
 18047 /****
 23875 /****
 18048  *INT_TO_WSTRING
 23876  *TRUNC
 18049  */
 23877  */
 18050     case function_int_to_wstring :
 23878     case function_trunc :
 18051     {
 23879     {
 18052         symbol_c *last_type_symbol = NULL;
 23880         symbol_c *last_type_symbol = NULL;
 18053 
 23881 
 18054         {
 23882         {
 18055             symbol_c *IN_type_symbol = param_data_type;
 23883             symbol_c *IN_type_symbol = param_data_type;
 18056             last_type_symbol = param_data_type;
 23884             last_type_symbol = param_data_type;
 18057             
 23885             
 18058             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23886             if(search_expression_type->is_real_type(IN_type_symbol))
 18059             {
 23887             {
 18060         
 23888         
 18061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
 23889                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 18062                 return return_type_symbol;
 23890                 return return_type_symbol;
 18063                 
 23891                 
 18064             }
 23892             }
 18065             
 23893             
 18066             ERROR;
 23894             ERROR;
 18067         }
 23895         }
 18068         
 23896         
 18069     }/*function_int_to_wstring*/
 23897     }/*function_trunc*/
 18070     break;
 23898     break;
 18071 
 23899 
 18072 /****
 23900 /****
 18073  *INT_TO_DATE
 23901  *BCD_TO_USINT
 18074  */
 23902  */
 18075     case function_int_to_date :
 23903     case function_bcd_to_usint :
 18076     {
 23904     {
 18077         symbol_c *last_type_symbol = NULL;
 23905         symbol_c *last_type_symbol = NULL;
 18078 
 23906 
 18079         {
 23907         {
 18080             symbol_c *IN_type_symbol = param_data_type;
 23908             symbol_c *IN_type_symbol = param_data_type;
 18081             last_type_symbol = param_data_type;
 23909             last_type_symbol = param_data_type;
 18082             
 23910             
 18083             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 23911             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
 18084             {
       
 18085         
       
 18086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18087                 return return_type_symbol;
       
 18088                 
       
 18089             }
       
 18090             
       
 18091             ERROR;
       
 18092         }
       
 18093         
       
 18094     }/*function_int_to_date*/
       
 18095     break;
       
 18096 
       
 18097 /****
       
 18098  *INT_TO_TOD
       
 18099  */
       
 18100     case function_int_to_tod :
       
 18101     {
       
 18102         symbol_c *last_type_symbol = NULL;
       
 18103 
       
 18104         {
       
 18105             symbol_c *IN_type_symbol = param_data_type;
       
 18106             last_type_symbol = param_data_type;
       
 18107             
       
 18108             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 18109             {
       
 18110         
       
 18111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18112                 return return_type_symbol;
       
 18113                 
       
 18114             }
       
 18115             
       
 18116             ERROR;
       
 18117         }
       
 18118         
       
 18119     }/*function_int_to_tod*/
       
 18120     break;
       
 18121 
       
 18122 /****
       
 18123  *INT_TO_DT
       
 18124  */
       
 18125     case function_int_to_dt :
       
 18126     {
       
 18127         symbol_c *last_type_symbol = NULL;
       
 18128 
       
 18129         {
       
 18130             symbol_c *IN_type_symbol = param_data_type;
       
 18131             last_type_symbol = param_data_type;
       
 18132             
       
 18133             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 18134             {
       
 18135         
       
 18136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18137                 return return_type_symbol;
       
 18138                 
       
 18139             }
       
 18140             
       
 18141             ERROR;
       
 18142         }
       
 18143         
       
 18144     }/*function_int_to_dt*/
       
 18145     break;
       
 18146 
       
 18147 /****
       
 18148  *DINT_TO_REAL
       
 18149  */
       
 18150     case function_dint_to_real :
       
 18151     {
       
 18152         symbol_c *last_type_symbol = NULL;
       
 18153 
       
 18154         {
       
 18155             symbol_c *IN_type_symbol = param_data_type;
       
 18156             last_type_symbol = param_data_type;
       
 18157             
       
 18158             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18159             {
       
 18160         
       
 18161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18162                 return return_type_symbol;
       
 18163                 
       
 18164             }
       
 18165             
       
 18166             ERROR;
       
 18167         }
       
 18168         
       
 18169     }/*function_dint_to_real*/
       
 18170     break;
       
 18171 
       
 18172 /****
       
 18173  *DINT_TO_LREAL
       
 18174  */
       
 18175     case function_dint_to_lreal :
       
 18176     {
       
 18177         symbol_c *last_type_symbol = NULL;
       
 18178 
       
 18179         {
       
 18180             symbol_c *IN_type_symbol = param_data_type;
       
 18181             last_type_symbol = param_data_type;
       
 18182             
       
 18183             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18184             {
       
 18185         
       
 18186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18187                 return return_type_symbol;
       
 18188                 
       
 18189             }
       
 18190             
       
 18191             ERROR;
       
 18192         }
       
 18193         
       
 18194     }/*function_dint_to_lreal*/
       
 18195     break;
       
 18196 
       
 18197 /****
       
 18198  *DINT_TO_SINT
       
 18199  */
       
 18200     case function_dint_to_sint :
       
 18201     {
       
 18202         symbol_c *last_type_symbol = NULL;
       
 18203 
       
 18204         {
       
 18205             symbol_c *IN_type_symbol = param_data_type;
       
 18206             last_type_symbol = param_data_type;
       
 18207             
       
 18208             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18209             {
       
 18210         
       
 18211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18212                 return return_type_symbol;
       
 18213                 
       
 18214             }
       
 18215             
       
 18216             ERROR;
       
 18217         }
       
 18218         
       
 18219     }/*function_dint_to_sint*/
       
 18220     break;
       
 18221 
       
 18222 /****
       
 18223  *DINT_TO_INT
       
 18224  */
       
 18225     case function_dint_to_int :
       
 18226     {
       
 18227         symbol_c *last_type_symbol = NULL;
       
 18228 
       
 18229         {
       
 18230             symbol_c *IN_type_symbol = param_data_type;
       
 18231             last_type_symbol = param_data_type;
       
 18232             
       
 18233             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18234             {
       
 18235         
       
 18236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18237                 return return_type_symbol;
       
 18238                 
       
 18239             }
       
 18240             
       
 18241             ERROR;
       
 18242         }
       
 18243         
       
 18244     }/*function_dint_to_int*/
       
 18245     break;
       
 18246 
       
 18247 /****
       
 18248  *DINT_TO_LINT
       
 18249  */
       
 18250     case function_dint_to_lint :
       
 18251     {
       
 18252         symbol_c *last_type_symbol = NULL;
       
 18253 
       
 18254         {
       
 18255             symbol_c *IN_type_symbol = param_data_type;
       
 18256             last_type_symbol = param_data_type;
       
 18257             
       
 18258             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18259             {
       
 18260         
       
 18261                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18262                 return return_type_symbol;
       
 18263                 
       
 18264             }
       
 18265             
       
 18266             ERROR;
       
 18267         }
       
 18268         
       
 18269     }/*function_dint_to_lint*/
       
 18270     break;
       
 18271 
       
 18272 /****
       
 18273  *DINT_TO_USINT
       
 18274  */
       
 18275     case function_dint_to_usint :
       
 18276     {
       
 18277         symbol_c *last_type_symbol = NULL;
       
 18278 
       
 18279         {
       
 18280             symbol_c *IN_type_symbol = param_data_type;
       
 18281             last_type_symbol = param_data_type;
       
 18282             
       
 18283             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18284             {
 23912             {
 18285         
 23913         
 18286                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 23914                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18287                 return return_type_symbol;
 23915                 return return_type_symbol;
 18288                 
 23916                 
 18289             }
 23917             }
 18290             
 23918             
 18291             ERROR;
 23919             ERROR;
 18292         }
 23920         }
 18293         
 23921         
 18294     }/*function_dint_to_usint*/
 23922     }/*function_bcd_to_usint*/
 18295     break;
 23923     break;
 18296 
 23924 
 18297 /****
 23925 /****
 18298  *DINT_TO_UINT
 23926  *BCD_TO_UINT
 18299  */
 23927  */
 18300     case function_dint_to_uint :
 23928     case function_bcd_to_uint :
 18301     {
 23929     {
 18302         symbol_c *last_type_symbol = NULL;
 23930         symbol_c *last_type_symbol = NULL;
 18303 
 23931 
 18304         {
 23932         {
 18305             symbol_c *IN_type_symbol = param_data_type;
 23933             symbol_c *IN_type_symbol = param_data_type;
 18306             last_type_symbol = param_data_type;
 23934             last_type_symbol = param_data_type;
 18307             
 23935             
 18308             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 23936             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
 18309             {
 23937             {
 18310         
 23938         
 18311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 23939                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18312                 return return_type_symbol;
 23940                 return return_type_symbol;
 18313                 
 23941                 
 18314             }
 23942             }
 18315             
 23943             
 18316             ERROR;
 23944             ERROR;
 18317         }
 23945         }
 18318         
 23946         
 18319     }/*function_dint_to_uint*/
 23947     }/*function_bcd_to_uint*/
 18320     break;
 23948     break;
 18321 
 23949 
 18322 /****
 23950 /****
 18323  *DINT_TO_UDINT
 23951  *BCD_TO_UDINT
 18324  */
 23952  */
 18325     case function_dint_to_udint :
 23953     case function_bcd_to_udint :
 18326     {
 23954     {
 18327         symbol_c *last_type_symbol = NULL;
 23955         symbol_c *last_type_symbol = NULL;
 18328 
 23956 
 18329         {
 23957         {
 18330             symbol_c *IN_type_symbol = param_data_type;
 23958             symbol_c *IN_type_symbol = param_data_type;
 18331             last_type_symbol = param_data_type;
 23959             last_type_symbol = param_data_type;
 18332             
 23960             
 18333             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 23961             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
 18334             {
 23962             {
 18335         
 23963         
 18336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 23964                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 18337                 return return_type_symbol;
 23965                 return return_type_symbol;
 18338                 
 23966                 
 18339             }
 23967             }
 18340             
 23968             
 18341             ERROR;
 23969             ERROR;
 18342         }
 23970         }
 18343         
 23971         
 18344     }/*function_dint_to_udint*/
 23972     }/*function_bcd_to_udint*/
 18345     break;
 23973     break;
 18346 
 23974 
 18347 /****
 23975 /****
 18348  *DINT_TO_ULINT
 23976  *BCD_TO_ULINT
 18349  */
 23977  */
 18350     case function_dint_to_ulint :
 23978     case function_bcd_to_ulint :
 18351     {
 23979     {
 18352         symbol_c *last_type_symbol = NULL;
 23980         symbol_c *last_type_symbol = NULL;
 18353 
 23981 
 18354         {
 23982         {
 18355             symbol_c *IN_type_symbol = param_data_type;
 23983             symbol_c *IN_type_symbol = param_data_type;
 18356             last_type_symbol = param_data_type;
 23984             last_type_symbol = param_data_type;
 18357             
 23985             
 18358             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 23986             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
 18359             {
 23987             {
 18360         
 23988         
 18361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 23989                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 18362                 return return_type_symbol;
 23990                 return return_type_symbol;
 18363                 
 23991                 
 18364             }
 23992             }
 18365             
 23993             
 18366             ERROR;
 23994             ERROR;
 18367         }
 23995         }
 18368         
 23996         
 18369     }/*function_dint_to_ulint*/
       
 18370     break;
       
 18371 
       
 18372 /****
       
 18373  *DINT_TO_TIME
       
 18374  */
       
 18375     case function_dint_to_time :
       
 18376     {
       
 18377         symbol_c *last_type_symbol = NULL;
       
 18378 
       
 18379         {
       
 18380             symbol_c *IN_type_symbol = param_data_type;
       
 18381             last_type_symbol = param_data_type;
       
 18382             
       
 18383             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18384             {
       
 18385         
       
 18386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18387                 return return_type_symbol;
       
 18388                 
       
 18389             }
       
 18390             
       
 18391             ERROR;
       
 18392         }
       
 18393         
       
 18394     }/*function_dint_to_time*/
       
 18395     break;
       
 18396 
       
 18397 /****
       
 18398  *DINT_TO_BOOL
       
 18399  */
       
 18400     case function_dint_to_bool :
       
 18401     {
       
 18402         symbol_c *last_type_symbol = NULL;
       
 18403 
       
 18404         {
       
 18405             symbol_c *IN_type_symbol = param_data_type;
       
 18406             last_type_symbol = param_data_type;
       
 18407             
       
 18408             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18409             {
       
 18410         
       
 18411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18412                 return return_type_symbol;
       
 18413                 
       
 18414             }
       
 18415             
       
 18416             ERROR;
       
 18417         }
       
 18418         
       
 18419     }/*function_dint_to_bool*/
       
 18420     break;
       
 18421 
       
 18422 /****
       
 18423  *DINT_TO_BYTE
       
 18424  */
       
 18425     case function_dint_to_byte :
       
 18426     {
       
 18427         symbol_c *last_type_symbol = NULL;
       
 18428 
       
 18429         {
       
 18430             symbol_c *IN_type_symbol = param_data_type;
       
 18431             last_type_symbol = param_data_type;
       
 18432             
       
 18433             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18434             {
       
 18435         
       
 18436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18437                 return return_type_symbol;
       
 18438                 
       
 18439             }
       
 18440             
       
 18441             ERROR;
       
 18442         }
       
 18443         
       
 18444     }/*function_dint_to_byte*/
       
 18445     break;
       
 18446 
       
 18447 /****
       
 18448  *DINT_TO_WORD
       
 18449  */
       
 18450     case function_dint_to_word :
       
 18451     {
       
 18452         symbol_c *last_type_symbol = NULL;
       
 18453 
       
 18454         {
       
 18455             symbol_c *IN_type_symbol = param_data_type;
       
 18456             last_type_symbol = param_data_type;
       
 18457             
       
 18458             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18459             {
       
 18460         
       
 18461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18462                 return return_type_symbol;
       
 18463                 
       
 18464             }
       
 18465             
       
 18466             ERROR;
       
 18467         }
       
 18468         
       
 18469     }/*function_dint_to_word*/
       
 18470     break;
       
 18471 
       
 18472 /****
       
 18473  *DINT_TO_DWORD
       
 18474  */
       
 18475     case function_dint_to_dword :
       
 18476     {
       
 18477         symbol_c *last_type_symbol = NULL;
       
 18478 
       
 18479         {
       
 18480             symbol_c *IN_type_symbol = param_data_type;
       
 18481             last_type_symbol = param_data_type;
       
 18482             
       
 18483             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18484             {
       
 18485         
       
 18486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18487                 return return_type_symbol;
       
 18488                 
       
 18489             }
       
 18490             
       
 18491             ERROR;
       
 18492         }
       
 18493         
       
 18494     }/*function_dint_to_dword*/
       
 18495     break;
       
 18496 
       
 18497 /****
       
 18498  *DINT_TO_LWORD
       
 18499  */
       
 18500     case function_dint_to_lword :
       
 18501     {
       
 18502         symbol_c *last_type_symbol = NULL;
       
 18503 
       
 18504         {
       
 18505             symbol_c *IN_type_symbol = param_data_type;
       
 18506             last_type_symbol = param_data_type;
       
 18507             
       
 18508             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18509             {
       
 18510         
       
 18511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18512                 return return_type_symbol;
       
 18513                 
       
 18514             }
       
 18515             
       
 18516             ERROR;
       
 18517         }
       
 18518         
       
 18519     }/*function_dint_to_lword*/
       
 18520     break;
       
 18521 
       
 18522 /****
       
 18523  *DINT_TO_STRING
       
 18524  */
       
 18525     case function_dint_to_string :
       
 18526     {
       
 18527         symbol_c *last_type_symbol = NULL;
       
 18528 
       
 18529         {
       
 18530             symbol_c *IN_type_symbol = param_data_type;
       
 18531             last_type_symbol = param_data_type;
       
 18532             
       
 18533             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18534             {
       
 18535         
       
 18536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18537                 return return_type_symbol;
       
 18538                 
       
 18539             }
       
 18540             
       
 18541             ERROR;
       
 18542         }
       
 18543         
       
 18544     }/*function_dint_to_string*/
       
 18545     break;
       
 18546 
       
 18547 /****
       
 18548  *DINT_TO_WSTRING
       
 18549  */
       
 18550     case function_dint_to_wstring :
       
 18551     {
       
 18552         symbol_c *last_type_symbol = NULL;
       
 18553 
       
 18554         {
       
 18555             symbol_c *IN_type_symbol = param_data_type;
       
 18556             last_type_symbol = param_data_type;
       
 18557             
       
 18558             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18559             {
       
 18560         
       
 18561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 18562                 return return_type_symbol;
       
 18563                 
       
 18564             }
       
 18565             
       
 18566             ERROR;
       
 18567         }
       
 18568         
       
 18569     }/*function_dint_to_wstring*/
       
 18570     break;
       
 18571 
       
 18572 /****
       
 18573  *DINT_TO_DATE
       
 18574  */
       
 18575     case function_dint_to_date :
       
 18576     {
       
 18577         symbol_c *last_type_symbol = NULL;
       
 18578 
       
 18579         {
       
 18580             symbol_c *IN_type_symbol = param_data_type;
       
 18581             last_type_symbol = param_data_type;
       
 18582             
       
 18583             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18584             {
       
 18585         
       
 18586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18587                 return return_type_symbol;
       
 18588                 
       
 18589             }
       
 18590             
       
 18591             ERROR;
       
 18592         }
       
 18593         
       
 18594     }/*function_dint_to_date*/
       
 18595     break;
       
 18596 
       
 18597 /****
       
 18598  *DINT_TO_TOD
       
 18599  */
       
 18600     case function_dint_to_tod :
       
 18601     {
       
 18602         symbol_c *last_type_symbol = NULL;
       
 18603 
       
 18604         {
       
 18605             symbol_c *IN_type_symbol = param_data_type;
       
 18606             last_type_symbol = param_data_type;
       
 18607             
       
 18608             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18609             {
       
 18610         
       
 18611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18612                 return return_type_symbol;
       
 18613                 
       
 18614             }
       
 18615             
       
 18616             ERROR;
       
 18617         }
       
 18618         
       
 18619     }/*function_dint_to_tod*/
       
 18620     break;
       
 18621 
       
 18622 /****
       
 18623  *DINT_TO_DT
       
 18624  */
       
 18625     case function_dint_to_dt :
       
 18626     {
       
 18627         symbol_c *last_type_symbol = NULL;
       
 18628 
       
 18629         {
       
 18630             symbol_c *IN_type_symbol = param_data_type;
       
 18631             last_type_symbol = param_data_type;
       
 18632             
       
 18633             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 18634             {
       
 18635         
       
 18636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18637                 return return_type_symbol;
       
 18638                 
       
 18639             }
       
 18640             
       
 18641             ERROR;
       
 18642         }
       
 18643         
       
 18644     }/*function_dint_to_dt*/
       
 18645     break;
       
 18646 
       
 18647 /****
       
 18648  *LINT_TO_REAL
       
 18649  */
       
 18650     case function_lint_to_real :
       
 18651     {
       
 18652         symbol_c *last_type_symbol = NULL;
       
 18653 
       
 18654         {
       
 18655             symbol_c *IN_type_symbol = param_data_type;
       
 18656             last_type_symbol = param_data_type;
       
 18657             
       
 18658             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18659             {
       
 18660         
       
 18661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18662                 return return_type_symbol;
       
 18663                 
       
 18664             }
       
 18665             
       
 18666             ERROR;
       
 18667         }
       
 18668         
       
 18669     }/*function_lint_to_real*/
       
 18670     break;
       
 18671 
       
 18672 /****
       
 18673  *LINT_TO_LREAL
       
 18674  */
       
 18675     case function_lint_to_lreal :
       
 18676     {
       
 18677         symbol_c *last_type_symbol = NULL;
       
 18678 
       
 18679         {
       
 18680             symbol_c *IN_type_symbol = param_data_type;
       
 18681             last_type_symbol = param_data_type;
       
 18682             
       
 18683             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18684             {
       
 18685         
       
 18686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18687                 return return_type_symbol;
       
 18688                 
       
 18689             }
       
 18690             
       
 18691             ERROR;
       
 18692         }
       
 18693         
       
 18694     }/*function_lint_to_lreal*/
       
 18695     break;
       
 18696 
       
 18697 /****
       
 18698  *LINT_TO_SINT
       
 18699  */
       
 18700     case function_lint_to_sint :
       
 18701     {
       
 18702         symbol_c *last_type_symbol = NULL;
       
 18703 
       
 18704         {
       
 18705             symbol_c *IN_type_symbol = param_data_type;
       
 18706             last_type_symbol = param_data_type;
       
 18707             
       
 18708             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18709             {
       
 18710         
       
 18711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18712                 return return_type_symbol;
       
 18713                 
       
 18714             }
       
 18715             
       
 18716             ERROR;
       
 18717         }
       
 18718         
       
 18719     }/*function_lint_to_sint*/
       
 18720     break;
       
 18721 
       
 18722 /****
       
 18723  *LINT_TO_INT
       
 18724  */
       
 18725     case function_lint_to_int :
       
 18726     {
       
 18727         symbol_c *last_type_symbol = NULL;
       
 18728 
       
 18729         {
       
 18730             symbol_c *IN_type_symbol = param_data_type;
       
 18731             last_type_symbol = param_data_type;
       
 18732             
       
 18733             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18734             {
       
 18735         
       
 18736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18737                 return return_type_symbol;
       
 18738                 
       
 18739             }
       
 18740             
       
 18741             ERROR;
       
 18742         }
       
 18743         
       
 18744     }/*function_lint_to_int*/
       
 18745     break;
       
 18746 
       
 18747 /****
       
 18748  *LINT_TO_DINT
       
 18749  */
       
 18750     case function_lint_to_dint :
       
 18751     {
       
 18752         symbol_c *last_type_symbol = NULL;
       
 18753 
       
 18754         {
       
 18755             symbol_c *IN_type_symbol = param_data_type;
       
 18756             last_type_symbol = param_data_type;
       
 18757             
       
 18758             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18759             {
       
 18760         
       
 18761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18762                 return return_type_symbol;
       
 18763                 
       
 18764             }
       
 18765             
       
 18766             ERROR;
       
 18767         }
       
 18768         
       
 18769     }/*function_lint_to_dint*/
       
 18770     break;
       
 18771 
       
 18772 /****
       
 18773  *LINT_TO_USINT
       
 18774  */
       
 18775     case function_lint_to_usint :
       
 18776     {
       
 18777         symbol_c *last_type_symbol = NULL;
       
 18778 
       
 18779         {
       
 18780             symbol_c *IN_type_symbol = param_data_type;
       
 18781             last_type_symbol = param_data_type;
       
 18782             
       
 18783             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18784             {
       
 18785         
       
 18786                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18787                 return return_type_symbol;
       
 18788                 
       
 18789             }
       
 18790             
       
 18791             ERROR;
       
 18792         }
       
 18793         
       
 18794     }/*function_lint_to_usint*/
       
 18795     break;
       
 18796 
       
 18797 /****
       
 18798  *LINT_TO_UINT
       
 18799  */
       
 18800     case function_lint_to_uint :
       
 18801     {
       
 18802         symbol_c *last_type_symbol = NULL;
       
 18803 
       
 18804         {
       
 18805             symbol_c *IN_type_symbol = param_data_type;
       
 18806             last_type_symbol = param_data_type;
       
 18807             
       
 18808             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18809             {
       
 18810         
       
 18811                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18812                 return return_type_symbol;
       
 18813                 
       
 18814             }
       
 18815             
       
 18816             ERROR;
       
 18817         }
       
 18818         
       
 18819     }/*function_lint_to_uint*/
       
 18820     break;
       
 18821 
       
 18822 /****
       
 18823  *LINT_TO_UDINT
       
 18824  */
       
 18825     case function_lint_to_udint :
       
 18826     {
       
 18827         symbol_c *last_type_symbol = NULL;
       
 18828 
       
 18829         {
       
 18830             symbol_c *IN_type_symbol = param_data_type;
       
 18831             last_type_symbol = param_data_type;
       
 18832             
       
 18833             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18834             {
       
 18835         
       
 18836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18837                 return return_type_symbol;
       
 18838                 
       
 18839             }
       
 18840             
       
 18841             ERROR;
       
 18842         }
       
 18843         
       
 18844     }/*function_lint_to_udint*/
       
 18845     break;
       
 18846 
       
 18847 /****
       
 18848  *LINT_TO_ULINT
       
 18849  */
       
 18850     case function_lint_to_ulint :
       
 18851     {
       
 18852         symbol_c *last_type_symbol = NULL;
       
 18853 
       
 18854         {
       
 18855             symbol_c *IN_type_symbol = param_data_type;
       
 18856             last_type_symbol = param_data_type;
       
 18857             
       
 18858             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18859             {
       
 18860         
       
 18861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18862                 return return_type_symbol;
       
 18863                 
       
 18864             }
       
 18865             
       
 18866             ERROR;
       
 18867         }
       
 18868         
       
 18869     }/*function_lint_to_ulint*/
       
 18870     break;
       
 18871 
       
 18872 /****
       
 18873  *LINT_TO_TIME
       
 18874  */
       
 18875     case function_lint_to_time :
       
 18876     {
       
 18877         symbol_c *last_type_symbol = NULL;
       
 18878 
       
 18879         {
       
 18880             symbol_c *IN_type_symbol = param_data_type;
       
 18881             last_type_symbol = param_data_type;
       
 18882             
       
 18883             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18884             {
       
 18885         
       
 18886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18887                 return return_type_symbol;
       
 18888                 
       
 18889             }
       
 18890             
       
 18891             ERROR;
       
 18892         }
       
 18893         
       
 18894     }/*function_lint_to_time*/
       
 18895     break;
       
 18896 
       
 18897 /****
       
 18898  *LINT_TO_BOOL
       
 18899  */
       
 18900     case function_lint_to_bool :
       
 18901     {
       
 18902         symbol_c *last_type_symbol = NULL;
       
 18903 
       
 18904         {
       
 18905             symbol_c *IN_type_symbol = param_data_type;
       
 18906             last_type_symbol = param_data_type;
       
 18907             
       
 18908             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18909             {
       
 18910         
       
 18911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18912                 return return_type_symbol;
       
 18913                 
       
 18914             }
       
 18915             
       
 18916             ERROR;
       
 18917         }
       
 18918         
       
 18919     }/*function_lint_to_bool*/
       
 18920     break;
       
 18921 
       
 18922 /****
       
 18923  *LINT_TO_BYTE
       
 18924  */
       
 18925     case function_lint_to_byte :
       
 18926     {
       
 18927         symbol_c *last_type_symbol = NULL;
       
 18928 
       
 18929         {
       
 18930             symbol_c *IN_type_symbol = param_data_type;
       
 18931             last_type_symbol = param_data_type;
       
 18932             
       
 18933             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18934             {
       
 18935         
       
 18936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18937                 return return_type_symbol;
       
 18938                 
       
 18939             }
       
 18940             
       
 18941             ERROR;
       
 18942         }
       
 18943         
       
 18944     }/*function_lint_to_byte*/
       
 18945     break;
       
 18946 
       
 18947 /****
       
 18948  *LINT_TO_WORD
       
 18949  */
       
 18950     case function_lint_to_word :
       
 18951     {
       
 18952         symbol_c *last_type_symbol = NULL;
       
 18953 
       
 18954         {
       
 18955             symbol_c *IN_type_symbol = param_data_type;
       
 18956             last_type_symbol = param_data_type;
       
 18957             
       
 18958             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18959             {
       
 18960         
       
 18961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18962                 return return_type_symbol;
       
 18963                 
       
 18964             }
       
 18965             
       
 18966             ERROR;
       
 18967         }
       
 18968         
       
 18969     }/*function_lint_to_word*/
       
 18970     break;
       
 18971 
       
 18972 /****
       
 18973  *LINT_TO_DWORD
       
 18974  */
       
 18975     case function_lint_to_dword :
       
 18976     {
       
 18977         symbol_c *last_type_symbol = NULL;
       
 18978 
       
 18979         {
       
 18980             symbol_c *IN_type_symbol = param_data_type;
       
 18981             last_type_symbol = param_data_type;
       
 18982             
       
 18983             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 18984             {
       
 18985         
       
 18986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18987                 return return_type_symbol;
       
 18988                 
       
 18989             }
       
 18990             
       
 18991             ERROR;
       
 18992         }
       
 18993         
       
 18994     }/*function_lint_to_dword*/
       
 18995     break;
       
 18996 
       
 18997 /****
       
 18998  *LINT_TO_LWORD
       
 18999  */
       
 19000     case function_lint_to_lword :
       
 19001     {
       
 19002         symbol_c *last_type_symbol = NULL;
       
 19003 
       
 19004         {
       
 19005             symbol_c *IN_type_symbol = param_data_type;
       
 19006             last_type_symbol = param_data_type;
       
 19007             
       
 19008             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19009             {
       
 19010         
       
 19011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19012                 return return_type_symbol;
       
 19013                 
       
 19014             }
       
 19015             
       
 19016             ERROR;
       
 19017         }
       
 19018         
       
 19019     }/*function_lint_to_lword*/
       
 19020     break;
       
 19021 
       
 19022 /****
       
 19023  *LINT_TO_STRING
       
 19024  */
       
 19025     case function_lint_to_string :
       
 19026     {
       
 19027         symbol_c *last_type_symbol = NULL;
       
 19028 
       
 19029         {
       
 19030             symbol_c *IN_type_symbol = param_data_type;
       
 19031             last_type_symbol = param_data_type;
       
 19032             
       
 19033             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19034             {
       
 19035         
       
 19036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19037                 return return_type_symbol;
       
 19038                 
       
 19039             }
       
 19040             
       
 19041             ERROR;
       
 19042         }
       
 19043         
       
 19044     }/*function_lint_to_string*/
       
 19045     break;
       
 19046 
       
 19047 /****
       
 19048  *LINT_TO_WSTRING
       
 19049  */
       
 19050     case function_lint_to_wstring :
       
 19051     {
       
 19052         symbol_c *last_type_symbol = NULL;
       
 19053 
       
 19054         {
       
 19055             symbol_c *IN_type_symbol = param_data_type;
       
 19056             last_type_symbol = param_data_type;
       
 19057             
       
 19058             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19059             {
       
 19060         
       
 19061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 19062                 return return_type_symbol;
       
 19063                 
       
 19064             }
       
 19065             
       
 19066             ERROR;
       
 19067         }
       
 19068         
       
 19069     }/*function_lint_to_wstring*/
       
 19070     break;
       
 19071 
       
 19072 /****
       
 19073  *LINT_TO_DATE
       
 19074  */
       
 19075     case function_lint_to_date :
       
 19076     {
       
 19077         symbol_c *last_type_symbol = NULL;
       
 19078 
       
 19079         {
       
 19080             symbol_c *IN_type_symbol = param_data_type;
       
 19081             last_type_symbol = param_data_type;
       
 19082             
       
 19083             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19084             {
       
 19085         
       
 19086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19087                 return return_type_symbol;
       
 19088                 
       
 19089             }
       
 19090             
       
 19091             ERROR;
       
 19092         }
       
 19093         
       
 19094     }/*function_lint_to_date*/
       
 19095     break;
       
 19096 
       
 19097 /****
       
 19098  *LINT_TO_TOD
       
 19099  */
       
 19100     case function_lint_to_tod :
       
 19101     {
       
 19102         symbol_c *last_type_symbol = NULL;
       
 19103 
       
 19104         {
       
 19105             symbol_c *IN_type_symbol = param_data_type;
       
 19106             last_type_symbol = param_data_type;
       
 19107             
       
 19108             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19109             {
       
 19110         
       
 19111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19112                 return return_type_symbol;
       
 19113                 
       
 19114             }
       
 19115             
       
 19116             ERROR;
       
 19117         }
       
 19118         
       
 19119     }/*function_lint_to_tod*/
       
 19120     break;
       
 19121 
       
 19122 /****
       
 19123  *LINT_TO_DT
       
 19124  */
       
 19125     case function_lint_to_dt :
       
 19126     {
       
 19127         symbol_c *last_type_symbol = NULL;
       
 19128 
       
 19129         {
       
 19130             symbol_c *IN_type_symbol = param_data_type;
       
 19131             last_type_symbol = param_data_type;
       
 19132             
       
 19133             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 19134             {
       
 19135         
       
 19136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19137                 return return_type_symbol;
       
 19138                 
       
 19139             }
       
 19140             
       
 19141             ERROR;
       
 19142         }
       
 19143         
       
 19144     }/*function_lint_to_dt*/
       
 19145     break;
       
 19146 
       
 19147 /****
       
 19148  *USINT_TO_REAL
       
 19149  */
       
 19150     case function_usint_to_real :
       
 19151     {
       
 19152         symbol_c *last_type_symbol = NULL;
       
 19153 
       
 19154         {
       
 19155             symbol_c *IN_type_symbol = param_data_type;
       
 19156             last_type_symbol = param_data_type;
       
 19157             
       
 19158             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19159             {
       
 19160         
       
 19161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19162                 return return_type_symbol;
       
 19163                 
       
 19164             }
       
 19165             
       
 19166             ERROR;
       
 19167         }
       
 19168         
       
 19169     }/*function_usint_to_real*/
       
 19170     break;
       
 19171 
       
 19172 /****
       
 19173  *USINT_TO_LREAL
       
 19174  */
       
 19175     case function_usint_to_lreal :
       
 19176     {
       
 19177         symbol_c *last_type_symbol = NULL;
       
 19178 
       
 19179         {
       
 19180             symbol_c *IN_type_symbol = param_data_type;
       
 19181             last_type_symbol = param_data_type;
       
 19182             
       
 19183             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19184             {
       
 19185         
       
 19186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19187                 return return_type_symbol;
       
 19188                 
       
 19189             }
       
 19190             
       
 19191             ERROR;
       
 19192         }
       
 19193         
       
 19194     }/*function_usint_to_lreal*/
       
 19195     break;
       
 19196 
       
 19197 /****
       
 19198  *USINT_TO_SINT
       
 19199  */
       
 19200     case function_usint_to_sint :
       
 19201     {
       
 19202         symbol_c *last_type_symbol = NULL;
       
 19203 
       
 19204         {
       
 19205             symbol_c *IN_type_symbol = param_data_type;
       
 19206             last_type_symbol = param_data_type;
       
 19207             
       
 19208             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19209             {
       
 19210         
       
 19211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19212                 return return_type_symbol;
       
 19213                 
       
 19214             }
       
 19215             
       
 19216             ERROR;
       
 19217         }
       
 19218         
       
 19219     }/*function_usint_to_sint*/
       
 19220     break;
       
 19221 
       
 19222 /****
       
 19223  *USINT_TO_INT
       
 19224  */
       
 19225     case function_usint_to_int :
       
 19226     {
       
 19227         symbol_c *last_type_symbol = NULL;
       
 19228 
       
 19229         {
       
 19230             symbol_c *IN_type_symbol = param_data_type;
       
 19231             last_type_symbol = param_data_type;
       
 19232             
       
 19233             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19234             {
       
 19235         
       
 19236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19237                 return return_type_symbol;
       
 19238                 
       
 19239             }
       
 19240             
       
 19241             ERROR;
       
 19242         }
       
 19243         
       
 19244     }/*function_usint_to_int*/
       
 19245     break;
       
 19246 
       
 19247 /****
       
 19248  *USINT_TO_DINT
       
 19249  */
       
 19250     case function_usint_to_dint :
       
 19251     {
       
 19252         symbol_c *last_type_symbol = NULL;
       
 19253 
       
 19254         {
       
 19255             symbol_c *IN_type_symbol = param_data_type;
       
 19256             last_type_symbol = param_data_type;
       
 19257             
       
 19258             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19259             {
       
 19260         
       
 19261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19262                 return return_type_symbol;
       
 19263                 
       
 19264             }
       
 19265             
       
 19266             ERROR;
       
 19267         }
       
 19268         
       
 19269     }/*function_usint_to_dint*/
       
 19270     break;
       
 19271 
       
 19272 /****
       
 19273  *USINT_TO_LINT
       
 19274  */
       
 19275     case function_usint_to_lint :
       
 19276     {
       
 19277         symbol_c *last_type_symbol = NULL;
       
 19278 
       
 19279         {
       
 19280             symbol_c *IN_type_symbol = param_data_type;
       
 19281             last_type_symbol = param_data_type;
       
 19282             
       
 19283             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19284             {
       
 19285         
       
 19286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19287                 return return_type_symbol;
       
 19288                 
       
 19289             }
       
 19290             
       
 19291             ERROR;
       
 19292         }
       
 19293         
       
 19294     }/*function_usint_to_lint*/
       
 19295     break;
       
 19296 
       
 19297 /****
       
 19298  *USINT_TO_UINT
       
 19299  */
       
 19300     case function_usint_to_uint :
       
 19301     {
       
 19302         symbol_c *last_type_symbol = NULL;
       
 19303 
       
 19304         {
       
 19305             symbol_c *IN_type_symbol = param_data_type;
       
 19306             last_type_symbol = param_data_type;
       
 19307             
       
 19308             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19309             {
       
 19310         
       
 19311                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19312                 return return_type_symbol;
       
 19313                 
       
 19314             }
       
 19315             
       
 19316             ERROR;
       
 19317         }
       
 19318         
       
 19319     }/*function_usint_to_uint*/
       
 19320     break;
       
 19321 
       
 19322 /****
       
 19323  *USINT_TO_UDINT
       
 19324  */
       
 19325     case function_usint_to_udint :
       
 19326     {
       
 19327         symbol_c *last_type_symbol = NULL;
       
 19328 
       
 19329         {
       
 19330             symbol_c *IN_type_symbol = param_data_type;
       
 19331             last_type_symbol = param_data_type;
       
 19332             
       
 19333             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19334             {
       
 19335         
       
 19336                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19337                 return return_type_symbol;
       
 19338                 
       
 19339             }
       
 19340             
       
 19341             ERROR;
       
 19342         }
       
 19343         
       
 19344     }/*function_usint_to_udint*/
       
 19345     break;
       
 19346 
       
 19347 /****
       
 19348  *USINT_TO_ULINT
       
 19349  */
       
 19350     case function_usint_to_ulint :
       
 19351     {
       
 19352         symbol_c *last_type_symbol = NULL;
       
 19353 
       
 19354         {
       
 19355             symbol_c *IN_type_symbol = param_data_type;
       
 19356             last_type_symbol = param_data_type;
       
 19357             
       
 19358             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19359             {
       
 19360         
       
 19361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19362                 return return_type_symbol;
       
 19363                 
       
 19364             }
       
 19365             
       
 19366             ERROR;
       
 19367         }
       
 19368         
       
 19369     }/*function_usint_to_ulint*/
       
 19370     break;
       
 19371 
       
 19372 /****
       
 19373  *USINT_TO_TIME
       
 19374  */
       
 19375     case function_usint_to_time :
       
 19376     {
       
 19377         symbol_c *last_type_symbol = NULL;
       
 19378 
       
 19379         {
       
 19380             symbol_c *IN_type_symbol = param_data_type;
       
 19381             last_type_symbol = param_data_type;
       
 19382             
       
 19383             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19384             {
       
 19385         
       
 19386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19387                 return return_type_symbol;
       
 19388                 
       
 19389             }
       
 19390             
       
 19391             ERROR;
       
 19392         }
       
 19393         
       
 19394     }/*function_usint_to_time*/
       
 19395     break;
       
 19396 
       
 19397 /****
       
 19398  *USINT_TO_BOOL
       
 19399  */
       
 19400     case function_usint_to_bool :
       
 19401     {
       
 19402         symbol_c *last_type_symbol = NULL;
       
 19403 
       
 19404         {
       
 19405             symbol_c *IN_type_symbol = param_data_type;
       
 19406             last_type_symbol = param_data_type;
       
 19407             
       
 19408             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19409             {
       
 19410         
       
 19411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19412                 return return_type_symbol;
       
 19413                 
       
 19414             }
       
 19415             
       
 19416             ERROR;
       
 19417         }
       
 19418         
       
 19419     }/*function_usint_to_bool*/
       
 19420     break;
       
 19421 
       
 19422 /****
       
 19423  *USINT_TO_BYTE
       
 19424  */
       
 19425     case function_usint_to_byte :
       
 19426     {
       
 19427         symbol_c *last_type_symbol = NULL;
       
 19428 
       
 19429         {
       
 19430             symbol_c *IN_type_symbol = param_data_type;
       
 19431             last_type_symbol = param_data_type;
       
 19432             
       
 19433             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19434             {
       
 19435         
       
 19436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19437                 return return_type_symbol;
       
 19438                 
       
 19439             }
       
 19440             
       
 19441             ERROR;
       
 19442         }
       
 19443         
       
 19444     }/*function_usint_to_byte*/
       
 19445     break;
       
 19446 
       
 19447 /****
       
 19448  *USINT_TO_WORD
       
 19449  */
       
 19450     case function_usint_to_word :
       
 19451     {
       
 19452         symbol_c *last_type_symbol = NULL;
       
 19453 
       
 19454         {
       
 19455             symbol_c *IN_type_symbol = param_data_type;
       
 19456             last_type_symbol = param_data_type;
       
 19457             
       
 19458             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19459             {
       
 19460         
       
 19461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19462                 return return_type_symbol;
       
 19463                 
       
 19464             }
       
 19465             
       
 19466             ERROR;
       
 19467         }
       
 19468         
       
 19469     }/*function_usint_to_word*/
       
 19470     break;
       
 19471 
       
 19472 /****
       
 19473  *USINT_TO_DWORD
       
 19474  */
       
 19475     case function_usint_to_dword :
       
 19476     {
       
 19477         symbol_c *last_type_symbol = NULL;
       
 19478 
       
 19479         {
       
 19480             symbol_c *IN_type_symbol = param_data_type;
       
 19481             last_type_symbol = param_data_type;
       
 19482             
       
 19483             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19484             {
       
 19485         
       
 19486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19487                 return return_type_symbol;
       
 19488                 
       
 19489             }
       
 19490             
       
 19491             ERROR;
       
 19492         }
       
 19493         
       
 19494     }/*function_usint_to_dword*/
       
 19495     break;
       
 19496 
       
 19497 /****
       
 19498  *USINT_TO_LWORD
       
 19499  */
       
 19500     case function_usint_to_lword :
       
 19501     {
       
 19502         symbol_c *last_type_symbol = NULL;
       
 19503 
       
 19504         {
       
 19505             symbol_c *IN_type_symbol = param_data_type;
       
 19506             last_type_symbol = param_data_type;
       
 19507             
       
 19508             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19509             {
       
 19510         
       
 19511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19512                 return return_type_symbol;
       
 19513                 
       
 19514             }
       
 19515             
       
 19516             ERROR;
       
 19517         }
       
 19518         
       
 19519     }/*function_usint_to_lword*/
       
 19520     break;
       
 19521 
       
 19522 /****
       
 19523  *USINT_TO_STRING
       
 19524  */
       
 19525     case function_usint_to_string :
       
 19526     {
       
 19527         symbol_c *last_type_symbol = NULL;
       
 19528 
       
 19529         {
       
 19530             symbol_c *IN_type_symbol = param_data_type;
       
 19531             last_type_symbol = param_data_type;
       
 19532             
       
 19533             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19534             {
       
 19535         
       
 19536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19537                 return return_type_symbol;
       
 19538                 
       
 19539             }
       
 19540             
       
 19541             ERROR;
       
 19542         }
       
 19543         
       
 19544     }/*function_usint_to_string*/
       
 19545     break;
       
 19546 
       
 19547 /****
       
 19548  *USINT_TO_WSTRING
       
 19549  */
       
 19550     case function_usint_to_wstring :
       
 19551     {
       
 19552         symbol_c *last_type_symbol = NULL;
       
 19553 
       
 19554         {
       
 19555             symbol_c *IN_type_symbol = param_data_type;
       
 19556             last_type_symbol = param_data_type;
       
 19557             
       
 19558             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19559             {
       
 19560         
       
 19561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 19562                 return return_type_symbol;
       
 19563                 
       
 19564             }
       
 19565             
       
 19566             ERROR;
       
 19567         }
       
 19568         
       
 19569     }/*function_usint_to_wstring*/
       
 19570     break;
       
 19571 
       
 19572 /****
       
 19573  *USINT_TO_DATE
       
 19574  */
       
 19575     case function_usint_to_date :
       
 19576     {
       
 19577         symbol_c *last_type_symbol = NULL;
       
 19578 
       
 19579         {
       
 19580             symbol_c *IN_type_symbol = param_data_type;
       
 19581             last_type_symbol = param_data_type;
       
 19582             
       
 19583             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19584             {
       
 19585         
       
 19586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19587                 return return_type_symbol;
       
 19588                 
       
 19589             }
       
 19590             
       
 19591             ERROR;
       
 19592         }
       
 19593         
       
 19594     }/*function_usint_to_date*/
       
 19595     break;
       
 19596 
       
 19597 /****
       
 19598  *USINT_TO_TOD
       
 19599  */
       
 19600     case function_usint_to_tod :
       
 19601     {
       
 19602         symbol_c *last_type_symbol = NULL;
       
 19603 
       
 19604         {
       
 19605             symbol_c *IN_type_symbol = param_data_type;
       
 19606             last_type_symbol = param_data_type;
       
 19607             
       
 19608             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19609             {
       
 19610         
       
 19611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19612                 return return_type_symbol;
       
 19613                 
       
 19614             }
       
 19615             
       
 19616             ERROR;
       
 19617         }
       
 19618         
       
 19619     }/*function_usint_to_tod*/
       
 19620     break;
       
 19621 
       
 19622 /****
       
 19623  *USINT_TO_DT
       
 19624  */
       
 19625     case function_usint_to_dt :
       
 19626     {
       
 19627         symbol_c *last_type_symbol = NULL;
       
 19628 
       
 19629         {
       
 19630             symbol_c *IN_type_symbol = param_data_type;
       
 19631             last_type_symbol = param_data_type;
       
 19632             
       
 19633             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 19634             {
       
 19635         
       
 19636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19637                 return return_type_symbol;
       
 19638                 
       
 19639             }
       
 19640             
       
 19641             ERROR;
       
 19642         }
       
 19643         
       
 19644     }/*function_usint_to_dt*/
       
 19645     break;
       
 19646 
       
 19647 /****
       
 19648  *UINT_TO_REAL
       
 19649  */
       
 19650     case function_uint_to_real :
       
 19651     {
       
 19652         symbol_c *last_type_symbol = NULL;
       
 19653 
       
 19654         {
       
 19655             symbol_c *IN_type_symbol = param_data_type;
       
 19656             last_type_symbol = param_data_type;
       
 19657             
       
 19658             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19659             {
       
 19660         
       
 19661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19662                 return return_type_symbol;
       
 19663                 
       
 19664             }
       
 19665             
       
 19666             ERROR;
       
 19667         }
       
 19668         
       
 19669     }/*function_uint_to_real*/
       
 19670     break;
       
 19671 
       
 19672 /****
       
 19673  *UINT_TO_LREAL
       
 19674  */
       
 19675     case function_uint_to_lreal :
       
 19676     {
       
 19677         symbol_c *last_type_symbol = NULL;
       
 19678 
       
 19679         {
       
 19680             symbol_c *IN_type_symbol = param_data_type;
       
 19681             last_type_symbol = param_data_type;
       
 19682             
       
 19683             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19684             {
       
 19685         
       
 19686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19687                 return return_type_symbol;
       
 19688                 
       
 19689             }
       
 19690             
       
 19691             ERROR;
       
 19692         }
       
 19693         
       
 19694     }/*function_uint_to_lreal*/
       
 19695     break;
       
 19696 
       
 19697 /****
       
 19698  *UINT_TO_SINT
       
 19699  */
       
 19700     case function_uint_to_sint :
       
 19701     {
       
 19702         symbol_c *last_type_symbol = NULL;
       
 19703 
       
 19704         {
       
 19705             symbol_c *IN_type_symbol = param_data_type;
       
 19706             last_type_symbol = param_data_type;
       
 19707             
       
 19708             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19709             {
       
 19710         
       
 19711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19712                 return return_type_symbol;
       
 19713                 
       
 19714             }
       
 19715             
       
 19716             ERROR;
       
 19717         }
       
 19718         
       
 19719     }/*function_uint_to_sint*/
       
 19720     break;
       
 19721 
       
 19722 /****
       
 19723  *UINT_TO_INT
       
 19724  */
       
 19725     case function_uint_to_int :
       
 19726     {
       
 19727         symbol_c *last_type_symbol = NULL;
       
 19728 
       
 19729         {
       
 19730             symbol_c *IN_type_symbol = param_data_type;
       
 19731             last_type_symbol = param_data_type;
       
 19732             
       
 19733             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19734             {
       
 19735         
       
 19736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19737                 return return_type_symbol;
       
 19738                 
       
 19739             }
       
 19740             
       
 19741             ERROR;
       
 19742         }
       
 19743         
       
 19744     }/*function_uint_to_int*/
       
 19745     break;
       
 19746 
       
 19747 /****
       
 19748  *UINT_TO_DINT
       
 19749  */
       
 19750     case function_uint_to_dint :
       
 19751     {
       
 19752         symbol_c *last_type_symbol = NULL;
       
 19753 
       
 19754         {
       
 19755             symbol_c *IN_type_symbol = param_data_type;
       
 19756             last_type_symbol = param_data_type;
       
 19757             
       
 19758             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19759             {
       
 19760         
       
 19761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19762                 return return_type_symbol;
       
 19763                 
       
 19764             }
       
 19765             
       
 19766             ERROR;
       
 19767         }
       
 19768         
       
 19769     }/*function_uint_to_dint*/
       
 19770     break;
       
 19771 
       
 19772 /****
       
 19773  *UINT_TO_LINT
       
 19774  */
       
 19775     case function_uint_to_lint :
       
 19776     {
       
 19777         symbol_c *last_type_symbol = NULL;
       
 19778 
       
 19779         {
       
 19780             symbol_c *IN_type_symbol = param_data_type;
       
 19781             last_type_symbol = param_data_type;
       
 19782             
       
 19783             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19784             {
       
 19785         
       
 19786                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19787                 return return_type_symbol;
       
 19788                 
       
 19789             }
       
 19790             
       
 19791             ERROR;
       
 19792         }
       
 19793         
       
 19794     }/*function_uint_to_lint*/
       
 19795     break;
       
 19796 
       
 19797 /****
       
 19798  *UINT_TO_USINT
       
 19799  */
       
 19800     case function_uint_to_usint :
       
 19801     {
       
 19802         symbol_c *last_type_symbol = NULL;
       
 19803 
       
 19804         {
       
 19805             symbol_c *IN_type_symbol = param_data_type;
       
 19806             last_type_symbol = param_data_type;
       
 19807             
       
 19808             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19809             {
       
 19810         
       
 19811                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19812                 return return_type_symbol;
       
 19813                 
       
 19814             }
       
 19815             
       
 19816             ERROR;
       
 19817         }
       
 19818         
       
 19819     }/*function_uint_to_usint*/
       
 19820     break;
       
 19821 
       
 19822 /****
       
 19823  *UINT_TO_UDINT
       
 19824  */
       
 19825     case function_uint_to_udint :
       
 19826     {
       
 19827         symbol_c *last_type_symbol = NULL;
       
 19828 
       
 19829         {
       
 19830             symbol_c *IN_type_symbol = param_data_type;
       
 19831             last_type_symbol = param_data_type;
       
 19832             
       
 19833             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19834             {
       
 19835         
       
 19836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19837                 return return_type_symbol;
       
 19838                 
       
 19839             }
       
 19840             
       
 19841             ERROR;
       
 19842         }
       
 19843         
       
 19844     }/*function_uint_to_udint*/
       
 19845     break;
       
 19846 
       
 19847 /****
       
 19848  *UINT_TO_ULINT
       
 19849  */
       
 19850     case function_uint_to_ulint :
       
 19851     {
       
 19852         symbol_c *last_type_symbol = NULL;
       
 19853 
       
 19854         {
       
 19855             symbol_c *IN_type_symbol = param_data_type;
       
 19856             last_type_symbol = param_data_type;
       
 19857             
       
 19858             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19859             {
       
 19860         
       
 19861                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19862                 return return_type_symbol;
       
 19863                 
       
 19864             }
       
 19865             
       
 19866             ERROR;
       
 19867         }
       
 19868         
       
 19869     }/*function_uint_to_ulint*/
       
 19870     break;
       
 19871 
       
 19872 /****
       
 19873  *UINT_TO_TIME
       
 19874  */
       
 19875     case function_uint_to_time :
       
 19876     {
       
 19877         symbol_c *last_type_symbol = NULL;
       
 19878 
       
 19879         {
       
 19880             symbol_c *IN_type_symbol = param_data_type;
       
 19881             last_type_symbol = param_data_type;
       
 19882             
       
 19883             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19884             {
       
 19885         
       
 19886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19887                 return return_type_symbol;
       
 19888                 
       
 19889             }
       
 19890             
       
 19891             ERROR;
       
 19892         }
       
 19893         
       
 19894     }/*function_uint_to_time*/
       
 19895     break;
       
 19896 
       
 19897 /****
       
 19898  *UINT_TO_BOOL
       
 19899  */
       
 19900     case function_uint_to_bool :
       
 19901     {
       
 19902         symbol_c *last_type_symbol = NULL;
       
 19903 
       
 19904         {
       
 19905             symbol_c *IN_type_symbol = param_data_type;
       
 19906             last_type_symbol = param_data_type;
       
 19907             
       
 19908             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19909             {
       
 19910         
       
 19911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19912                 return return_type_symbol;
       
 19913                 
       
 19914             }
       
 19915             
       
 19916             ERROR;
       
 19917         }
       
 19918         
       
 19919     }/*function_uint_to_bool*/
       
 19920     break;
       
 19921 
       
 19922 /****
       
 19923  *UINT_TO_BYTE
       
 19924  */
       
 19925     case function_uint_to_byte :
       
 19926     {
       
 19927         symbol_c *last_type_symbol = NULL;
       
 19928 
       
 19929         {
       
 19930             symbol_c *IN_type_symbol = param_data_type;
       
 19931             last_type_symbol = param_data_type;
       
 19932             
       
 19933             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19934             {
       
 19935         
       
 19936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19937                 return return_type_symbol;
       
 19938                 
       
 19939             }
       
 19940             
       
 19941             ERROR;
       
 19942         }
       
 19943         
       
 19944     }/*function_uint_to_byte*/
       
 19945     break;
       
 19946 
       
 19947 /****
       
 19948  *UINT_TO_WORD
       
 19949  */
       
 19950     case function_uint_to_word :
       
 19951     {
       
 19952         symbol_c *last_type_symbol = NULL;
       
 19953 
       
 19954         {
       
 19955             symbol_c *IN_type_symbol = param_data_type;
       
 19956             last_type_symbol = param_data_type;
       
 19957             
       
 19958             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19959             {
       
 19960         
       
 19961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19962                 return return_type_symbol;
       
 19963                 
       
 19964             }
       
 19965             
       
 19966             ERROR;
       
 19967         }
       
 19968         
       
 19969     }/*function_uint_to_word*/
       
 19970     break;
       
 19971 
       
 19972 /****
       
 19973  *UINT_TO_DWORD
       
 19974  */
       
 19975     case function_uint_to_dword :
       
 19976     {
       
 19977         symbol_c *last_type_symbol = NULL;
       
 19978 
       
 19979         {
       
 19980             symbol_c *IN_type_symbol = param_data_type;
       
 19981             last_type_symbol = param_data_type;
       
 19982             
       
 19983             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 19984             {
       
 19985         
       
 19986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19987                 return return_type_symbol;
       
 19988                 
       
 19989             }
       
 19990             
       
 19991             ERROR;
       
 19992         }
       
 19993         
       
 19994     }/*function_uint_to_dword*/
       
 19995     break;
       
 19996 
       
 19997 /****
       
 19998  *UINT_TO_LWORD
       
 19999  */
       
 20000     case function_uint_to_lword :
       
 20001     {
       
 20002         symbol_c *last_type_symbol = NULL;
       
 20003 
       
 20004         {
       
 20005             symbol_c *IN_type_symbol = param_data_type;
       
 20006             last_type_symbol = param_data_type;
       
 20007             
       
 20008             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20009             {
       
 20010         
       
 20011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20012                 return return_type_symbol;
       
 20013                 
       
 20014             }
       
 20015             
       
 20016             ERROR;
       
 20017         }
       
 20018         
       
 20019     }/*function_uint_to_lword*/
       
 20020     break;
       
 20021 
       
 20022 /****
       
 20023  *UINT_TO_STRING
       
 20024  */
       
 20025     case function_uint_to_string :
       
 20026     {
       
 20027         symbol_c *last_type_symbol = NULL;
       
 20028 
       
 20029         {
       
 20030             symbol_c *IN_type_symbol = param_data_type;
       
 20031             last_type_symbol = param_data_type;
       
 20032             
       
 20033             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20034             {
       
 20035         
       
 20036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20037                 return return_type_symbol;
       
 20038                 
       
 20039             }
       
 20040             
       
 20041             ERROR;
       
 20042         }
       
 20043         
       
 20044     }/*function_uint_to_string*/
       
 20045     break;
       
 20046 
       
 20047 /****
       
 20048  *UINT_TO_WSTRING
       
 20049  */
       
 20050     case function_uint_to_wstring :
       
 20051     {
       
 20052         symbol_c *last_type_symbol = NULL;
       
 20053 
       
 20054         {
       
 20055             symbol_c *IN_type_symbol = param_data_type;
       
 20056             last_type_symbol = param_data_type;
       
 20057             
       
 20058             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20059             {
       
 20060         
       
 20061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 20062                 return return_type_symbol;
       
 20063                 
       
 20064             }
       
 20065             
       
 20066             ERROR;
       
 20067         }
       
 20068         
       
 20069     }/*function_uint_to_wstring*/
       
 20070     break;
       
 20071 
       
 20072 /****
       
 20073  *UINT_TO_DATE
       
 20074  */
       
 20075     case function_uint_to_date :
       
 20076     {
       
 20077         symbol_c *last_type_symbol = NULL;
       
 20078 
       
 20079         {
       
 20080             symbol_c *IN_type_symbol = param_data_type;
       
 20081             last_type_symbol = param_data_type;
       
 20082             
       
 20083             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20084             {
       
 20085         
       
 20086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20087                 return return_type_symbol;
       
 20088                 
       
 20089             }
       
 20090             
       
 20091             ERROR;
       
 20092         }
       
 20093         
       
 20094     }/*function_uint_to_date*/
       
 20095     break;
       
 20096 
       
 20097 /****
       
 20098  *UINT_TO_TOD
       
 20099  */
       
 20100     case function_uint_to_tod :
       
 20101     {
       
 20102         symbol_c *last_type_symbol = NULL;
       
 20103 
       
 20104         {
       
 20105             symbol_c *IN_type_symbol = param_data_type;
       
 20106             last_type_symbol = param_data_type;
       
 20107             
       
 20108             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20109             {
       
 20110         
       
 20111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20112                 return return_type_symbol;
       
 20113                 
       
 20114             }
       
 20115             
       
 20116             ERROR;
       
 20117         }
       
 20118         
       
 20119     }/*function_uint_to_tod*/
       
 20120     break;
       
 20121 
       
 20122 /****
       
 20123  *UINT_TO_DT
       
 20124  */
       
 20125     case function_uint_to_dt :
       
 20126     {
       
 20127         symbol_c *last_type_symbol = NULL;
       
 20128 
       
 20129         {
       
 20130             symbol_c *IN_type_symbol = param_data_type;
       
 20131             last_type_symbol = param_data_type;
       
 20132             
       
 20133             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 20134             {
       
 20135         
       
 20136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20137                 return return_type_symbol;
       
 20138                 
       
 20139             }
       
 20140             
       
 20141             ERROR;
       
 20142         }
       
 20143         
       
 20144     }/*function_uint_to_dt*/
       
 20145     break;
       
 20146 
       
 20147 /****
       
 20148  *UDINT_TO_REAL
       
 20149  */
       
 20150     case function_udint_to_real :
       
 20151     {
       
 20152         symbol_c *last_type_symbol = NULL;
       
 20153 
       
 20154         {
       
 20155             symbol_c *IN_type_symbol = param_data_type;
       
 20156             last_type_symbol = param_data_type;
       
 20157             
       
 20158             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20159             {
       
 20160         
       
 20161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20162                 return return_type_symbol;
       
 20163                 
       
 20164             }
       
 20165             
       
 20166             ERROR;
       
 20167         }
       
 20168         
       
 20169     }/*function_udint_to_real*/
       
 20170     break;
       
 20171 
       
 20172 /****
       
 20173  *UDINT_TO_LREAL
       
 20174  */
       
 20175     case function_udint_to_lreal :
       
 20176     {
       
 20177         symbol_c *last_type_symbol = NULL;
       
 20178 
       
 20179         {
       
 20180             symbol_c *IN_type_symbol = param_data_type;
       
 20181             last_type_symbol = param_data_type;
       
 20182             
       
 20183             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20184             {
       
 20185         
       
 20186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20187                 return return_type_symbol;
       
 20188                 
       
 20189             }
       
 20190             
       
 20191             ERROR;
       
 20192         }
       
 20193         
       
 20194     }/*function_udint_to_lreal*/
       
 20195     break;
       
 20196 
       
 20197 /****
       
 20198  *UDINT_TO_SINT
       
 20199  */
       
 20200     case function_udint_to_sint :
       
 20201     {
       
 20202         symbol_c *last_type_symbol = NULL;
       
 20203 
       
 20204         {
       
 20205             symbol_c *IN_type_symbol = param_data_type;
       
 20206             last_type_symbol = param_data_type;
       
 20207             
       
 20208             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20209             {
       
 20210         
       
 20211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20212                 return return_type_symbol;
       
 20213                 
       
 20214             }
       
 20215             
       
 20216             ERROR;
       
 20217         }
       
 20218         
       
 20219     }/*function_udint_to_sint*/
       
 20220     break;
       
 20221 
       
 20222 /****
       
 20223  *UDINT_TO_INT
       
 20224  */
       
 20225     case function_udint_to_int :
       
 20226     {
       
 20227         symbol_c *last_type_symbol = NULL;
       
 20228 
       
 20229         {
       
 20230             symbol_c *IN_type_symbol = param_data_type;
       
 20231             last_type_symbol = param_data_type;
       
 20232             
       
 20233             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20234             {
       
 20235         
       
 20236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20237                 return return_type_symbol;
       
 20238                 
       
 20239             }
       
 20240             
       
 20241             ERROR;
       
 20242         }
       
 20243         
       
 20244     }/*function_udint_to_int*/
       
 20245     break;
       
 20246 
       
 20247 /****
       
 20248  *UDINT_TO_DINT
       
 20249  */
       
 20250     case function_udint_to_dint :
       
 20251     {
       
 20252         symbol_c *last_type_symbol = NULL;
       
 20253 
       
 20254         {
       
 20255             symbol_c *IN_type_symbol = param_data_type;
       
 20256             last_type_symbol = param_data_type;
       
 20257             
       
 20258             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20259             {
       
 20260         
       
 20261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20262                 return return_type_symbol;
       
 20263                 
       
 20264             }
       
 20265             
       
 20266             ERROR;
       
 20267         }
       
 20268         
       
 20269     }/*function_udint_to_dint*/
       
 20270     break;
       
 20271 
       
 20272 /****
       
 20273  *UDINT_TO_LINT
       
 20274  */
       
 20275     case function_udint_to_lint :
       
 20276     {
       
 20277         symbol_c *last_type_symbol = NULL;
       
 20278 
       
 20279         {
       
 20280             symbol_c *IN_type_symbol = param_data_type;
       
 20281             last_type_symbol = param_data_type;
       
 20282             
       
 20283             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20284             {
       
 20285         
       
 20286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20287                 return return_type_symbol;
       
 20288                 
       
 20289             }
       
 20290             
       
 20291             ERROR;
       
 20292         }
       
 20293         
       
 20294     }/*function_udint_to_lint*/
       
 20295     break;
       
 20296 
       
 20297 /****
       
 20298  *UDINT_TO_USINT
       
 20299  */
       
 20300     case function_udint_to_usint :
       
 20301     {
       
 20302         symbol_c *last_type_symbol = NULL;
       
 20303 
       
 20304         {
       
 20305             symbol_c *IN_type_symbol = param_data_type;
       
 20306             last_type_symbol = param_data_type;
       
 20307             
       
 20308             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20309             {
       
 20310         
       
 20311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20312                 return return_type_symbol;
       
 20313                 
       
 20314             }
       
 20315             
       
 20316             ERROR;
       
 20317         }
       
 20318         
       
 20319     }/*function_udint_to_usint*/
       
 20320     break;
       
 20321 
       
 20322 /****
       
 20323  *UDINT_TO_UINT
       
 20324  */
       
 20325     case function_udint_to_uint :
       
 20326     {
       
 20327         symbol_c *last_type_symbol = NULL;
       
 20328 
       
 20329         {
       
 20330             symbol_c *IN_type_symbol = param_data_type;
       
 20331             last_type_symbol = param_data_type;
       
 20332             
       
 20333             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20334             {
       
 20335         
       
 20336                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20337                 return return_type_symbol;
       
 20338                 
       
 20339             }
       
 20340             
       
 20341             ERROR;
       
 20342         }
       
 20343         
       
 20344     }/*function_udint_to_uint*/
       
 20345     break;
       
 20346 
       
 20347 /****
       
 20348  *UDINT_TO_ULINT
       
 20349  */
       
 20350     case function_udint_to_ulint :
       
 20351     {
       
 20352         symbol_c *last_type_symbol = NULL;
       
 20353 
       
 20354         {
       
 20355             symbol_c *IN_type_symbol = param_data_type;
       
 20356             last_type_symbol = param_data_type;
       
 20357             
       
 20358             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20359             {
       
 20360         
       
 20361                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20362                 return return_type_symbol;
       
 20363                 
       
 20364             }
       
 20365             
       
 20366             ERROR;
       
 20367         }
       
 20368         
       
 20369     }/*function_udint_to_ulint*/
       
 20370     break;
       
 20371 
       
 20372 /****
       
 20373  *UDINT_TO_TIME
       
 20374  */
       
 20375     case function_udint_to_time :
       
 20376     {
       
 20377         symbol_c *last_type_symbol = NULL;
       
 20378 
       
 20379         {
       
 20380             symbol_c *IN_type_symbol = param_data_type;
       
 20381             last_type_symbol = param_data_type;
       
 20382             
       
 20383             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20384             {
       
 20385         
       
 20386                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20387                 return return_type_symbol;
       
 20388                 
       
 20389             }
       
 20390             
       
 20391             ERROR;
       
 20392         }
       
 20393         
       
 20394     }/*function_udint_to_time*/
       
 20395     break;
       
 20396 
       
 20397 /****
       
 20398  *UDINT_TO_BOOL
       
 20399  */
       
 20400     case function_udint_to_bool :
       
 20401     {
       
 20402         symbol_c *last_type_symbol = NULL;
       
 20403 
       
 20404         {
       
 20405             symbol_c *IN_type_symbol = param_data_type;
       
 20406             last_type_symbol = param_data_type;
       
 20407             
       
 20408             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20409             {
       
 20410         
       
 20411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20412                 return return_type_symbol;
       
 20413                 
       
 20414             }
       
 20415             
       
 20416             ERROR;
       
 20417         }
       
 20418         
       
 20419     }/*function_udint_to_bool*/
       
 20420     break;
       
 20421 
       
 20422 /****
       
 20423  *UDINT_TO_BYTE
       
 20424  */
       
 20425     case function_udint_to_byte :
       
 20426     {
       
 20427         symbol_c *last_type_symbol = NULL;
       
 20428 
       
 20429         {
       
 20430             symbol_c *IN_type_symbol = param_data_type;
       
 20431             last_type_symbol = param_data_type;
       
 20432             
       
 20433             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20434             {
       
 20435         
       
 20436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20437                 return return_type_symbol;
       
 20438                 
       
 20439             }
       
 20440             
       
 20441             ERROR;
       
 20442         }
       
 20443         
       
 20444     }/*function_udint_to_byte*/
       
 20445     break;
       
 20446 
       
 20447 /****
       
 20448  *UDINT_TO_WORD
       
 20449  */
       
 20450     case function_udint_to_word :
       
 20451     {
       
 20452         symbol_c *last_type_symbol = NULL;
       
 20453 
       
 20454         {
       
 20455             symbol_c *IN_type_symbol = param_data_type;
       
 20456             last_type_symbol = param_data_type;
       
 20457             
       
 20458             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20459             {
       
 20460         
       
 20461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20462                 return return_type_symbol;
       
 20463                 
       
 20464             }
       
 20465             
       
 20466             ERROR;
       
 20467         }
       
 20468         
       
 20469     }/*function_udint_to_word*/
       
 20470     break;
       
 20471 
       
 20472 /****
       
 20473  *UDINT_TO_DWORD
       
 20474  */
       
 20475     case function_udint_to_dword :
       
 20476     {
       
 20477         symbol_c *last_type_symbol = NULL;
       
 20478 
       
 20479         {
       
 20480             symbol_c *IN_type_symbol = param_data_type;
       
 20481             last_type_symbol = param_data_type;
       
 20482             
       
 20483             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20484             {
       
 20485         
       
 20486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20487                 return return_type_symbol;
       
 20488                 
       
 20489             }
       
 20490             
       
 20491             ERROR;
       
 20492         }
       
 20493         
       
 20494     }/*function_udint_to_dword*/
       
 20495     break;
       
 20496 
       
 20497 /****
       
 20498  *UDINT_TO_LWORD
       
 20499  */
       
 20500     case function_udint_to_lword :
       
 20501     {
       
 20502         symbol_c *last_type_symbol = NULL;
       
 20503 
       
 20504         {
       
 20505             symbol_c *IN_type_symbol = param_data_type;
       
 20506             last_type_symbol = param_data_type;
       
 20507             
       
 20508             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20509             {
       
 20510         
       
 20511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20512                 return return_type_symbol;
       
 20513                 
       
 20514             }
       
 20515             
       
 20516             ERROR;
       
 20517         }
       
 20518         
       
 20519     }/*function_udint_to_lword*/
       
 20520     break;
       
 20521 
       
 20522 /****
       
 20523  *UDINT_TO_STRING
       
 20524  */
       
 20525     case function_udint_to_string :
       
 20526     {
       
 20527         symbol_c *last_type_symbol = NULL;
       
 20528 
       
 20529         {
       
 20530             symbol_c *IN_type_symbol = param_data_type;
       
 20531             last_type_symbol = param_data_type;
       
 20532             
       
 20533             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20534             {
       
 20535         
       
 20536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20537                 return return_type_symbol;
       
 20538                 
       
 20539             }
       
 20540             
       
 20541             ERROR;
       
 20542         }
       
 20543         
       
 20544     }/*function_udint_to_string*/
       
 20545     break;
       
 20546 
       
 20547 /****
       
 20548  *UDINT_TO_WSTRING
       
 20549  */
       
 20550     case function_udint_to_wstring :
       
 20551     {
       
 20552         symbol_c *last_type_symbol = NULL;
       
 20553 
       
 20554         {
       
 20555             symbol_c *IN_type_symbol = param_data_type;
       
 20556             last_type_symbol = param_data_type;
       
 20557             
       
 20558             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20559             {
       
 20560         
       
 20561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 20562                 return return_type_symbol;
       
 20563                 
       
 20564             }
       
 20565             
       
 20566             ERROR;
       
 20567         }
       
 20568         
       
 20569     }/*function_udint_to_wstring*/
       
 20570     break;
       
 20571 
       
 20572 /****
       
 20573  *UDINT_TO_DATE
       
 20574  */
       
 20575     case function_udint_to_date :
       
 20576     {
       
 20577         symbol_c *last_type_symbol = NULL;
       
 20578 
       
 20579         {
       
 20580             symbol_c *IN_type_symbol = param_data_type;
       
 20581             last_type_symbol = param_data_type;
       
 20582             
       
 20583             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20584             {
       
 20585         
       
 20586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20587                 return return_type_symbol;
       
 20588                 
       
 20589             }
       
 20590             
       
 20591             ERROR;
       
 20592         }
       
 20593         
       
 20594     }/*function_udint_to_date*/
       
 20595     break;
       
 20596 
       
 20597 /****
       
 20598  *UDINT_TO_TOD
       
 20599  */
       
 20600     case function_udint_to_tod :
       
 20601     {
       
 20602         symbol_c *last_type_symbol = NULL;
       
 20603 
       
 20604         {
       
 20605             symbol_c *IN_type_symbol = param_data_type;
       
 20606             last_type_symbol = param_data_type;
       
 20607             
       
 20608             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20609             {
       
 20610         
       
 20611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20612                 return return_type_symbol;
       
 20613                 
       
 20614             }
       
 20615             
       
 20616             ERROR;
       
 20617         }
       
 20618         
       
 20619     }/*function_udint_to_tod*/
       
 20620     break;
       
 20621 
       
 20622 /****
       
 20623  *UDINT_TO_DT
       
 20624  */
       
 20625     case function_udint_to_dt :
       
 20626     {
       
 20627         symbol_c *last_type_symbol = NULL;
       
 20628 
       
 20629         {
       
 20630             symbol_c *IN_type_symbol = param_data_type;
       
 20631             last_type_symbol = param_data_type;
       
 20632             
       
 20633             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 20634             {
       
 20635         
       
 20636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20637                 return return_type_symbol;
       
 20638                 
       
 20639             }
       
 20640             
       
 20641             ERROR;
       
 20642         }
       
 20643         
       
 20644     }/*function_udint_to_dt*/
       
 20645     break;
       
 20646 
       
 20647 /****
       
 20648  *ULINT_TO_REAL
       
 20649  */
       
 20650     case function_ulint_to_real :
       
 20651     {
       
 20652         symbol_c *last_type_symbol = NULL;
       
 20653 
       
 20654         {
       
 20655             symbol_c *IN_type_symbol = param_data_type;
       
 20656             last_type_symbol = param_data_type;
       
 20657             
       
 20658             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20659             {
       
 20660         
       
 20661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20662                 return return_type_symbol;
       
 20663                 
       
 20664             }
       
 20665             
       
 20666             ERROR;
       
 20667         }
       
 20668         
       
 20669     }/*function_ulint_to_real*/
       
 20670     break;
       
 20671 
       
 20672 /****
       
 20673  *ULINT_TO_LREAL
       
 20674  */
       
 20675     case function_ulint_to_lreal :
       
 20676     {
       
 20677         symbol_c *last_type_symbol = NULL;
       
 20678 
       
 20679         {
       
 20680             symbol_c *IN_type_symbol = param_data_type;
       
 20681             last_type_symbol = param_data_type;
       
 20682             
       
 20683             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20684             {
       
 20685         
       
 20686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20687                 return return_type_symbol;
       
 20688                 
       
 20689             }
       
 20690             
       
 20691             ERROR;
       
 20692         }
       
 20693         
       
 20694     }/*function_ulint_to_lreal*/
       
 20695     break;
       
 20696 
       
 20697 /****
       
 20698  *ULINT_TO_SINT
       
 20699  */
       
 20700     case function_ulint_to_sint :
       
 20701     {
       
 20702         symbol_c *last_type_symbol = NULL;
       
 20703 
       
 20704         {
       
 20705             symbol_c *IN_type_symbol = param_data_type;
       
 20706             last_type_symbol = param_data_type;
       
 20707             
       
 20708             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20709             {
       
 20710         
       
 20711                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20712                 return return_type_symbol;
       
 20713                 
       
 20714             }
       
 20715             
       
 20716             ERROR;
       
 20717         }
       
 20718         
       
 20719     }/*function_ulint_to_sint*/
       
 20720     break;
       
 20721 
       
 20722 /****
       
 20723  *ULINT_TO_INT
       
 20724  */
       
 20725     case function_ulint_to_int :
       
 20726     {
       
 20727         symbol_c *last_type_symbol = NULL;
       
 20728 
       
 20729         {
       
 20730             symbol_c *IN_type_symbol = param_data_type;
       
 20731             last_type_symbol = param_data_type;
       
 20732             
       
 20733             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20734             {
       
 20735         
       
 20736                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20737                 return return_type_symbol;
       
 20738                 
       
 20739             }
       
 20740             
       
 20741             ERROR;
       
 20742         }
       
 20743         
       
 20744     }/*function_ulint_to_int*/
       
 20745     break;
       
 20746 
       
 20747 /****
       
 20748  *ULINT_TO_DINT
       
 20749  */
       
 20750     case function_ulint_to_dint :
       
 20751     {
       
 20752         symbol_c *last_type_symbol = NULL;
       
 20753 
       
 20754         {
       
 20755             symbol_c *IN_type_symbol = param_data_type;
       
 20756             last_type_symbol = param_data_type;
       
 20757             
       
 20758             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20759             {
       
 20760         
       
 20761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20762                 return return_type_symbol;
       
 20763                 
       
 20764             }
       
 20765             
       
 20766             ERROR;
       
 20767         }
       
 20768         
       
 20769     }/*function_ulint_to_dint*/
       
 20770     break;
       
 20771 
       
 20772 /****
       
 20773  *ULINT_TO_LINT
       
 20774  */
       
 20775     case function_ulint_to_lint :
       
 20776     {
       
 20777         symbol_c *last_type_symbol = NULL;
       
 20778 
       
 20779         {
       
 20780             symbol_c *IN_type_symbol = param_data_type;
       
 20781             last_type_symbol = param_data_type;
       
 20782             
       
 20783             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20784             {
       
 20785         
       
 20786                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20787                 return return_type_symbol;
       
 20788                 
       
 20789             }
       
 20790             
       
 20791             ERROR;
       
 20792         }
       
 20793         
       
 20794     }/*function_ulint_to_lint*/
       
 20795     break;
       
 20796 
       
 20797 /****
       
 20798  *ULINT_TO_USINT
       
 20799  */
       
 20800     case function_ulint_to_usint :
       
 20801     {
       
 20802         symbol_c *last_type_symbol = NULL;
       
 20803 
       
 20804         {
       
 20805             symbol_c *IN_type_symbol = param_data_type;
       
 20806             last_type_symbol = param_data_type;
       
 20807             
       
 20808             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20809             {
       
 20810         
       
 20811                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20812                 return return_type_symbol;
       
 20813                 
       
 20814             }
       
 20815             
       
 20816             ERROR;
       
 20817         }
       
 20818         
       
 20819     }/*function_ulint_to_usint*/
       
 20820     break;
       
 20821 
       
 20822 /****
       
 20823  *ULINT_TO_UINT
       
 20824  */
       
 20825     case function_ulint_to_uint :
       
 20826     {
       
 20827         symbol_c *last_type_symbol = NULL;
       
 20828 
       
 20829         {
       
 20830             symbol_c *IN_type_symbol = param_data_type;
       
 20831             last_type_symbol = param_data_type;
       
 20832             
       
 20833             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20834             {
       
 20835         
       
 20836                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20837                 return return_type_symbol;
       
 20838                 
       
 20839             }
       
 20840             
       
 20841             ERROR;
       
 20842         }
       
 20843         
       
 20844     }/*function_ulint_to_uint*/
       
 20845     break;
       
 20846 
       
 20847 /****
       
 20848  *ULINT_TO_UDINT
       
 20849  */
       
 20850     case function_ulint_to_udint :
       
 20851     {
       
 20852         symbol_c *last_type_symbol = NULL;
       
 20853 
       
 20854         {
       
 20855             symbol_c *IN_type_symbol = param_data_type;
       
 20856             last_type_symbol = param_data_type;
       
 20857             
       
 20858             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20859             {
       
 20860         
       
 20861                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20862                 return return_type_symbol;
       
 20863                 
       
 20864             }
       
 20865             
       
 20866             ERROR;
       
 20867         }
       
 20868         
       
 20869     }/*function_ulint_to_udint*/
       
 20870     break;
       
 20871 
       
 20872 /****
       
 20873  *ULINT_TO_TIME
       
 20874  */
       
 20875     case function_ulint_to_time :
       
 20876     {
       
 20877         symbol_c *last_type_symbol = NULL;
       
 20878 
       
 20879         {
       
 20880             symbol_c *IN_type_symbol = param_data_type;
       
 20881             last_type_symbol = param_data_type;
       
 20882             
       
 20883             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20884             {
       
 20885         
       
 20886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20887                 return return_type_symbol;
       
 20888                 
       
 20889             }
       
 20890             
       
 20891             ERROR;
       
 20892         }
       
 20893         
       
 20894     }/*function_ulint_to_time*/
       
 20895     break;
       
 20896 
       
 20897 /****
       
 20898  *ULINT_TO_BOOL
       
 20899  */
       
 20900     case function_ulint_to_bool :
       
 20901     {
       
 20902         symbol_c *last_type_symbol = NULL;
       
 20903 
       
 20904         {
       
 20905             symbol_c *IN_type_symbol = param_data_type;
       
 20906             last_type_symbol = param_data_type;
       
 20907             
       
 20908             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20909             {
       
 20910         
       
 20911                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20912                 return return_type_symbol;
       
 20913                 
       
 20914             }
       
 20915             
       
 20916             ERROR;
       
 20917         }
       
 20918         
       
 20919     }/*function_ulint_to_bool*/
       
 20920     break;
       
 20921 
       
 20922 /****
       
 20923  *ULINT_TO_BYTE
       
 20924  */
       
 20925     case function_ulint_to_byte :
       
 20926     {
       
 20927         symbol_c *last_type_symbol = NULL;
       
 20928 
       
 20929         {
       
 20930             symbol_c *IN_type_symbol = param_data_type;
       
 20931             last_type_symbol = param_data_type;
       
 20932             
       
 20933             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20934             {
       
 20935         
       
 20936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20937                 return return_type_symbol;
       
 20938                 
       
 20939             }
       
 20940             
       
 20941             ERROR;
       
 20942         }
       
 20943         
       
 20944     }/*function_ulint_to_byte*/
       
 20945     break;
       
 20946 
       
 20947 /****
       
 20948  *ULINT_TO_WORD
       
 20949  */
       
 20950     case function_ulint_to_word :
       
 20951     {
       
 20952         symbol_c *last_type_symbol = NULL;
       
 20953 
       
 20954         {
       
 20955             symbol_c *IN_type_symbol = param_data_type;
       
 20956             last_type_symbol = param_data_type;
       
 20957             
       
 20958             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20959             {
       
 20960         
       
 20961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20962                 return return_type_symbol;
       
 20963                 
       
 20964             }
       
 20965             
       
 20966             ERROR;
       
 20967         }
       
 20968         
       
 20969     }/*function_ulint_to_word*/
       
 20970     break;
       
 20971 
       
 20972 /****
       
 20973  *ULINT_TO_DWORD
       
 20974  */
       
 20975     case function_ulint_to_dword :
       
 20976     {
       
 20977         symbol_c *last_type_symbol = NULL;
       
 20978 
       
 20979         {
       
 20980             symbol_c *IN_type_symbol = param_data_type;
       
 20981             last_type_symbol = param_data_type;
       
 20982             
       
 20983             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 20984             {
       
 20985         
       
 20986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20987                 return return_type_symbol;
       
 20988                 
       
 20989             }
       
 20990             
       
 20991             ERROR;
       
 20992         }
       
 20993         
       
 20994     }/*function_ulint_to_dword*/
       
 20995     break;
       
 20996 
       
 20997 /****
       
 20998  *ULINT_TO_LWORD
       
 20999  */
       
 21000     case function_ulint_to_lword :
       
 21001     {
       
 21002         symbol_c *last_type_symbol = NULL;
       
 21003 
       
 21004         {
       
 21005             symbol_c *IN_type_symbol = param_data_type;
       
 21006             last_type_symbol = param_data_type;
       
 21007             
       
 21008             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21009             {
       
 21010         
       
 21011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21012                 return return_type_symbol;
       
 21013                 
       
 21014             }
       
 21015             
       
 21016             ERROR;
       
 21017         }
       
 21018         
       
 21019     }/*function_ulint_to_lword*/
       
 21020     break;
       
 21021 
       
 21022 /****
       
 21023  *ULINT_TO_STRING
       
 21024  */
       
 21025     case function_ulint_to_string :
       
 21026     {
       
 21027         symbol_c *last_type_symbol = NULL;
       
 21028 
       
 21029         {
       
 21030             symbol_c *IN_type_symbol = param_data_type;
       
 21031             last_type_symbol = param_data_type;
       
 21032             
       
 21033             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21034             {
       
 21035         
       
 21036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21037                 return return_type_symbol;
       
 21038                 
       
 21039             }
       
 21040             
       
 21041             ERROR;
       
 21042         }
       
 21043         
       
 21044     }/*function_ulint_to_string*/
       
 21045     break;
       
 21046 
       
 21047 /****
       
 21048  *ULINT_TO_WSTRING
       
 21049  */
       
 21050     case function_ulint_to_wstring :
       
 21051     {
       
 21052         symbol_c *last_type_symbol = NULL;
       
 21053 
       
 21054         {
       
 21055             symbol_c *IN_type_symbol = param_data_type;
       
 21056             last_type_symbol = param_data_type;
       
 21057             
       
 21058             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21059             {
       
 21060         
       
 21061                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21062                 return return_type_symbol;
       
 21063                 
       
 21064             }
       
 21065             
       
 21066             ERROR;
       
 21067         }
       
 21068         
       
 21069     }/*function_ulint_to_wstring*/
       
 21070     break;
       
 21071 
       
 21072 /****
       
 21073  *ULINT_TO_DATE
       
 21074  */
       
 21075     case function_ulint_to_date :
       
 21076     {
       
 21077         symbol_c *last_type_symbol = NULL;
       
 21078 
       
 21079         {
       
 21080             symbol_c *IN_type_symbol = param_data_type;
       
 21081             last_type_symbol = param_data_type;
       
 21082             
       
 21083             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21084             {
       
 21085         
       
 21086                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21087                 return return_type_symbol;
       
 21088                 
       
 21089             }
       
 21090             
       
 21091             ERROR;
       
 21092         }
       
 21093         
       
 21094     }/*function_ulint_to_date*/
       
 21095     break;
       
 21096 
       
 21097 /****
       
 21098  *ULINT_TO_TOD
       
 21099  */
       
 21100     case function_ulint_to_tod :
       
 21101     {
       
 21102         symbol_c *last_type_symbol = NULL;
       
 21103 
       
 21104         {
       
 21105             symbol_c *IN_type_symbol = param_data_type;
       
 21106             last_type_symbol = param_data_type;
       
 21107             
       
 21108             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21109             {
       
 21110         
       
 21111                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21112                 return return_type_symbol;
       
 21113                 
       
 21114             }
       
 21115             
       
 21116             ERROR;
       
 21117         }
       
 21118         
       
 21119     }/*function_ulint_to_tod*/
       
 21120     break;
       
 21121 
       
 21122 /****
       
 21123  *ULINT_TO_DT
       
 21124  */
       
 21125     case function_ulint_to_dt :
       
 21126     {
       
 21127         symbol_c *last_type_symbol = NULL;
       
 21128 
       
 21129         {
       
 21130             symbol_c *IN_type_symbol = param_data_type;
       
 21131             last_type_symbol = param_data_type;
       
 21132             
       
 21133             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 21134             {
       
 21135         
       
 21136                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21137                 return return_type_symbol;
       
 21138                 
       
 21139             }
       
 21140             
       
 21141             ERROR;
       
 21142         }
       
 21143         
       
 21144     }/*function_ulint_to_dt*/
       
 21145     break;
       
 21146 
       
 21147 /****
       
 21148  *TIME_TO_REAL
       
 21149  */
       
 21150     case function_time_to_real :
       
 21151     {
       
 21152         symbol_c *last_type_symbol = NULL;
       
 21153 
       
 21154         {
       
 21155             symbol_c *IN_type_symbol = param_data_type;
       
 21156             last_type_symbol = param_data_type;
       
 21157             
       
 21158             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21159             {
       
 21160         
       
 21161                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21162                 return return_type_symbol;
       
 21163                 
       
 21164             }
       
 21165             
       
 21166             ERROR;
       
 21167         }
       
 21168         
       
 21169     }/*function_time_to_real*/
       
 21170     break;
       
 21171 
       
 21172 /****
       
 21173  *TIME_TO_LREAL
       
 21174  */
       
 21175     case function_time_to_lreal :
       
 21176     {
       
 21177         symbol_c *last_type_symbol = NULL;
       
 21178 
       
 21179         {
       
 21180             symbol_c *IN_type_symbol = param_data_type;
       
 21181             last_type_symbol = param_data_type;
       
 21182             
       
 21183             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21184             {
       
 21185         
       
 21186                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21187                 return return_type_symbol;
       
 21188                 
       
 21189             }
       
 21190             
       
 21191             ERROR;
       
 21192         }
       
 21193         
       
 21194     }/*function_time_to_lreal*/
       
 21195     break;
       
 21196 
       
 21197 /****
       
 21198  *TIME_TO_SINT
       
 21199  */
       
 21200     case function_time_to_sint :
       
 21201     {
       
 21202         symbol_c *last_type_symbol = NULL;
       
 21203 
       
 21204         {
       
 21205             symbol_c *IN_type_symbol = param_data_type;
       
 21206             last_type_symbol = param_data_type;
       
 21207             
       
 21208             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21209             {
       
 21210         
       
 21211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21212                 return return_type_symbol;
       
 21213                 
       
 21214             }
       
 21215             
       
 21216             ERROR;
       
 21217         }
       
 21218         
       
 21219     }/*function_time_to_sint*/
       
 21220     break;
       
 21221 
       
 21222 /****
       
 21223  *TIME_TO_INT
       
 21224  */
       
 21225     case function_time_to_int :
       
 21226     {
       
 21227         symbol_c *last_type_symbol = NULL;
       
 21228 
       
 21229         {
       
 21230             symbol_c *IN_type_symbol = param_data_type;
       
 21231             last_type_symbol = param_data_type;
       
 21232             
       
 21233             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21234             {
       
 21235         
       
 21236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21237                 return return_type_symbol;
       
 21238                 
       
 21239             }
       
 21240             
       
 21241             ERROR;
       
 21242         }
       
 21243         
       
 21244     }/*function_time_to_int*/
       
 21245     break;
       
 21246 
       
 21247 /****
       
 21248  *TIME_TO_DINT
       
 21249  */
       
 21250     case function_time_to_dint :
       
 21251     {
       
 21252         symbol_c *last_type_symbol = NULL;
       
 21253 
       
 21254         {
       
 21255             symbol_c *IN_type_symbol = param_data_type;
       
 21256             last_type_symbol = param_data_type;
       
 21257             
       
 21258             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21259             {
       
 21260         
       
 21261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21262                 return return_type_symbol;
       
 21263                 
       
 21264             }
       
 21265             
       
 21266             ERROR;
       
 21267         }
       
 21268         
       
 21269     }/*function_time_to_dint*/
       
 21270     break;
       
 21271 
       
 21272 /****
       
 21273  *TIME_TO_LINT
       
 21274  */
       
 21275     case function_time_to_lint :
       
 21276     {
       
 21277         symbol_c *last_type_symbol = NULL;
       
 21278 
       
 21279         {
       
 21280             symbol_c *IN_type_symbol = param_data_type;
       
 21281             last_type_symbol = param_data_type;
       
 21282             
       
 21283             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21284             {
       
 21285         
       
 21286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21287                 return return_type_symbol;
       
 21288                 
       
 21289             }
       
 21290             
       
 21291             ERROR;
       
 21292         }
       
 21293         
       
 21294     }/*function_time_to_lint*/
       
 21295     break;
       
 21296 
       
 21297 /****
       
 21298  *TIME_TO_USINT
       
 21299  */
       
 21300     case function_time_to_usint :
       
 21301     {
       
 21302         symbol_c *last_type_symbol = NULL;
       
 21303 
       
 21304         {
       
 21305             symbol_c *IN_type_symbol = param_data_type;
       
 21306             last_type_symbol = param_data_type;
       
 21307             
       
 21308             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21309             {
       
 21310         
       
 21311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21312                 return return_type_symbol;
       
 21313                 
       
 21314             }
       
 21315             
       
 21316             ERROR;
       
 21317         }
       
 21318         
       
 21319     }/*function_time_to_usint*/
       
 21320     break;
       
 21321 
       
 21322 /****
       
 21323  *TIME_TO_UINT
       
 21324  */
       
 21325     case function_time_to_uint :
       
 21326     {
       
 21327         symbol_c *last_type_symbol = NULL;
       
 21328 
       
 21329         {
       
 21330             symbol_c *IN_type_symbol = param_data_type;
       
 21331             last_type_symbol = param_data_type;
       
 21332             
       
 21333             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21334             {
       
 21335         
       
 21336                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21337                 return return_type_symbol;
       
 21338                 
       
 21339             }
       
 21340             
       
 21341             ERROR;
       
 21342         }
       
 21343         
       
 21344     }/*function_time_to_uint*/
       
 21345     break;
       
 21346 
       
 21347 /****
       
 21348  *TIME_TO_UDINT
       
 21349  */
       
 21350     case function_time_to_udint :
       
 21351     {
       
 21352         symbol_c *last_type_symbol = NULL;
       
 21353 
       
 21354         {
       
 21355             symbol_c *IN_type_symbol = param_data_type;
       
 21356             last_type_symbol = param_data_type;
       
 21357             
       
 21358             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21359             {
       
 21360         
       
 21361                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21362                 return return_type_symbol;
       
 21363                 
       
 21364             }
       
 21365             
       
 21366             ERROR;
       
 21367         }
       
 21368         
       
 21369     }/*function_time_to_udint*/
       
 21370     break;
       
 21371 
       
 21372 /****
       
 21373  *TIME_TO_ULINT
       
 21374  */
       
 21375     case function_time_to_ulint :
       
 21376     {
       
 21377         symbol_c *last_type_symbol = NULL;
       
 21378 
       
 21379         {
       
 21380             symbol_c *IN_type_symbol = param_data_type;
       
 21381             last_type_symbol = param_data_type;
       
 21382             
       
 21383             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21384             {
       
 21385         
       
 21386                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21387                 return return_type_symbol;
       
 21388                 
       
 21389             }
       
 21390             
       
 21391             ERROR;
       
 21392         }
       
 21393         
       
 21394     }/*function_time_to_ulint*/
       
 21395     break;
       
 21396 
       
 21397 /****
       
 21398  *TIME_TO_BOOL
       
 21399  */
       
 21400     case function_time_to_bool :
       
 21401     {
       
 21402         symbol_c *last_type_symbol = NULL;
       
 21403 
       
 21404         {
       
 21405             symbol_c *IN_type_symbol = param_data_type;
       
 21406             last_type_symbol = param_data_type;
       
 21407             
       
 21408             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21409             {
       
 21410         
       
 21411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21412                 return return_type_symbol;
       
 21413                 
       
 21414             }
       
 21415             
       
 21416             ERROR;
       
 21417         }
       
 21418         
       
 21419     }/*function_time_to_bool*/
       
 21420     break;
       
 21421 
       
 21422 /****
       
 21423  *TIME_TO_BYTE
       
 21424  */
       
 21425     case function_time_to_byte :
       
 21426     {
       
 21427         symbol_c *last_type_symbol = NULL;
       
 21428 
       
 21429         {
       
 21430             symbol_c *IN_type_symbol = param_data_type;
       
 21431             last_type_symbol = param_data_type;
       
 21432             
       
 21433             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21434             {
       
 21435         
       
 21436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21437                 return return_type_symbol;
       
 21438                 
       
 21439             }
       
 21440             
       
 21441             ERROR;
       
 21442         }
       
 21443         
       
 21444     }/*function_time_to_byte*/
       
 21445     break;
       
 21446 
       
 21447 /****
       
 21448  *TIME_TO_WORD
       
 21449  */
       
 21450     case function_time_to_word :
       
 21451     {
       
 21452         symbol_c *last_type_symbol = NULL;
       
 21453 
       
 21454         {
       
 21455             symbol_c *IN_type_symbol = param_data_type;
       
 21456             last_type_symbol = param_data_type;
       
 21457             
       
 21458             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21459             {
       
 21460         
       
 21461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21462                 return return_type_symbol;
       
 21463                 
       
 21464             }
       
 21465             
       
 21466             ERROR;
       
 21467         }
       
 21468         
       
 21469     }/*function_time_to_word*/
       
 21470     break;
       
 21471 
       
 21472 /****
       
 21473  *TIME_TO_DWORD
       
 21474  */
       
 21475     case function_time_to_dword :
       
 21476     {
       
 21477         symbol_c *last_type_symbol = NULL;
       
 21478 
       
 21479         {
       
 21480             symbol_c *IN_type_symbol = param_data_type;
       
 21481             last_type_symbol = param_data_type;
       
 21482             
       
 21483             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21484             {
       
 21485         
       
 21486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21487                 return return_type_symbol;
       
 21488                 
       
 21489             }
       
 21490             
       
 21491             ERROR;
       
 21492         }
       
 21493         
       
 21494     }/*function_time_to_dword*/
       
 21495     break;
       
 21496 
       
 21497 /****
       
 21498  *TIME_TO_LWORD
       
 21499  */
       
 21500     case function_time_to_lword :
       
 21501     {
       
 21502         symbol_c *last_type_symbol = NULL;
       
 21503 
       
 21504         {
       
 21505             symbol_c *IN_type_symbol = param_data_type;
       
 21506             last_type_symbol = param_data_type;
       
 21507             
       
 21508             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21509             {
       
 21510         
       
 21511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21512                 return return_type_symbol;
       
 21513                 
       
 21514             }
       
 21515             
       
 21516             ERROR;
       
 21517         }
       
 21518         
       
 21519     }/*function_time_to_lword*/
       
 21520     break;
       
 21521 
       
 21522 /****
       
 21523  *TIME_TO_STRING
       
 21524  */
       
 21525     case function_time_to_string :
       
 21526     {
       
 21527         symbol_c *last_type_symbol = NULL;
       
 21528 
       
 21529         {
       
 21530             symbol_c *IN_type_symbol = param_data_type;
       
 21531             last_type_symbol = param_data_type;
       
 21532             
       
 21533             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21534             {
       
 21535         
       
 21536                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21537                 return return_type_symbol;
       
 21538                 
       
 21539             }
       
 21540             
       
 21541             ERROR;
       
 21542         }
       
 21543         
       
 21544     }/*function_time_to_string*/
       
 21545     break;
       
 21546 
       
 21547 /****
       
 21548  *TIME_TO_WSTRING
       
 21549  */
       
 21550     case function_time_to_wstring :
       
 21551     {
       
 21552         symbol_c *last_type_symbol = NULL;
       
 21553 
       
 21554         {
       
 21555             symbol_c *IN_type_symbol = param_data_type;
       
 21556             last_type_symbol = param_data_type;
       
 21557             
       
 21558             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
       
 21559             {
       
 21560         
       
 21561                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21562                 return return_type_symbol;
       
 21563                 
       
 21564             }
       
 21565             
       
 21566             ERROR;
       
 21567         }
       
 21568         
       
 21569     }/*function_time_to_wstring*/
       
 21570     break;
       
 21571 
       
 21572 /****
       
 21573  *BOOL_TO_REAL
       
 21574  */
       
 21575     case function_bool_to_real :
       
 21576     {
       
 21577         symbol_c *last_type_symbol = NULL;
       
 21578 
       
 21579         {
       
 21580             symbol_c *IN_type_symbol = param_data_type;
       
 21581             last_type_symbol = param_data_type;
       
 21582             
       
 21583             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21584             {
       
 21585         
       
 21586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21587                 return return_type_symbol;
       
 21588                 
       
 21589             }
       
 21590             
       
 21591             ERROR;
       
 21592         }
       
 21593         
       
 21594     }/*function_bool_to_real*/
       
 21595     break;
       
 21596 
       
 21597 /****
       
 21598  *BOOL_TO_LREAL
       
 21599  */
       
 21600     case function_bool_to_lreal :
       
 21601     {
       
 21602         symbol_c *last_type_symbol = NULL;
       
 21603 
       
 21604         {
       
 21605             symbol_c *IN_type_symbol = param_data_type;
       
 21606             last_type_symbol = param_data_type;
       
 21607             
       
 21608             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21609             {
       
 21610         
       
 21611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21612                 return return_type_symbol;
       
 21613                 
       
 21614             }
       
 21615             
       
 21616             ERROR;
       
 21617         }
       
 21618         
       
 21619     }/*function_bool_to_lreal*/
       
 21620     break;
       
 21621 
       
 21622 /****
       
 21623  *BOOL_TO_SINT
       
 21624  */
       
 21625     case function_bool_to_sint :
       
 21626     {
       
 21627         symbol_c *last_type_symbol = NULL;
       
 21628 
       
 21629         {
       
 21630             symbol_c *IN_type_symbol = param_data_type;
       
 21631             last_type_symbol = param_data_type;
       
 21632             
       
 21633             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21634             {
       
 21635         
       
 21636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21637                 return return_type_symbol;
       
 21638                 
       
 21639             }
       
 21640             
       
 21641             ERROR;
       
 21642         }
       
 21643         
       
 21644     }/*function_bool_to_sint*/
       
 21645     break;
       
 21646 
       
 21647 /****
       
 21648  *BOOL_TO_INT
       
 21649  */
       
 21650     case function_bool_to_int :
       
 21651     {
       
 21652         symbol_c *last_type_symbol = NULL;
       
 21653 
       
 21654         {
       
 21655             symbol_c *IN_type_symbol = param_data_type;
       
 21656             last_type_symbol = param_data_type;
       
 21657             
       
 21658             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21659             {
       
 21660         
       
 21661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21662                 return return_type_symbol;
       
 21663                 
       
 21664             }
       
 21665             
       
 21666             ERROR;
       
 21667         }
       
 21668         
       
 21669     }/*function_bool_to_int*/
       
 21670     break;
       
 21671 
       
 21672 /****
       
 21673  *BOOL_TO_DINT
       
 21674  */
       
 21675     case function_bool_to_dint :
       
 21676     {
       
 21677         symbol_c *last_type_symbol = NULL;
       
 21678 
       
 21679         {
       
 21680             symbol_c *IN_type_symbol = param_data_type;
       
 21681             last_type_symbol = param_data_type;
       
 21682             
       
 21683             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21684             {
       
 21685         
       
 21686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21687                 return return_type_symbol;
       
 21688                 
       
 21689             }
       
 21690             
       
 21691             ERROR;
       
 21692         }
       
 21693         
       
 21694     }/*function_bool_to_dint*/
       
 21695     break;
       
 21696 
       
 21697 /****
       
 21698  *BOOL_TO_LINT
       
 21699  */
       
 21700     case function_bool_to_lint :
       
 21701     {
       
 21702         symbol_c *last_type_symbol = NULL;
       
 21703 
       
 21704         {
       
 21705             symbol_c *IN_type_symbol = param_data_type;
       
 21706             last_type_symbol = param_data_type;
       
 21707             
       
 21708             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21709             {
       
 21710         
       
 21711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21712                 return return_type_symbol;
       
 21713                 
       
 21714             }
       
 21715             
       
 21716             ERROR;
       
 21717         }
       
 21718         
       
 21719     }/*function_bool_to_lint*/
       
 21720     break;
       
 21721 
       
 21722 /****
       
 21723  *BOOL_TO_USINT
       
 21724  */
       
 21725     case function_bool_to_usint :
       
 21726     {
       
 21727         symbol_c *last_type_symbol = NULL;
       
 21728 
       
 21729         {
       
 21730             symbol_c *IN_type_symbol = param_data_type;
       
 21731             last_type_symbol = param_data_type;
       
 21732             
       
 21733             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21734             {
       
 21735         
       
 21736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21737                 return return_type_symbol;
       
 21738                 
       
 21739             }
       
 21740             
       
 21741             ERROR;
       
 21742         }
       
 21743         
       
 21744     }/*function_bool_to_usint*/
       
 21745     break;
       
 21746 
       
 21747 /****
       
 21748  *BOOL_TO_UINT
       
 21749  */
       
 21750     case function_bool_to_uint :
       
 21751     {
       
 21752         symbol_c *last_type_symbol = NULL;
       
 21753 
       
 21754         {
       
 21755             symbol_c *IN_type_symbol = param_data_type;
       
 21756             last_type_symbol = param_data_type;
       
 21757             
       
 21758             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21759             {
       
 21760         
       
 21761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21762                 return return_type_symbol;
       
 21763                 
       
 21764             }
       
 21765             
       
 21766             ERROR;
       
 21767         }
       
 21768         
       
 21769     }/*function_bool_to_uint*/
       
 21770     break;
       
 21771 
       
 21772 /****
       
 21773  *BOOL_TO_UDINT
       
 21774  */
       
 21775     case function_bool_to_udint :
       
 21776     {
       
 21777         symbol_c *last_type_symbol = NULL;
       
 21778 
       
 21779         {
       
 21780             symbol_c *IN_type_symbol = param_data_type;
       
 21781             last_type_symbol = param_data_type;
       
 21782             
       
 21783             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21784             {
       
 21785         
       
 21786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21787                 return return_type_symbol;
       
 21788                 
       
 21789             }
       
 21790             
       
 21791             ERROR;
       
 21792         }
       
 21793         
       
 21794     }/*function_bool_to_udint*/
       
 21795     break;
       
 21796 
       
 21797 /****
       
 21798  *BOOL_TO_ULINT
       
 21799  */
       
 21800     case function_bool_to_ulint :
       
 21801     {
       
 21802         symbol_c *last_type_symbol = NULL;
       
 21803 
       
 21804         {
       
 21805             symbol_c *IN_type_symbol = param_data_type;
       
 21806             last_type_symbol = param_data_type;
       
 21807             
       
 21808             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21809             {
       
 21810         
       
 21811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21812                 return return_type_symbol;
       
 21813                 
       
 21814             }
       
 21815             
       
 21816             ERROR;
       
 21817         }
       
 21818         
       
 21819     }/*function_bool_to_ulint*/
       
 21820     break;
       
 21821 
       
 21822 /****
       
 21823  *BOOL_TO_TIME
       
 21824  */
       
 21825     case function_bool_to_time :
       
 21826     {
       
 21827         symbol_c *last_type_symbol = NULL;
       
 21828 
       
 21829         {
       
 21830             symbol_c *IN_type_symbol = param_data_type;
       
 21831             last_type_symbol = param_data_type;
       
 21832             
       
 21833             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21834             {
       
 21835         
       
 21836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21837                 return return_type_symbol;
       
 21838                 
       
 21839             }
       
 21840             
       
 21841             ERROR;
       
 21842         }
       
 21843         
       
 21844     }/*function_bool_to_time*/
       
 21845     break;
       
 21846 
       
 21847 /****
       
 21848  *BOOL_TO_BYTE
       
 21849  */
       
 21850     case function_bool_to_byte :
       
 21851     {
       
 21852         symbol_c *last_type_symbol = NULL;
       
 21853 
       
 21854         {
       
 21855             symbol_c *IN_type_symbol = param_data_type;
       
 21856             last_type_symbol = param_data_type;
       
 21857             
       
 21858             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21859             {
       
 21860         
       
 21861                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21862                 return return_type_symbol;
       
 21863                 
       
 21864             }
       
 21865             
       
 21866             ERROR;
       
 21867         }
       
 21868         
       
 21869     }/*function_bool_to_byte*/
       
 21870     break;
       
 21871 
       
 21872 /****
       
 21873  *BOOL_TO_WORD
       
 21874  */
       
 21875     case function_bool_to_word :
       
 21876     {
       
 21877         symbol_c *last_type_symbol = NULL;
       
 21878 
       
 21879         {
       
 21880             symbol_c *IN_type_symbol = param_data_type;
       
 21881             last_type_symbol = param_data_type;
       
 21882             
       
 21883             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21884             {
       
 21885         
       
 21886                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21887                 return return_type_symbol;
       
 21888                 
       
 21889             }
       
 21890             
       
 21891             ERROR;
       
 21892         }
       
 21893         
       
 21894     }/*function_bool_to_word*/
       
 21895     break;
       
 21896 
       
 21897 /****
       
 21898  *BOOL_TO_DWORD
       
 21899  */
       
 21900     case function_bool_to_dword :
       
 21901     {
       
 21902         symbol_c *last_type_symbol = NULL;
       
 21903 
       
 21904         {
       
 21905             symbol_c *IN_type_symbol = param_data_type;
       
 21906             last_type_symbol = param_data_type;
       
 21907             
       
 21908             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21909             {
       
 21910         
       
 21911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21912                 return return_type_symbol;
       
 21913                 
       
 21914             }
       
 21915             
       
 21916             ERROR;
       
 21917         }
       
 21918         
       
 21919     }/*function_bool_to_dword*/
       
 21920     break;
       
 21921 
       
 21922 /****
       
 21923  *BOOL_TO_LWORD
       
 21924  */
       
 21925     case function_bool_to_lword :
       
 21926     {
       
 21927         symbol_c *last_type_symbol = NULL;
       
 21928 
       
 21929         {
       
 21930             symbol_c *IN_type_symbol = param_data_type;
       
 21931             last_type_symbol = param_data_type;
       
 21932             
       
 21933             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21934             {
       
 21935         
       
 21936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21937                 return return_type_symbol;
       
 21938                 
       
 21939             }
       
 21940             
       
 21941             ERROR;
       
 21942         }
       
 21943         
       
 21944     }/*function_bool_to_lword*/
       
 21945     break;
       
 21946 
       
 21947 /****
       
 21948  *BOOL_TO_STRING
       
 21949  */
       
 21950     case function_bool_to_string :
       
 21951     {
       
 21952         symbol_c *last_type_symbol = NULL;
       
 21953 
       
 21954         {
       
 21955             symbol_c *IN_type_symbol = param_data_type;
       
 21956             last_type_symbol = param_data_type;
       
 21957             
       
 21958             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21959             {
       
 21960         
       
 21961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21962                 return return_type_symbol;
       
 21963                 
       
 21964             }
       
 21965             
       
 21966             ERROR;
       
 21967         }
       
 21968         
       
 21969     }/*function_bool_to_string*/
       
 21970     break;
       
 21971 
       
 21972 /****
       
 21973  *BOOL_TO_WSTRING
       
 21974  */
       
 21975     case function_bool_to_wstring :
       
 21976     {
       
 21977         symbol_c *last_type_symbol = NULL;
       
 21978 
       
 21979         {
       
 21980             symbol_c *IN_type_symbol = param_data_type;
       
 21981             last_type_symbol = param_data_type;
       
 21982             
       
 21983             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 21984             {
       
 21985         
       
 21986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 21987                 return return_type_symbol;
       
 21988                 
       
 21989             }
       
 21990             
       
 21991             ERROR;
       
 21992         }
       
 21993         
       
 21994     }/*function_bool_to_wstring*/
       
 21995     break;
       
 21996 
       
 21997 /****
       
 21998  *BOOL_TO_DATE
       
 21999  */
       
 22000     case function_bool_to_date :
       
 22001     {
       
 22002         symbol_c *last_type_symbol = NULL;
       
 22003 
       
 22004         {
       
 22005             symbol_c *IN_type_symbol = param_data_type;
       
 22006             last_type_symbol = param_data_type;
       
 22007             
       
 22008             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22009             {
       
 22010         
       
 22011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22012                 return return_type_symbol;
       
 22013                 
       
 22014             }
       
 22015             
       
 22016             ERROR;
       
 22017         }
       
 22018         
       
 22019     }/*function_bool_to_date*/
       
 22020     break;
       
 22021 
       
 22022 /****
       
 22023  *BOOL_TO_TOD
       
 22024  */
       
 22025     case function_bool_to_tod :
       
 22026     {
       
 22027         symbol_c *last_type_symbol = NULL;
       
 22028 
       
 22029         {
       
 22030             symbol_c *IN_type_symbol = param_data_type;
       
 22031             last_type_symbol = param_data_type;
       
 22032             
       
 22033             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22034             {
       
 22035         
       
 22036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22037                 return return_type_symbol;
       
 22038                 
       
 22039             }
       
 22040             
       
 22041             ERROR;
       
 22042         }
       
 22043         
       
 22044     }/*function_bool_to_tod*/
       
 22045     break;
       
 22046 
       
 22047 /****
       
 22048  *BOOL_TO_DT
       
 22049  */
       
 22050     case function_bool_to_dt :
       
 22051     {
       
 22052         symbol_c *last_type_symbol = NULL;
       
 22053 
       
 22054         {
       
 22055             symbol_c *IN_type_symbol = param_data_type;
       
 22056             last_type_symbol = param_data_type;
       
 22057             
       
 22058             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
       
 22059             {
       
 22060         
       
 22061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22062                 return return_type_symbol;
       
 22063                 
       
 22064             }
       
 22065             
       
 22066             ERROR;
       
 22067         }
       
 22068         
       
 22069     }/*function_bool_to_dt*/
       
 22070     break;
       
 22071 
       
 22072 /****
       
 22073  *BYTE_TO_REAL
       
 22074  */
       
 22075     case function_byte_to_real :
       
 22076     {
       
 22077         symbol_c *last_type_symbol = NULL;
       
 22078 
       
 22079         {
       
 22080             symbol_c *IN_type_symbol = param_data_type;
       
 22081             last_type_symbol = param_data_type;
       
 22082             
       
 22083             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22084             {
       
 22085         
       
 22086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22087                 return return_type_symbol;
       
 22088                 
       
 22089             }
       
 22090             
       
 22091             ERROR;
       
 22092         }
       
 22093         
       
 22094     }/*function_byte_to_real*/
       
 22095     break;
       
 22096 
       
 22097 /****
       
 22098  *BYTE_TO_LREAL
       
 22099  */
       
 22100     case function_byte_to_lreal :
       
 22101     {
       
 22102         symbol_c *last_type_symbol = NULL;
       
 22103 
       
 22104         {
       
 22105             symbol_c *IN_type_symbol = param_data_type;
       
 22106             last_type_symbol = param_data_type;
       
 22107             
       
 22108             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22109             {
       
 22110         
       
 22111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22112                 return return_type_symbol;
       
 22113                 
       
 22114             }
       
 22115             
       
 22116             ERROR;
       
 22117         }
       
 22118         
       
 22119     }/*function_byte_to_lreal*/
       
 22120     break;
       
 22121 
       
 22122 /****
       
 22123  *BYTE_TO_SINT
       
 22124  */
       
 22125     case function_byte_to_sint :
       
 22126     {
       
 22127         symbol_c *last_type_symbol = NULL;
       
 22128 
       
 22129         {
       
 22130             symbol_c *IN_type_symbol = param_data_type;
       
 22131             last_type_symbol = param_data_type;
       
 22132             
       
 22133             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22134             {
       
 22135         
       
 22136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22137                 return return_type_symbol;
       
 22138                 
       
 22139             }
       
 22140             
       
 22141             ERROR;
       
 22142         }
       
 22143         
       
 22144     }/*function_byte_to_sint*/
       
 22145     break;
       
 22146 
       
 22147 /****
       
 22148  *BYTE_TO_INT
       
 22149  */
       
 22150     case function_byte_to_int :
       
 22151     {
       
 22152         symbol_c *last_type_symbol = NULL;
       
 22153 
       
 22154         {
       
 22155             symbol_c *IN_type_symbol = param_data_type;
       
 22156             last_type_symbol = param_data_type;
       
 22157             
       
 22158             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22159             {
       
 22160         
       
 22161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22162                 return return_type_symbol;
       
 22163                 
       
 22164             }
       
 22165             
       
 22166             ERROR;
       
 22167         }
       
 22168         
       
 22169     }/*function_byte_to_int*/
       
 22170     break;
       
 22171 
       
 22172 /****
       
 22173  *BYTE_TO_DINT
       
 22174  */
       
 22175     case function_byte_to_dint :
       
 22176     {
       
 22177         symbol_c *last_type_symbol = NULL;
       
 22178 
       
 22179         {
       
 22180             symbol_c *IN_type_symbol = param_data_type;
       
 22181             last_type_symbol = param_data_type;
       
 22182             
       
 22183             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22184             {
       
 22185         
       
 22186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22187                 return return_type_symbol;
       
 22188                 
       
 22189             }
       
 22190             
       
 22191             ERROR;
       
 22192         }
       
 22193         
       
 22194     }/*function_byte_to_dint*/
       
 22195     break;
       
 22196 
       
 22197 /****
       
 22198  *BYTE_TO_LINT
       
 22199  */
       
 22200     case function_byte_to_lint :
       
 22201     {
       
 22202         symbol_c *last_type_symbol = NULL;
       
 22203 
       
 22204         {
       
 22205             symbol_c *IN_type_symbol = param_data_type;
       
 22206             last_type_symbol = param_data_type;
       
 22207             
       
 22208             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22209             {
       
 22210         
       
 22211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22212                 return return_type_symbol;
       
 22213                 
       
 22214             }
       
 22215             
       
 22216             ERROR;
       
 22217         }
       
 22218         
       
 22219     }/*function_byte_to_lint*/
       
 22220     break;
       
 22221 
       
 22222 /****
       
 22223  *BYTE_TO_USINT
       
 22224  */
       
 22225     case function_byte_to_usint :
       
 22226     {
       
 22227         symbol_c *last_type_symbol = NULL;
       
 22228 
       
 22229         {
       
 22230             symbol_c *IN_type_symbol = param_data_type;
       
 22231             last_type_symbol = param_data_type;
       
 22232             
       
 22233             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22234             {
       
 22235         
       
 22236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22237                 return return_type_symbol;
       
 22238                 
       
 22239             }
       
 22240             
       
 22241             ERROR;
       
 22242         }
       
 22243         
       
 22244     }/*function_byte_to_usint*/
       
 22245     break;
       
 22246 
       
 22247 /****
       
 22248  *BYTE_TO_UINT
       
 22249  */
       
 22250     case function_byte_to_uint :
       
 22251     {
       
 22252         symbol_c *last_type_symbol = NULL;
       
 22253 
       
 22254         {
       
 22255             symbol_c *IN_type_symbol = param_data_type;
       
 22256             last_type_symbol = param_data_type;
       
 22257             
       
 22258             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22259             {
       
 22260         
       
 22261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22262                 return return_type_symbol;
       
 22263                 
       
 22264             }
       
 22265             
       
 22266             ERROR;
       
 22267         }
       
 22268         
       
 22269     }/*function_byte_to_uint*/
       
 22270     break;
       
 22271 
       
 22272 /****
       
 22273  *BYTE_TO_UDINT
       
 22274  */
       
 22275     case function_byte_to_udint :
       
 22276     {
       
 22277         symbol_c *last_type_symbol = NULL;
       
 22278 
       
 22279         {
       
 22280             symbol_c *IN_type_symbol = param_data_type;
       
 22281             last_type_symbol = param_data_type;
       
 22282             
       
 22283             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22284             {
       
 22285         
       
 22286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22287                 return return_type_symbol;
       
 22288                 
       
 22289             }
       
 22290             
       
 22291             ERROR;
       
 22292         }
       
 22293         
       
 22294     }/*function_byte_to_udint*/
       
 22295     break;
       
 22296 
       
 22297 /****
       
 22298  *BYTE_TO_ULINT
       
 22299  */
       
 22300     case function_byte_to_ulint :
       
 22301     {
       
 22302         symbol_c *last_type_symbol = NULL;
       
 22303 
       
 22304         {
       
 22305             symbol_c *IN_type_symbol = param_data_type;
       
 22306             last_type_symbol = param_data_type;
       
 22307             
       
 22308             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22309             {
       
 22310         
       
 22311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22312                 return return_type_symbol;
       
 22313                 
       
 22314             }
       
 22315             
       
 22316             ERROR;
       
 22317         }
       
 22318         
       
 22319     }/*function_byte_to_ulint*/
       
 22320     break;
       
 22321 
       
 22322 /****
       
 22323  *BYTE_TO_TIME
       
 22324  */
       
 22325     case function_byte_to_time :
       
 22326     {
       
 22327         symbol_c *last_type_symbol = NULL;
       
 22328 
       
 22329         {
       
 22330             symbol_c *IN_type_symbol = param_data_type;
       
 22331             last_type_symbol = param_data_type;
       
 22332             
       
 22333             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22334             {
       
 22335         
       
 22336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22337                 return return_type_symbol;
       
 22338                 
       
 22339             }
       
 22340             
       
 22341             ERROR;
       
 22342         }
       
 22343         
       
 22344     }/*function_byte_to_time*/
       
 22345     break;
       
 22346 
       
 22347 /****
       
 22348  *BYTE_TO_BOOL
       
 22349  */
       
 22350     case function_byte_to_bool :
       
 22351     {
       
 22352         symbol_c *last_type_symbol = NULL;
       
 22353 
       
 22354         {
       
 22355             symbol_c *IN_type_symbol = param_data_type;
       
 22356             last_type_symbol = param_data_type;
       
 22357             
       
 22358             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22359             {
       
 22360         
       
 22361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22362                 return return_type_symbol;
       
 22363                 
       
 22364             }
       
 22365             
       
 22366             ERROR;
       
 22367         }
       
 22368         
       
 22369     }/*function_byte_to_bool*/
       
 22370     break;
       
 22371 
       
 22372 /****
       
 22373  *BYTE_TO_WORD
       
 22374  */
       
 22375     case function_byte_to_word :
       
 22376     {
       
 22377         symbol_c *last_type_symbol = NULL;
       
 22378 
       
 22379         {
       
 22380             symbol_c *IN_type_symbol = param_data_type;
       
 22381             last_type_symbol = param_data_type;
       
 22382             
       
 22383             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22384             {
       
 22385         
       
 22386                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22387                 return return_type_symbol;
       
 22388                 
       
 22389             }
       
 22390             
       
 22391             ERROR;
       
 22392         }
       
 22393         
       
 22394     }/*function_byte_to_word*/
       
 22395     break;
       
 22396 
       
 22397 /****
       
 22398  *BYTE_TO_DWORD
       
 22399  */
       
 22400     case function_byte_to_dword :
       
 22401     {
       
 22402         symbol_c *last_type_symbol = NULL;
       
 22403 
       
 22404         {
       
 22405             symbol_c *IN_type_symbol = param_data_type;
       
 22406             last_type_symbol = param_data_type;
       
 22407             
       
 22408             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22409             {
       
 22410         
       
 22411                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22412                 return return_type_symbol;
       
 22413                 
       
 22414             }
       
 22415             
       
 22416             ERROR;
       
 22417         }
       
 22418         
       
 22419     }/*function_byte_to_dword*/
       
 22420     break;
       
 22421 
       
 22422 /****
       
 22423  *BYTE_TO_LWORD
       
 22424  */
       
 22425     case function_byte_to_lword :
       
 22426     {
       
 22427         symbol_c *last_type_symbol = NULL;
       
 22428 
       
 22429         {
       
 22430             symbol_c *IN_type_symbol = param_data_type;
       
 22431             last_type_symbol = param_data_type;
       
 22432             
       
 22433             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22434             {
       
 22435         
       
 22436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22437                 return return_type_symbol;
       
 22438                 
       
 22439             }
       
 22440             
       
 22441             ERROR;
       
 22442         }
       
 22443         
       
 22444     }/*function_byte_to_lword*/
       
 22445     break;
       
 22446 
       
 22447 /****
       
 22448  *BYTE_TO_STRING
       
 22449  */
       
 22450     case function_byte_to_string :
       
 22451     {
       
 22452         symbol_c *last_type_symbol = NULL;
       
 22453 
       
 22454         {
       
 22455             symbol_c *IN_type_symbol = param_data_type;
       
 22456             last_type_symbol = param_data_type;
       
 22457             
       
 22458             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22459             {
       
 22460         
       
 22461                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22462                 return return_type_symbol;
       
 22463                 
       
 22464             }
       
 22465             
       
 22466             ERROR;
       
 22467         }
       
 22468         
       
 22469     }/*function_byte_to_string*/
       
 22470     break;
       
 22471 
       
 22472 /****
       
 22473  *BYTE_TO_WSTRING
       
 22474  */
       
 22475     case function_byte_to_wstring :
       
 22476     {
       
 22477         symbol_c *last_type_symbol = NULL;
       
 22478 
       
 22479         {
       
 22480             symbol_c *IN_type_symbol = param_data_type;
       
 22481             last_type_symbol = param_data_type;
       
 22482             
       
 22483             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22484             {
       
 22485         
       
 22486                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 22487                 return return_type_symbol;
       
 22488                 
       
 22489             }
       
 22490             
       
 22491             ERROR;
       
 22492         }
       
 22493         
       
 22494     }/*function_byte_to_wstring*/
       
 22495     break;
       
 22496 
       
 22497 /****
       
 22498  *BYTE_TO_DATE
       
 22499  */
       
 22500     case function_byte_to_date :
       
 22501     {
       
 22502         symbol_c *last_type_symbol = NULL;
       
 22503 
       
 22504         {
       
 22505             symbol_c *IN_type_symbol = param_data_type;
       
 22506             last_type_symbol = param_data_type;
       
 22507             
       
 22508             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22509             {
       
 22510         
       
 22511                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22512                 return return_type_symbol;
       
 22513                 
       
 22514             }
       
 22515             
       
 22516             ERROR;
       
 22517         }
       
 22518         
       
 22519     }/*function_byte_to_date*/
       
 22520     break;
       
 22521 
       
 22522 /****
       
 22523  *BYTE_TO_TOD
       
 22524  */
       
 22525     case function_byte_to_tod :
       
 22526     {
       
 22527         symbol_c *last_type_symbol = NULL;
       
 22528 
       
 22529         {
       
 22530             symbol_c *IN_type_symbol = param_data_type;
       
 22531             last_type_symbol = param_data_type;
       
 22532             
       
 22533             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22534             {
       
 22535         
       
 22536                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22537                 return return_type_symbol;
       
 22538                 
       
 22539             }
       
 22540             
       
 22541             ERROR;
       
 22542         }
       
 22543         
       
 22544     }/*function_byte_to_tod*/
       
 22545     break;
       
 22546 
       
 22547 /****
       
 22548  *BYTE_TO_DT
       
 22549  */
       
 22550     case function_byte_to_dt :
       
 22551     {
       
 22552         symbol_c *last_type_symbol = NULL;
       
 22553 
       
 22554         {
       
 22555             symbol_c *IN_type_symbol = param_data_type;
       
 22556             last_type_symbol = param_data_type;
       
 22557             
       
 22558             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22559             {
       
 22560         
       
 22561                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22562                 return return_type_symbol;
       
 22563                 
       
 22564             }
       
 22565             
       
 22566             ERROR;
       
 22567         }
       
 22568         
       
 22569     }/*function_byte_to_dt*/
       
 22570     break;
       
 22571 
       
 22572 /****
       
 22573  *WORD_TO_REAL
       
 22574  */
       
 22575     case function_word_to_real :
       
 22576     {
       
 22577         symbol_c *last_type_symbol = NULL;
       
 22578 
       
 22579         {
       
 22580             symbol_c *IN_type_symbol = param_data_type;
       
 22581             last_type_symbol = param_data_type;
       
 22582             
       
 22583             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22584             {
       
 22585         
       
 22586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22587                 return return_type_symbol;
       
 22588                 
       
 22589             }
       
 22590             
       
 22591             ERROR;
       
 22592         }
       
 22593         
       
 22594     }/*function_word_to_real*/
       
 22595     break;
       
 22596 
       
 22597 /****
       
 22598  *WORD_TO_LREAL
       
 22599  */
       
 22600     case function_word_to_lreal :
       
 22601     {
       
 22602         symbol_c *last_type_symbol = NULL;
       
 22603 
       
 22604         {
       
 22605             symbol_c *IN_type_symbol = param_data_type;
       
 22606             last_type_symbol = param_data_type;
       
 22607             
       
 22608             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22609             {
       
 22610         
       
 22611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22612                 return return_type_symbol;
       
 22613                 
       
 22614             }
       
 22615             
       
 22616             ERROR;
       
 22617         }
       
 22618         
       
 22619     }/*function_word_to_lreal*/
       
 22620     break;
       
 22621 
       
 22622 /****
       
 22623  *WORD_TO_SINT
       
 22624  */
       
 22625     case function_word_to_sint :
       
 22626     {
       
 22627         symbol_c *last_type_symbol = NULL;
       
 22628 
       
 22629         {
       
 22630             symbol_c *IN_type_symbol = param_data_type;
       
 22631             last_type_symbol = param_data_type;
       
 22632             
       
 22633             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22634             {
       
 22635         
       
 22636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22637                 return return_type_symbol;
       
 22638                 
       
 22639             }
       
 22640             
       
 22641             ERROR;
       
 22642         }
       
 22643         
       
 22644     }/*function_word_to_sint*/
       
 22645     break;
       
 22646 
       
 22647 /****
       
 22648  *WORD_TO_INT
       
 22649  */
       
 22650     case function_word_to_int :
       
 22651     {
       
 22652         symbol_c *last_type_symbol = NULL;
       
 22653 
       
 22654         {
       
 22655             symbol_c *IN_type_symbol = param_data_type;
       
 22656             last_type_symbol = param_data_type;
       
 22657             
       
 22658             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22659             {
       
 22660         
       
 22661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22662                 return return_type_symbol;
       
 22663                 
       
 22664             }
       
 22665             
       
 22666             ERROR;
       
 22667         }
       
 22668         
       
 22669     }/*function_word_to_int*/
       
 22670     break;
       
 22671 
       
 22672 /****
       
 22673  *WORD_TO_DINT
       
 22674  */
       
 22675     case function_word_to_dint :
       
 22676     {
       
 22677         symbol_c *last_type_symbol = NULL;
       
 22678 
       
 22679         {
       
 22680             symbol_c *IN_type_symbol = param_data_type;
       
 22681             last_type_symbol = param_data_type;
       
 22682             
       
 22683             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22684             {
       
 22685         
       
 22686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22687                 return return_type_symbol;
       
 22688                 
       
 22689             }
       
 22690             
       
 22691             ERROR;
       
 22692         }
       
 22693         
       
 22694     }/*function_word_to_dint*/
       
 22695     break;
       
 22696 
       
 22697 /****
       
 22698  *WORD_TO_LINT
       
 22699  */
       
 22700     case function_word_to_lint :
       
 22701     {
       
 22702         symbol_c *last_type_symbol = NULL;
       
 22703 
       
 22704         {
       
 22705             symbol_c *IN_type_symbol = param_data_type;
       
 22706             last_type_symbol = param_data_type;
       
 22707             
       
 22708             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22709             {
       
 22710         
       
 22711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22712                 return return_type_symbol;
       
 22713                 
       
 22714             }
       
 22715             
       
 22716             ERROR;
       
 22717         }
       
 22718         
       
 22719     }/*function_word_to_lint*/
       
 22720     break;
       
 22721 
       
 22722 /****
       
 22723  *WORD_TO_USINT
       
 22724  */
       
 22725     case function_word_to_usint :
       
 22726     {
       
 22727         symbol_c *last_type_symbol = NULL;
       
 22728 
       
 22729         {
       
 22730             symbol_c *IN_type_symbol = param_data_type;
       
 22731             last_type_symbol = param_data_type;
       
 22732             
       
 22733             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22734             {
       
 22735         
       
 22736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22737                 return return_type_symbol;
       
 22738                 
       
 22739             }
       
 22740             
       
 22741             ERROR;
       
 22742         }
       
 22743         
       
 22744     }/*function_word_to_usint*/
       
 22745     break;
       
 22746 
       
 22747 /****
       
 22748  *WORD_TO_UINT
       
 22749  */
       
 22750     case function_word_to_uint :
       
 22751     {
       
 22752         symbol_c *last_type_symbol = NULL;
       
 22753 
       
 22754         {
       
 22755             symbol_c *IN_type_symbol = param_data_type;
       
 22756             last_type_symbol = param_data_type;
       
 22757             
       
 22758             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22759             {
       
 22760         
       
 22761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22762                 return return_type_symbol;
       
 22763                 
       
 22764             }
       
 22765             
       
 22766             ERROR;
       
 22767         }
       
 22768         
       
 22769     }/*function_word_to_uint*/
       
 22770     break;
       
 22771 
       
 22772 /****
       
 22773  *WORD_TO_UDINT
       
 22774  */
       
 22775     case function_word_to_udint :
       
 22776     {
       
 22777         symbol_c *last_type_symbol = NULL;
       
 22778 
       
 22779         {
       
 22780             symbol_c *IN_type_symbol = param_data_type;
       
 22781             last_type_symbol = param_data_type;
       
 22782             
       
 22783             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22784             {
       
 22785         
       
 22786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22787                 return return_type_symbol;
       
 22788                 
       
 22789             }
       
 22790             
       
 22791             ERROR;
       
 22792         }
       
 22793         
       
 22794     }/*function_word_to_udint*/
       
 22795     break;
       
 22796 
       
 22797 /****
       
 22798  *WORD_TO_ULINT
       
 22799  */
       
 22800     case function_word_to_ulint :
       
 22801     {
       
 22802         symbol_c *last_type_symbol = NULL;
       
 22803 
       
 22804         {
       
 22805             symbol_c *IN_type_symbol = param_data_type;
       
 22806             last_type_symbol = param_data_type;
       
 22807             
       
 22808             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22809             {
       
 22810         
       
 22811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22812                 return return_type_symbol;
       
 22813                 
       
 22814             }
       
 22815             
       
 22816             ERROR;
       
 22817         }
       
 22818         
       
 22819     }/*function_word_to_ulint*/
       
 22820     break;
       
 22821 
       
 22822 /****
       
 22823  *WORD_TO_TIME
       
 22824  */
       
 22825     case function_word_to_time :
       
 22826     {
       
 22827         symbol_c *last_type_symbol = NULL;
       
 22828 
       
 22829         {
       
 22830             symbol_c *IN_type_symbol = param_data_type;
       
 22831             last_type_symbol = param_data_type;
       
 22832             
       
 22833             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22834             {
       
 22835         
       
 22836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22837                 return return_type_symbol;
       
 22838                 
       
 22839             }
       
 22840             
       
 22841             ERROR;
       
 22842         }
       
 22843         
       
 22844     }/*function_word_to_time*/
       
 22845     break;
       
 22846 
       
 22847 /****
       
 22848  *WORD_TO_BOOL
       
 22849  */
       
 22850     case function_word_to_bool :
       
 22851     {
       
 22852         symbol_c *last_type_symbol = NULL;
       
 22853 
       
 22854         {
       
 22855             symbol_c *IN_type_symbol = param_data_type;
       
 22856             last_type_symbol = param_data_type;
       
 22857             
       
 22858             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22859             {
       
 22860         
       
 22861                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22862                 return return_type_symbol;
       
 22863                 
       
 22864             }
       
 22865             
       
 22866             ERROR;
       
 22867         }
       
 22868         
       
 22869     }/*function_word_to_bool*/
       
 22870     break;
       
 22871 
       
 22872 /****
       
 22873  *WORD_TO_BYTE
       
 22874  */
       
 22875     case function_word_to_byte :
       
 22876     {
       
 22877         symbol_c *last_type_symbol = NULL;
       
 22878 
       
 22879         {
       
 22880             symbol_c *IN_type_symbol = param_data_type;
       
 22881             last_type_symbol = param_data_type;
       
 22882             
       
 22883             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22884             {
       
 22885         
       
 22886                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22887                 return return_type_symbol;
       
 22888                 
       
 22889             }
       
 22890             
       
 22891             ERROR;
       
 22892         }
       
 22893         
       
 22894     }/*function_word_to_byte*/
       
 22895     break;
       
 22896 
       
 22897 /****
       
 22898  *WORD_TO_DWORD
       
 22899  */
       
 22900     case function_word_to_dword :
       
 22901     {
       
 22902         symbol_c *last_type_symbol = NULL;
       
 22903 
       
 22904         {
       
 22905             symbol_c *IN_type_symbol = param_data_type;
       
 22906             last_type_symbol = param_data_type;
       
 22907             
       
 22908             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22909             {
       
 22910         
       
 22911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22912                 return return_type_symbol;
       
 22913                 
       
 22914             }
       
 22915             
       
 22916             ERROR;
       
 22917         }
       
 22918         
       
 22919     }/*function_word_to_dword*/
       
 22920     break;
       
 22921 
       
 22922 /****
       
 22923  *WORD_TO_LWORD
       
 22924  */
       
 22925     case function_word_to_lword :
       
 22926     {
       
 22927         symbol_c *last_type_symbol = NULL;
       
 22928 
       
 22929         {
       
 22930             symbol_c *IN_type_symbol = param_data_type;
       
 22931             last_type_symbol = param_data_type;
       
 22932             
       
 22933             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22934             {
       
 22935         
       
 22936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22937                 return return_type_symbol;
       
 22938                 
       
 22939             }
       
 22940             
       
 22941             ERROR;
       
 22942         }
       
 22943         
       
 22944     }/*function_word_to_lword*/
       
 22945     break;
       
 22946 
       
 22947 /****
       
 22948  *WORD_TO_STRING
       
 22949  */
       
 22950     case function_word_to_string :
       
 22951     {
       
 22952         symbol_c *last_type_symbol = NULL;
       
 22953 
       
 22954         {
       
 22955             symbol_c *IN_type_symbol = param_data_type;
       
 22956             last_type_symbol = param_data_type;
       
 22957             
       
 22958             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22959             {
       
 22960         
       
 22961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22962                 return return_type_symbol;
       
 22963                 
       
 22964             }
       
 22965             
       
 22966             ERROR;
       
 22967         }
       
 22968         
       
 22969     }/*function_word_to_string*/
       
 22970     break;
       
 22971 
       
 22972 /****
       
 22973  *WORD_TO_WSTRING
       
 22974  */
       
 22975     case function_word_to_wstring :
       
 22976     {
       
 22977         symbol_c *last_type_symbol = NULL;
       
 22978 
       
 22979         {
       
 22980             symbol_c *IN_type_symbol = param_data_type;
       
 22981             last_type_symbol = param_data_type;
       
 22982             
       
 22983             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22984             {
       
 22985         
       
 22986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 22987                 return return_type_symbol;
       
 22988                 
       
 22989             }
       
 22990             
       
 22991             ERROR;
       
 22992         }
       
 22993         
       
 22994     }/*function_word_to_wstring*/
       
 22995     break;
       
 22996 
       
 22997 /****
       
 22998  *WORD_TO_DATE
       
 22999  */
       
 23000     case function_word_to_date :
       
 23001     {
       
 23002         symbol_c *last_type_symbol = NULL;
       
 23003 
       
 23004         {
       
 23005             symbol_c *IN_type_symbol = param_data_type;
       
 23006             last_type_symbol = param_data_type;
       
 23007             
       
 23008             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 23009             {
       
 23010         
       
 23011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23012                 return return_type_symbol;
       
 23013                 
       
 23014             }
       
 23015             
       
 23016             ERROR;
       
 23017         }
       
 23018         
       
 23019     }/*function_word_to_date*/
       
 23020     break;
       
 23021 
       
 23022 /****
       
 23023  *WORD_TO_TOD
       
 23024  */
       
 23025     case function_word_to_tod :
       
 23026     {
       
 23027         symbol_c *last_type_symbol = NULL;
       
 23028 
       
 23029         {
       
 23030             symbol_c *IN_type_symbol = param_data_type;
       
 23031             last_type_symbol = param_data_type;
       
 23032             
       
 23033             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 23034             {
       
 23035         
       
 23036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23037                 return return_type_symbol;
       
 23038                 
       
 23039             }
       
 23040             
       
 23041             ERROR;
       
 23042         }
       
 23043         
       
 23044     }/*function_word_to_tod*/
       
 23045     break;
       
 23046 
       
 23047 /****
       
 23048  *WORD_TO_DT
       
 23049  */
       
 23050     case function_word_to_dt :
       
 23051     {
       
 23052         symbol_c *last_type_symbol = NULL;
       
 23053 
       
 23054         {
       
 23055             symbol_c *IN_type_symbol = param_data_type;
       
 23056             last_type_symbol = param_data_type;
       
 23057             
       
 23058             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 23059             {
       
 23060         
       
 23061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23062                 return return_type_symbol;
       
 23063                 
       
 23064             }
       
 23065             
       
 23066             ERROR;
       
 23067         }
       
 23068         
       
 23069     }/*function_word_to_dt*/
       
 23070     break;
       
 23071 
       
 23072 /****
       
 23073  *DWORD_TO_REAL
       
 23074  */
       
 23075     case function_dword_to_real :
       
 23076     {
       
 23077         symbol_c *last_type_symbol = NULL;
       
 23078 
       
 23079         {
       
 23080             symbol_c *IN_type_symbol = param_data_type;
       
 23081             last_type_symbol = param_data_type;
       
 23082             
       
 23083             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23084             {
       
 23085         
       
 23086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23087                 return return_type_symbol;
       
 23088                 
       
 23089             }
       
 23090             
       
 23091             ERROR;
       
 23092         }
       
 23093         
       
 23094     }/*function_dword_to_real*/
       
 23095     break;
       
 23096 
       
 23097 /****
       
 23098  *DWORD_TO_LREAL
       
 23099  */
       
 23100     case function_dword_to_lreal :
       
 23101     {
       
 23102         symbol_c *last_type_symbol = NULL;
       
 23103 
       
 23104         {
       
 23105             symbol_c *IN_type_symbol = param_data_type;
       
 23106             last_type_symbol = param_data_type;
       
 23107             
       
 23108             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23109             {
       
 23110         
       
 23111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23112                 return return_type_symbol;
       
 23113                 
       
 23114             }
       
 23115             
       
 23116             ERROR;
       
 23117         }
       
 23118         
       
 23119     }/*function_dword_to_lreal*/
       
 23120     break;
       
 23121 
       
 23122 /****
       
 23123  *DWORD_TO_SINT
       
 23124  */
       
 23125     case function_dword_to_sint :
       
 23126     {
       
 23127         symbol_c *last_type_symbol = NULL;
       
 23128 
       
 23129         {
       
 23130             symbol_c *IN_type_symbol = param_data_type;
       
 23131             last_type_symbol = param_data_type;
       
 23132             
       
 23133             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23134             {
       
 23135         
       
 23136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23137                 return return_type_symbol;
       
 23138                 
       
 23139             }
       
 23140             
       
 23141             ERROR;
       
 23142         }
       
 23143         
       
 23144     }/*function_dword_to_sint*/
       
 23145     break;
       
 23146 
       
 23147 /****
       
 23148  *DWORD_TO_INT
       
 23149  */
       
 23150     case function_dword_to_int :
       
 23151     {
       
 23152         symbol_c *last_type_symbol = NULL;
       
 23153 
       
 23154         {
       
 23155             symbol_c *IN_type_symbol = param_data_type;
       
 23156             last_type_symbol = param_data_type;
       
 23157             
       
 23158             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23159             {
       
 23160         
       
 23161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23162                 return return_type_symbol;
       
 23163                 
       
 23164             }
       
 23165             
       
 23166             ERROR;
       
 23167         }
       
 23168         
       
 23169     }/*function_dword_to_int*/
       
 23170     break;
       
 23171 
       
 23172 /****
       
 23173  *DWORD_TO_DINT
       
 23174  */
       
 23175     case function_dword_to_dint :
       
 23176     {
       
 23177         symbol_c *last_type_symbol = NULL;
       
 23178 
       
 23179         {
       
 23180             symbol_c *IN_type_symbol = param_data_type;
       
 23181             last_type_symbol = param_data_type;
       
 23182             
       
 23183             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23184             {
       
 23185         
       
 23186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23187                 return return_type_symbol;
       
 23188                 
       
 23189             }
       
 23190             
       
 23191             ERROR;
       
 23192         }
       
 23193         
       
 23194     }/*function_dword_to_dint*/
       
 23195     break;
       
 23196 
       
 23197 /****
       
 23198  *DWORD_TO_LINT
       
 23199  */
       
 23200     case function_dword_to_lint :
       
 23201     {
       
 23202         symbol_c *last_type_symbol = NULL;
       
 23203 
       
 23204         {
       
 23205             symbol_c *IN_type_symbol = param_data_type;
       
 23206             last_type_symbol = param_data_type;
       
 23207             
       
 23208             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23209             {
       
 23210         
       
 23211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23212                 return return_type_symbol;
       
 23213                 
       
 23214             }
       
 23215             
       
 23216             ERROR;
       
 23217         }
       
 23218         
       
 23219     }/*function_dword_to_lint*/
       
 23220     break;
       
 23221 
       
 23222 /****
       
 23223  *DWORD_TO_USINT
       
 23224  */
       
 23225     case function_dword_to_usint :
       
 23226     {
       
 23227         symbol_c *last_type_symbol = NULL;
       
 23228 
       
 23229         {
       
 23230             symbol_c *IN_type_symbol = param_data_type;
       
 23231             last_type_symbol = param_data_type;
       
 23232             
       
 23233             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23234             {
       
 23235         
       
 23236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23237                 return return_type_symbol;
       
 23238                 
       
 23239             }
       
 23240             
       
 23241             ERROR;
       
 23242         }
       
 23243         
       
 23244     }/*function_dword_to_usint*/
       
 23245     break;
       
 23246 
       
 23247 /****
       
 23248  *DWORD_TO_UINT
       
 23249  */
       
 23250     case function_dword_to_uint :
       
 23251     {
       
 23252         symbol_c *last_type_symbol = NULL;
       
 23253 
       
 23254         {
       
 23255             symbol_c *IN_type_symbol = param_data_type;
       
 23256             last_type_symbol = param_data_type;
       
 23257             
       
 23258             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23259             {
       
 23260         
       
 23261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23262                 return return_type_symbol;
       
 23263                 
       
 23264             }
       
 23265             
       
 23266             ERROR;
       
 23267         }
       
 23268         
       
 23269     }/*function_dword_to_uint*/
       
 23270     break;
       
 23271 
       
 23272 /****
       
 23273  *DWORD_TO_UDINT
       
 23274  */
       
 23275     case function_dword_to_udint :
       
 23276     {
       
 23277         symbol_c *last_type_symbol = NULL;
       
 23278 
       
 23279         {
       
 23280             symbol_c *IN_type_symbol = param_data_type;
       
 23281             last_type_symbol = param_data_type;
       
 23282             
       
 23283             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23284             {
       
 23285         
       
 23286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23287                 return return_type_symbol;
       
 23288                 
       
 23289             }
       
 23290             
       
 23291             ERROR;
       
 23292         }
       
 23293         
       
 23294     }/*function_dword_to_udint*/
       
 23295     break;
       
 23296 
       
 23297 /****
       
 23298  *DWORD_TO_ULINT
       
 23299  */
       
 23300     case function_dword_to_ulint :
       
 23301     {
       
 23302         symbol_c *last_type_symbol = NULL;
       
 23303 
       
 23304         {
       
 23305             symbol_c *IN_type_symbol = param_data_type;
       
 23306             last_type_symbol = param_data_type;
       
 23307             
       
 23308             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23309             {
       
 23310         
       
 23311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23312                 return return_type_symbol;
       
 23313                 
       
 23314             }
       
 23315             
       
 23316             ERROR;
       
 23317         }
       
 23318         
       
 23319     }/*function_dword_to_ulint*/
       
 23320     break;
       
 23321 
       
 23322 /****
       
 23323  *DWORD_TO_TIME
       
 23324  */
       
 23325     case function_dword_to_time :
       
 23326     {
       
 23327         symbol_c *last_type_symbol = NULL;
       
 23328 
       
 23329         {
       
 23330             symbol_c *IN_type_symbol = param_data_type;
       
 23331             last_type_symbol = param_data_type;
       
 23332             
       
 23333             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23334             {
       
 23335         
       
 23336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23337                 return return_type_symbol;
       
 23338                 
       
 23339             }
       
 23340             
       
 23341             ERROR;
       
 23342         }
       
 23343         
       
 23344     }/*function_dword_to_time*/
       
 23345     break;
       
 23346 
       
 23347 /****
       
 23348  *DWORD_TO_BOOL
       
 23349  */
       
 23350     case function_dword_to_bool :
       
 23351     {
       
 23352         symbol_c *last_type_symbol = NULL;
       
 23353 
       
 23354         {
       
 23355             symbol_c *IN_type_symbol = param_data_type;
       
 23356             last_type_symbol = param_data_type;
       
 23357             
       
 23358             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23359             {
       
 23360         
       
 23361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23362                 return return_type_symbol;
       
 23363                 
       
 23364             }
       
 23365             
       
 23366             ERROR;
       
 23367         }
       
 23368         
       
 23369     }/*function_dword_to_bool*/
       
 23370     break;
       
 23371 
       
 23372 /****
       
 23373  *DWORD_TO_BYTE
       
 23374  */
       
 23375     case function_dword_to_byte :
       
 23376     {
       
 23377         symbol_c *last_type_symbol = NULL;
       
 23378 
       
 23379         {
       
 23380             symbol_c *IN_type_symbol = param_data_type;
       
 23381             last_type_symbol = param_data_type;
       
 23382             
       
 23383             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23384             {
       
 23385         
       
 23386                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23387                 return return_type_symbol;
       
 23388                 
       
 23389             }
       
 23390             
       
 23391             ERROR;
       
 23392         }
       
 23393         
       
 23394     }/*function_dword_to_byte*/
       
 23395     break;
       
 23396 
       
 23397 /****
       
 23398  *DWORD_TO_WORD
       
 23399  */
       
 23400     case function_dword_to_word :
       
 23401     {
       
 23402         symbol_c *last_type_symbol = NULL;
       
 23403 
       
 23404         {
       
 23405             symbol_c *IN_type_symbol = param_data_type;
       
 23406             last_type_symbol = param_data_type;
       
 23407             
       
 23408             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23409             {
       
 23410         
       
 23411                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23412                 return return_type_symbol;
       
 23413                 
       
 23414             }
       
 23415             
       
 23416             ERROR;
       
 23417         }
       
 23418         
       
 23419     }/*function_dword_to_word*/
       
 23420     break;
       
 23421 
       
 23422 /****
       
 23423  *DWORD_TO_LWORD
       
 23424  */
       
 23425     case function_dword_to_lword :
       
 23426     {
       
 23427         symbol_c *last_type_symbol = NULL;
       
 23428 
       
 23429         {
       
 23430             symbol_c *IN_type_symbol = param_data_type;
       
 23431             last_type_symbol = param_data_type;
       
 23432             
       
 23433             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23434             {
       
 23435         
       
 23436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23437                 return return_type_symbol;
       
 23438                 
       
 23439             }
       
 23440             
       
 23441             ERROR;
       
 23442         }
       
 23443         
       
 23444     }/*function_dword_to_lword*/
       
 23445     break;
       
 23446 
       
 23447 /****
       
 23448  *DWORD_TO_STRING
       
 23449  */
       
 23450     case function_dword_to_string :
       
 23451     {
       
 23452         symbol_c *last_type_symbol = NULL;
       
 23453 
       
 23454         {
       
 23455             symbol_c *IN_type_symbol = param_data_type;
       
 23456             last_type_symbol = param_data_type;
       
 23457             
       
 23458             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23459             {
       
 23460         
       
 23461                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23462                 return return_type_symbol;
       
 23463                 
       
 23464             }
       
 23465             
       
 23466             ERROR;
       
 23467         }
       
 23468         
       
 23469     }/*function_dword_to_string*/
       
 23470     break;
       
 23471 
       
 23472 /****
       
 23473  *DWORD_TO_WSTRING
       
 23474  */
       
 23475     case function_dword_to_wstring :
       
 23476     {
       
 23477         symbol_c *last_type_symbol = NULL;
       
 23478 
       
 23479         {
       
 23480             symbol_c *IN_type_symbol = param_data_type;
       
 23481             last_type_symbol = param_data_type;
       
 23482             
       
 23483             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23484             {
       
 23485         
       
 23486                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 23487                 return return_type_symbol;
       
 23488                 
       
 23489             }
       
 23490             
       
 23491             ERROR;
       
 23492         }
       
 23493         
       
 23494     }/*function_dword_to_wstring*/
       
 23495     break;
       
 23496 
       
 23497 /****
       
 23498  *DWORD_TO_DATE
       
 23499  */
       
 23500     case function_dword_to_date :
       
 23501     {
       
 23502         symbol_c *last_type_symbol = NULL;
       
 23503 
       
 23504         {
       
 23505             symbol_c *IN_type_symbol = param_data_type;
       
 23506             last_type_symbol = param_data_type;
       
 23507             
       
 23508             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23509             {
       
 23510         
       
 23511                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23512                 return return_type_symbol;
       
 23513                 
       
 23514             }
       
 23515             
       
 23516             ERROR;
       
 23517         }
       
 23518         
       
 23519     }/*function_dword_to_date*/
       
 23520     break;
       
 23521 
       
 23522 /****
       
 23523  *DWORD_TO_TOD
       
 23524  */
       
 23525     case function_dword_to_tod :
       
 23526     {
       
 23527         symbol_c *last_type_symbol = NULL;
       
 23528 
       
 23529         {
       
 23530             symbol_c *IN_type_symbol = param_data_type;
       
 23531             last_type_symbol = param_data_type;
       
 23532             
       
 23533             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23534             {
       
 23535         
       
 23536                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23537                 return return_type_symbol;
       
 23538                 
       
 23539             }
       
 23540             
       
 23541             ERROR;
       
 23542         }
       
 23543         
       
 23544     }/*function_dword_to_tod*/
       
 23545     break;
       
 23546 
       
 23547 /****
       
 23548  *DWORD_TO_DT
       
 23549  */
       
 23550     case function_dword_to_dt :
       
 23551     {
       
 23552         symbol_c *last_type_symbol = NULL;
       
 23553 
       
 23554         {
       
 23555             symbol_c *IN_type_symbol = param_data_type;
       
 23556             last_type_symbol = param_data_type;
       
 23557             
       
 23558             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23559             {
       
 23560         
       
 23561                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23562                 return return_type_symbol;
       
 23563                 
       
 23564             }
       
 23565             
       
 23566             ERROR;
       
 23567         }
       
 23568         
       
 23569     }/*function_dword_to_dt*/
       
 23570     break;
       
 23571 
       
 23572 /****
       
 23573  *LWORD_TO_REAL
       
 23574  */
       
 23575     case function_lword_to_real :
       
 23576     {
       
 23577         symbol_c *last_type_symbol = NULL;
       
 23578 
       
 23579         {
       
 23580             symbol_c *IN_type_symbol = param_data_type;
       
 23581             last_type_symbol = param_data_type;
       
 23582             
       
 23583             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23584             {
       
 23585         
       
 23586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23587                 return return_type_symbol;
       
 23588                 
       
 23589             }
       
 23590             
       
 23591             ERROR;
       
 23592         }
       
 23593         
       
 23594     }/*function_lword_to_real*/
       
 23595     break;
       
 23596 
       
 23597 /****
       
 23598  *LWORD_TO_LREAL
       
 23599  */
       
 23600     case function_lword_to_lreal :
       
 23601     {
       
 23602         symbol_c *last_type_symbol = NULL;
       
 23603 
       
 23604         {
       
 23605             symbol_c *IN_type_symbol = param_data_type;
       
 23606             last_type_symbol = param_data_type;
       
 23607             
       
 23608             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23609             {
       
 23610         
       
 23611                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23612                 return return_type_symbol;
       
 23613                 
       
 23614             }
       
 23615             
       
 23616             ERROR;
       
 23617         }
       
 23618         
       
 23619     }/*function_lword_to_lreal*/
       
 23620     break;
       
 23621 
       
 23622 /****
       
 23623  *LWORD_TO_SINT
       
 23624  */
       
 23625     case function_lword_to_sint :
       
 23626     {
       
 23627         symbol_c *last_type_symbol = NULL;
       
 23628 
       
 23629         {
       
 23630             symbol_c *IN_type_symbol = param_data_type;
       
 23631             last_type_symbol = param_data_type;
       
 23632             
       
 23633             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23634             {
       
 23635         
       
 23636                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23637                 return return_type_symbol;
       
 23638                 
       
 23639             }
       
 23640             
       
 23641             ERROR;
       
 23642         }
       
 23643         
       
 23644     }/*function_lword_to_sint*/
       
 23645     break;
       
 23646 
       
 23647 /****
       
 23648  *LWORD_TO_INT
       
 23649  */
       
 23650     case function_lword_to_int :
       
 23651     {
       
 23652         symbol_c *last_type_symbol = NULL;
       
 23653 
       
 23654         {
       
 23655             symbol_c *IN_type_symbol = param_data_type;
       
 23656             last_type_symbol = param_data_type;
       
 23657             
       
 23658             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23659             {
       
 23660         
       
 23661                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23662                 return return_type_symbol;
       
 23663                 
       
 23664             }
       
 23665             
       
 23666             ERROR;
       
 23667         }
       
 23668         
       
 23669     }/*function_lword_to_int*/
       
 23670     break;
       
 23671 
       
 23672 /****
       
 23673  *LWORD_TO_DINT
       
 23674  */
       
 23675     case function_lword_to_dint :
       
 23676     {
       
 23677         symbol_c *last_type_symbol = NULL;
       
 23678 
       
 23679         {
       
 23680             symbol_c *IN_type_symbol = param_data_type;
       
 23681             last_type_symbol = param_data_type;
       
 23682             
       
 23683             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23684             {
       
 23685         
       
 23686                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23687                 return return_type_symbol;
       
 23688                 
       
 23689             }
       
 23690             
       
 23691             ERROR;
       
 23692         }
       
 23693         
       
 23694     }/*function_lword_to_dint*/
       
 23695     break;
       
 23696 
       
 23697 /****
       
 23698  *LWORD_TO_LINT
       
 23699  */
       
 23700     case function_lword_to_lint :
       
 23701     {
       
 23702         symbol_c *last_type_symbol = NULL;
       
 23703 
       
 23704         {
       
 23705             symbol_c *IN_type_symbol = param_data_type;
       
 23706             last_type_symbol = param_data_type;
       
 23707             
       
 23708             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23709             {
       
 23710         
       
 23711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23712                 return return_type_symbol;
       
 23713                 
       
 23714             }
       
 23715             
       
 23716             ERROR;
       
 23717         }
       
 23718         
       
 23719     }/*function_lword_to_lint*/
       
 23720     break;
       
 23721 
       
 23722 /****
       
 23723  *LWORD_TO_USINT
       
 23724  */
       
 23725     case function_lword_to_usint :
       
 23726     {
       
 23727         symbol_c *last_type_symbol = NULL;
       
 23728 
       
 23729         {
       
 23730             symbol_c *IN_type_symbol = param_data_type;
       
 23731             last_type_symbol = param_data_type;
       
 23732             
       
 23733             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23734             {
       
 23735         
       
 23736                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23737                 return return_type_symbol;
       
 23738                 
       
 23739             }
       
 23740             
       
 23741             ERROR;
       
 23742         }
       
 23743         
       
 23744     }/*function_lword_to_usint*/
       
 23745     break;
       
 23746 
       
 23747 /****
       
 23748  *LWORD_TO_UINT
       
 23749  */
       
 23750     case function_lword_to_uint :
       
 23751     {
       
 23752         symbol_c *last_type_symbol = NULL;
       
 23753 
       
 23754         {
       
 23755             symbol_c *IN_type_symbol = param_data_type;
       
 23756             last_type_symbol = param_data_type;
       
 23757             
       
 23758             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23759             {
       
 23760         
       
 23761                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23762                 return return_type_symbol;
       
 23763                 
       
 23764             }
       
 23765             
       
 23766             ERROR;
       
 23767         }
       
 23768         
       
 23769     }/*function_lword_to_uint*/
       
 23770     break;
       
 23771 
       
 23772 /****
       
 23773  *LWORD_TO_UDINT
       
 23774  */
       
 23775     case function_lword_to_udint :
       
 23776     {
       
 23777         symbol_c *last_type_symbol = NULL;
       
 23778 
       
 23779         {
       
 23780             symbol_c *IN_type_symbol = param_data_type;
       
 23781             last_type_symbol = param_data_type;
       
 23782             
       
 23783             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23784             {
       
 23785         
       
 23786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23787                 return return_type_symbol;
       
 23788                 
       
 23789             }
       
 23790             
       
 23791             ERROR;
       
 23792         }
       
 23793         
       
 23794     }/*function_lword_to_udint*/
       
 23795     break;
       
 23796 
       
 23797 /****
       
 23798  *LWORD_TO_ULINT
       
 23799  */
       
 23800     case function_lword_to_ulint :
       
 23801     {
       
 23802         symbol_c *last_type_symbol = NULL;
       
 23803 
       
 23804         {
       
 23805             symbol_c *IN_type_symbol = param_data_type;
       
 23806             last_type_symbol = param_data_type;
       
 23807             
       
 23808             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23809             {
       
 23810         
       
 23811                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23812                 return return_type_symbol;
       
 23813                 
       
 23814             }
       
 23815             
       
 23816             ERROR;
       
 23817         }
       
 23818         
       
 23819     }/*function_lword_to_ulint*/
       
 23820     break;
       
 23821 
       
 23822 /****
       
 23823  *LWORD_TO_TIME
       
 23824  */
       
 23825     case function_lword_to_time :
       
 23826     {
       
 23827         symbol_c *last_type_symbol = NULL;
       
 23828 
       
 23829         {
       
 23830             symbol_c *IN_type_symbol = param_data_type;
       
 23831             last_type_symbol = param_data_type;
       
 23832             
       
 23833             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23834             {
       
 23835         
       
 23836                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23837                 return return_type_symbol;
       
 23838                 
       
 23839             }
       
 23840             
       
 23841             ERROR;
       
 23842         }
       
 23843         
       
 23844     }/*function_lword_to_time*/
       
 23845     break;
       
 23846 
       
 23847 /****
       
 23848  *LWORD_TO_BOOL
       
 23849  */
       
 23850     case function_lword_to_bool :
       
 23851     {
       
 23852         symbol_c *last_type_symbol = NULL;
       
 23853 
       
 23854         {
       
 23855             symbol_c *IN_type_symbol = param_data_type;
       
 23856             last_type_symbol = param_data_type;
       
 23857             
       
 23858             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23859             {
       
 23860         
       
 23861                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23862                 return return_type_symbol;
       
 23863                 
       
 23864             }
       
 23865             
       
 23866             ERROR;
       
 23867         }
       
 23868         
       
 23869     }/*function_lword_to_bool*/
       
 23870     break;
       
 23871 
       
 23872 /****
       
 23873  *LWORD_TO_BYTE
       
 23874  */
       
 23875     case function_lword_to_byte :
       
 23876     {
       
 23877         symbol_c *last_type_symbol = NULL;
       
 23878 
       
 23879         {
       
 23880             symbol_c *IN_type_symbol = param_data_type;
       
 23881             last_type_symbol = param_data_type;
       
 23882             
       
 23883             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23884             {
       
 23885         
       
 23886                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23887                 return return_type_symbol;
       
 23888                 
       
 23889             }
       
 23890             
       
 23891             ERROR;
       
 23892         }
       
 23893         
       
 23894     }/*function_lword_to_byte*/
       
 23895     break;
       
 23896 
       
 23897 /****
       
 23898  *LWORD_TO_WORD
       
 23899  */
       
 23900     case function_lword_to_word :
       
 23901     {
       
 23902         symbol_c *last_type_symbol = NULL;
       
 23903 
       
 23904         {
       
 23905             symbol_c *IN_type_symbol = param_data_type;
       
 23906             last_type_symbol = param_data_type;
       
 23907             
       
 23908             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23909             {
       
 23910         
       
 23911                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23912                 return return_type_symbol;
       
 23913                 
       
 23914             }
       
 23915             
       
 23916             ERROR;
       
 23917         }
       
 23918         
       
 23919     }/*function_lword_to_word*/
       
 23920     break;
       
 23921 
       
 23922 /****
       
 23923  *LWORD_TO_DWORD
       
 23924  */
       
 23925     case function_lword_to_dword :
       
 23926     {
       
 23927         symbol_c *last_type_symbol = NULL;
       
 23928 
       
 23929         {
       
 23930             symbol_c *IN_type_symbol = param_data_type;
       
 23931             last_type_symbol = param_data_type;
       
 23932             
       
 23933             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23934             {
       
 23935         
       
 23936                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23937                 return return_type_symbol;
       
 23938                 
       
 23939             }
       
 23940             
       
 23941             ERROR;
       
 23942         }
       
 23943         
       
 23944     }/*function_lword_to_dword*/
       
 23945     break;
       
 23946 
       
 23947 /****
       
 23948  *LWORD_TO_STRING
       
 23949  */
       
 23950     case function_lword_to_string :
       
 23951     {
       
 23952         symbol_c *last_type_symbol = NULL;
       
 23953 
       
 23954         {
       
 23955             symbol_c *IN_type_symbol = param_data_type;
       
 23956             last_type_symbol = param_data_type;
       
 23957             
       
 23958             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23959             {
       
 23960         
       
 23961                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23962                 return return_type_symbol;
       
 23963                 
       
 23964             }
       
 23965             
       
 23966             ERROR;
       
 23967         }
       
 23968         
       
 23969     }/*function_lword_to_string*/
       
 23970     break;
       
 23971 
       
 23972 /****
       
 23973  *LWORD_TO_WSTRING
       
 23974  */
       
 23975     case function_lword_to_wstring :
       
 23976     {
       
 23977         symbol_c *last_type_symbol = NULL;
       
 23978 
       
 23979         {
       
 23980             symbol_c *IN_type_symbol = param_data_type;
       
 23981             last_type_symbol = param_data_type;
       
 23982             
       
 23983             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23984             {
       
 23985         
       
 23986                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 23987                 return return_type_symbol;
       
 23988                 
       
 23989             }
       
 23990             
       
 23991             ERROR;
       
 23992         }
       
 23993         
       
 23994     }/*function_lword_to_wstring*/
       
 23995     break;
       
 23996 
       
 23997 /****
       
 23998  *LWORD_TO_DATE
       
 23999  */
       
 24000     case function_lword_to_date :
       
 24001     {
       
 24002         symbol_c *last_type_symbol = NULL;
       
 24003 
       
 24004         {
       
 24005             symbol_c *IN_type_symbol = param_data_type;
       
 24006             last_type_symbol = param_data_type;
       
 24007             
       
 24008             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24009             {
       
 24010         
       
 24011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24012                 return return_type_symbol;
       
 24013                 
       
 24014             }
       
 24015             
       
 24016             ERROR;
       
 24017         }
       
 24018         
       
 24019     }/*function_lword_to_date*/
       
 24020     break;
       
 24021 
       
 24022 /****
       
 24023  *LWORD_TO_TOD
       
 24024  */
       
 24025     case function_lword_to_tod :
       
 24026     {
       
 24027         symbol_c *last_type_symbol = NULL;
       
 24028 
       
 24029         {
       
 24030             symbol_c *IN_type_symbol = param_data_type;
       
 24031             last_type_symbol = param_data_type;
       
 24032             
       
 24033             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24034             {
       
 24035         
       
 24036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24037                 return return_type_symbol;
       
 24038                 
       
 24039             }
       
 24040             
       
 24041             ERROR;
       
 24042         }
       
 24043         
       
 24044     }/*function_lword_to_tod*/
       
 24045     break;
       
 24046 
       
 24047 /****
       
 24048  *LWORD_TO_DT
       
 24049  */
       
 24050     case function_lword_to_dt :
       
 24051     {
       
 24052         symbol_c *last_type_symbol = NULL;
       
 24053 
       
 24054         {
       
 24055             symbol_c *IN_type_symbol = param_data_type;
       
 24056             last_type_symbol = param_data_type;
       
 24057             
       
 24058             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 24059             {
       
 24060         
       
 24061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24062                 return return_type_symbol;
       
 24063                 
       
 24064             }
       
 24065             
       
 24066             ERROR;
       
 24067         }
       
 24068         
       
 24069     }/*function_lword_to_dt*/
       
 24070     break;
       
 24071 
       
 24072 /****
       
 24073  *STRING_TO_REAL
       
 24074  */
       
 24075     case function_string_to_real :
       
 24076     {
       
 24077         symbol_c *last_type_symbol = NULL;
       
 24078 
       
 24079         {
       
 24080             symbol_c *IN_type_symbol = param_data_type;
       
 24081             last_type_symbol = param_data_type;
       
 24082             
       
 24083             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24084             {
       
 24085         
       
 24086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24087                 return return_type_symbol;
       
 24088                 
       
 24089             }
       
 24090             
       
 24091             ERROR;
       
 24092         }
       
 24093         
       
 24094     }/*function_string_to_real*/
       
 24095     break;
       
 24096 
       
 24097 /****
       
 24098  *STRING_TO_LREAL
       
 24099  */
       
 24100     case function_string_to_lreal :
       
 24101     {
       
 24102         symbol_c *last_type_symbol = NULL;
       
 24103 
       
 24104         {
       
 24105             symbol_c *IN_type_symbol = param_data_type;
       
 24106             last_type_symbol = param_data_type;
       
 24107             
       
 24108             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24109             {
       
 24110         
       
 24111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24112                 return return_type_symbol;
       
 24113                 
       
 24114             }
       
 24115             
       
 24116             ERROR;
       
 24117         }
       
 24118         
       
 24119     }/*function_string_to_lreal*/
       
 24120     break;
       
 24121 
       
 24122 /****
       
 24123  *STRING_TO_SINT
       
 24124  */
       
 24125     case function_string_to_sint :
       
 24126     {
       
 24127         symbol_c *last_type_symbol = NULL;
       
 24128 
       
 24129         {
       
 24130             symbol_c *IN_type_symbol = param_data_type;
       
 24131             last_type_symbol = param_data_type;
       
 24132             
       
 24133             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24134             {
       
 24135         
       
 24136                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24137                 return return_type_symbol;
       
 24138                 
       
 24139             }
       
 24140             
       
 24141             ERROR;
       
 24142         }
       
 24143         
       
 24144     }/*function_string_to_sint*/
       
 24145     break;
       
 24146 
       
 24147 /****
       
 24148  *STRING_TO_INT
       
 24149  */
       
 24150     case function_string_to_int :
       
 24151     {
       
 24152         symbol_c *last_type_symbol = NULL;
       
 24153 
       
 24154         {
       
 24155             symbol_c *IN_type_symbol = param_data_type;
       
 24156             last_type_symbol = param_data_type;
       
 24157             
       
 24158             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24159             {
       
 24160         
       
 24161                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24162                 return return_type_symbol;
       
 24163                 
       
 24164             }
       
 24165             
       
 24166             ERROR;
       
 24167         }
       
 24168         
       
 24169     }/*function_string_to_int*/
       
 24170     break;
       
 24171 
       
 24172 /****
       
 24173  *STRING_TO_DINT
       
 24174  */
       
 24175     case function_string_to_dint :
       
 24176     {
       
 24177         symbol_c *last_type_symbol = NULL;
       
 24178 
       
 24179         {
       
 24180             symbol_c *IN_type_symbol = param_data_type;
       
 24181             last_type_symbol = param_data_type;
       
 24182             
       
 24183             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24184             {
       
 24185         
       
 24186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24187                 return return_type_symbol;
       
 24188                 
       
 24189             }
       
 24190             
       
 24191             ERROR;
       
 24192         }
       
 24193         
       
 24194     }/*function_string_to_dint*/
       
 24195     break;
       
 24196 
       
 24197 /****
       
 24198  *STRING_TO_LINT
       
 24199  */
       
 24200     case function_string_to_lint :
       
 24201     {
       
 24202         symbol_c *last_type_symbol = NULL;
       
 24203 
       
 24204         {
       
 24205             symbol_c *IN_type_symbol = param_data_type;
       
 24206             last_type_symbol = param_data_type;
       
 24207             
       
 24208             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24209             {
       
 24210         
       
 24211                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24212                 return return_type_symbol;
       
 24213                 
       
 24214             }
       
 24215             
       
 24216             ERROR;
       
 24217         }
       
 24218         
       
 24219     }/*function_string_to_lint*/
       
 24220     break;
       
 24221 
       
 24222 /****
       
 24223  *STRING_TO_USINT
       
 24224  */
       
 24225     case function_string_to_usint :
       
 24226     {
       
 24227         symbol_c *last_type_symbol = NULL;
       
 24228 
       
 24229         {
       
 24230             symbol_c *IN_type_symbol = param_data_type;
       
 24231             last_type_symbol = param_data_type;
       
 24232             
       
 24233             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24234             {
       
 24235         
       
 24236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24237                 return return_type_symbol;
       
 24238                 
       
 24239             }
       
 24240             
       
 24241             ERROR;
       
 24242         }
       
 24243         
       
 24244     }/*function_string_to_usint*/
       
 24245     break;
       
 24246 
       
 24247 /****
       
 24248  *STRING_TO_UINT
       
 24249  */
       
 24250     case function_string_to_uint :
       
 24251     {
       
 24252         symbol_c *last_type_symbol = NULL;
       
 24253 
       
 24254         {
       
 24255             symbol_c *IN_type_symbol = param_data_type;
       
 24256             last_type_symbol = param_data_type;
       
 24257             
       
 24258             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24259             {
       
 24260         
       
 24261                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24262                 return return_type_symbol;
       
 24263                 
       
 24264             }
       
 24265             
       
 24266             ERROR;
       
 24267         }
       
 24268         
       
 24269     }/*function_string_to_uint*/
       
 24270     break;
       
 24271 
       
 24272 /****
       
 24273  *STRING_TO_UDINT
       
 24274  */
       
 24275     case function_string_to_udint :
       
 24276     {
       
 24277         symbol_c *last_type_symbol = NULL;
       
 24278 
       
 24279         {
       
 24280             symbol_c *IN_type_symbol = param_data_type;
       
 24281             last_type_symbol = param_data_type;
       
 24282             
       
 24283             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24284             {
       
 24285         
       
 24286                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24287                 return return_type_symbol;
       
 24288                 
       
 24289             }
       
 24290             
       
 24291             ERROR;
       
 24292         }
       
 24293         
       
 24294     }/*function_string_to_udint*/
       
 24295     break;
       
 24296 
       
 24297 /****
       
 24298  *STRING_TO_ULINT
       
 24299  */
       
 24300     case function_string_to_ulint :
       
 24301     {
       
 24302         symbol_c *last_type_symbol = NULL;
       
 24303 
       
 24304         {
       
 24305             symbol_c *IN_type_symbol = param_data_type;
       
 24306             last_type_symbol = param_data_type;
       
 24307             
       
 24308             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24309             {
       
 24310         
       
 24311                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24312                 return return_type_symbol;
       
 24313                 
       
 24314             }
       
 24315             
       
 24316             ERROR;
       
 24317         }
       
 24318         
       
 24319     }/*function_string_to_ulint*/
       
 24320     break;
       
 24321 
       
 24322 /****
       
 24323  *STRING_TO_TIME
       
 24324  */
       
 24325     case function_string_to_time :
       
 24326     {
       
 24327         symbol_c *last_type_symbol = NULL;
       
 24328 
       
 24329         {
       
 24330             symbol_c *IN_type_symbol = param_data_type;
       
 24331             last_type_symbol = param_data_type;
       
 24332             
       
 24333             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24334             {
       
 24335         
       
 24336                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24337                 return return_type_symbol;
       
 24338                 
       
 24339             }
       
 24340             
       
 24341             ERROR;
       
 24342         }
       
 24343         
       
 24344     }/*function_string_to_time*/
       
 24345     break;
       
 24346 
       
 24347 /****
       
 24348  *STRING_TO_BOOL
       
 24349  */
       
 24350     case function_string_to_bool :
       
 24351     {
       
 24352         symbol_c *last_type_symbol = NULL;
       
 24353 
       
 24354         {
       
 24355             symbol_c *IN_type_symbol = param_data_type;
       
 24356             last_type_symbol = param_data_type;
       
 24357             
       
 24358             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24359             {
       
 24360         
       
 24361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24362                 return return_type_symbol;
       
 24363                 
       
 24364             }
       
 24365             
       
 24366             ERROR;
       
 24367         }
       
 24368         
       
 24369     }/*function_string_to_bool*/
       
 24370     break;
       
 24371 
       
 24372 /****
       
 24373  *STRING_TO_BYTE
       
 24374  */
       
 24375     case function_string_to_byte :
       
 24376     {
       
 24377         symbol_c *last_type_symbol = NULL;
       
 24378 
       
 24379         {
       
 24380             symbol_c *IN_type_symbol = param_data_type;
       
 24381             last_type_symbol = param_data_type;
       
 24382             
       
 24383             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24384             {
       
 24385         
       
 24386                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24387                 return return_type_symbol;
       
 24388                 
       
 24389             }
       
 24390             
       
 24391             ERROR;
       
 24392         }
       
 24393         
       
 24394     }/*function_string_to_byte*/
       
 24395     break;
       
 24396 
       
 24397 /****
       
 24398  *STRING_TO_WORD
       
 24399  */
       
 24400     case function_string_to_word :
       
 24401     {
       
 24402         symbol_c *last_type_symbol = NULL;
       
 24403 
       
 24404         {
       
 24405             symbol_c *IN_type_symbol = param_data_type;
       
 24406             last_type_symbol = param_data_type;
       
 24407             
       
 24408             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24409             {
       
 24410         
       
 24411                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24412                 return return_type_symbol;
       
 24413                 
       
 24414             }
       
 24415             
       
 24416             ERROR;
       
 24417         }
       
 24418         
       
 24419     }/*function_string_to_word*/
       
 24420     break;
       
 24421 
       
 24422 /****
       
 24423  *STRING_TO_DWORD
       
 24424  */
       
 24425     case function_string_to_dword :
       
 24426     {
       
 24427         symbol_c *last_type_symbol = NULL;
       
 24428 
       
 24429         {
       
 24430             symbol_c *IN_type_symbol = param_data_type;
       
 24431             last_type_symbol = param_data_type;
       
 24432             
       
 24433             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24434             {
       
 24435         
       
 24436                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24437                 return return_type_symbol;
       
 24438                 
       
 24439             }
       
 24440             
       
 24441             ERROR;
       
 24442         }
       
 24443         
       
 24444     }/*function_string_to_dword*/
       
 24445     break;
       
 24446 
       
 24447 /****
       
 24448  *STRING_TO_LWORD
       
 24449  */
       
 24450     case function_string_to_lword :
       
 24451     {
       
 24452         symbol_c *last_type_symbol = NULL;
       
 24453 
       
 24454         {
       
 24455             symbol_c *IN_type_symbol = param_data_type;
       
 24456             last_type_symbol = param_data_type;
       
 24457             
       
 24458             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24459             {
       
 24460         
       
 24461                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24462                 return return_type_symbol;
       
 24463                 
       
 24464             }
       
 24465             
       
 24466             ERROR;
       
 24467         }
       
 24468         
       
 24469     }/*function_string_to_lword*/
       
 24470     break;
       
 24471 
       
 24472 /****
       
 24473  *STRING_TO_DATE
       
 24474  */
       
 24475     case function_string_to_date :
       
 24476     {
       
 24477         symbol_c *last_type_symbol = NULL;
       
 24478 
       
 24479         {
       
 24480             symbol_c *IN_type_symbol = param_data_type;
       
 24481             last_type_symbol = param_data_type;
       
 24482             
       
 24483             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24484             {
       
 24485         
       
 24486                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24487                 return return_type_symbol;
       
 24488                 
       
 24489             }
       
 24490             
       
 24491             ERROR;
       
 24492         }
       
 24493         
       
 24494     }/*function_string_to_date*/
       
 24495     break;
       
 24496 
       
 24497 /****
       
 24498  *STRING_TO_TOD
       
 24499  */
       
 24500     case function_string_to_tod :
       
 24501     {
       
 24502         symbol_c *last_type_symbol = NULL;
       
 24503 
       
 24504         {
       
 24505             symbol_c *IN_type_symbol = param_data_type;
       
 24506             last_type_symbol = param_data_type;
       
 24507             
       
 24508             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24509             {
       
 24510         
       
 24511                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24512                 return return_type_symbol;
       
 24513                 
       
 24514             }
       
 24515             
       
 24516             ERROR;
       
 24517         }
       
 24518         
       
 24519     }/*function_string_to_tod*/
       
 24520     break;
       
 24521 
       
 24522 /****
       
 24523  *STRING_TO_DT
       
 24524  */
       
 24525     case function_string_to_dt :
       
 24526     {
       
 24527         symbol_c *last_type_symbol = NULL;
       
 24528 
       
 24529         {
       
 24530             symbol_c *IN_type_symbol = param_data_type;
       
 24531             last_type_symbol = param_data_type;
       
 24532             
       
 24533             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 24534             {
       
 24535         
       
 24536                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24537                 return return_type_symbol;
       
 24538                 
       
 24539             }
       
 24540             
       
 24541             ERROR;
       
 24542         }
       
 24543         
       
 24544     }/*function_string_to_dt*/
       
 24545     break;
       
 24546 
       
 24547 /****
       
 24548  *WSTRING_TO_REAL
       
 24549  */
       
 24550     case function_wstring_to_real :
       
 24551     {
       
 24552         symbol_c *last_type_symbol = NULL;
       
 24553 
       
 24554         {
       
 24555             symbol_c *IN_type_symbol = param_data_type;
       
 24556             last_type_symbol = param_data_type;
       
 24557             
       
 24558             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24559             {
       
 24560         
       
 24561                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24562                 return return_type_symbol;
       
 24563                 
       
 24564             }
       
 24565             
       
 24566             ERROR;
       
 24567         }
       
 24568         
       
 24569     }/*function_wstring_to_real*/
       
 24570     break;
       
 24571 
       
 24572 /****
       
 24573  *WSTRING_TO_LREAL
       
 24574  */
       
 24575     case function_wstring_to_lreal :
       
 24576     {
       
 24577         symbol_c *last_type_symbol = NULL;
       
 24578 
       
 24579         {
       
 24580             symbol_c *IN_type_symbol = param_data_type;
       
 24581             last_type_symbol = param_data_type;
       
 24582             
       
 24583             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24584             {
       
 24585         
       
 24586                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24587                 return return_type_symbol;
       
 24588                 
       
 24589             }
       
 24590             
       
 24591             ERROR;
       
 24592         }
       
 24593         
       
 24594     }/*function_wstring_to_lreal*/
       
 24595     break;
       
 24596 
       
 24597 /****
       
 24598  *WSTRING_TO_SINT
       
 24599  */
       
 24600     case function_wstring_to_sint :
       
 24601     {
       
 24602         symbol_c *last_type_symbol = NULL;
       
 24603 
       
 24604         {
       
 24605             symbol_c *IN_type_symbol = param_data_type;
       
 24606             last_type_symbol = param_data_type;
       
 24607             
       
 24608             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24609             {
       
 24610         
       
 24611                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24612                 return return_type_symbol;
       
 24613                 
       
 24614             }
       
 24615             
       
 24616             ERROR;
       
 24617         }
       
 24618         
       
 24619     }/*function_wstring_to_sint*/
       
 24620     break;
       
 24621 
       
 24622 /****
       
 24623  *WSTRING_TO_INT
       
 24624  */
       
 24625     case function_wstring_to_int :
       
 24626     {
       
 24627         symbol_c *last_type_symbol = NULL;
       
 24628 
       
 24629         {
       
 24630             symbol_c *IN_type_symbol = param_data_type;
       
 24631             last_type_symbol = param_data_type;
       
 24632             
       
 24633             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24634             {
       
 24635         
       
 24636                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24637                 return return_type_symbol;
       
 24638                 
       
 24639             }
       
 24640             
       
 24641             ERROR;
       
 24642         }
       
 24643         
       
 24644     }/*function_wstring_to_int*/
       
 24645     break;
       
 24646 
       
 24647 /****
       
 24648  *WSTRING_TO_DINT
       
 24649  */
       
 24650     case function_wstring_to_dint :
       
 24651     {
       
 24652         symbol_c *last_type_symbol = NULL;
       
 24653 
       
 24654         {
       
 24655             symbol_c *IN_type_symbol = param_data_type;
       
 24656             last_type_symbol = param_data_type;
       
 24657             
       
 24658             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24659             {
       
 24660         
       
 24661                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24662                 return return_type_symbol;
       
 24663                 
       
 24664             }
       
 24665             
       
 24666             ERROR;
       
 24667         }
       
 24668         
       
 24669     }/*function_wstring_to_dint*/
       
 24670     break;
       
 24671 
       
 24672 /****
       
 24673  *WSTRING_TO_LINT
       
 24674  */
       
 24675     case function_wstring_to_lint :
       
 24676     {
       
 24677         symbol_c *last_type_symbol = NULL;
       
 24678 
       
 24679         {
       
 24680             symbol_c *IN_type_symbol = param_data_type;
       
 24681             last_type_symbol = param_data_type;
       
 24682             
       
 24683             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24684             {
       
 24685         
       
 24686                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24687                 return return_type_symbol;
       
 24688                 
       
 24689             }
       
 24690             
       
 24691             ERROR;
       
 24692         }
       
 24693         
       
 24694     }/*function_wstring_to_lint*/
       
 24695     break;
       
 24696 
       
 24697 /****
       
 24698  *WSTRING_TO_USINT
       
 24699  */
       
 24700     case function_wstring_to_usint :
       
 24701     {
       
 24702         symbol_c *last_type_symbol = NULL;
       
 24703 
       
 24704         {
       
 24705             symbol_c *IN_type_symbol = param_data_type;
       
 24706             last_type_symbol = param_data_type;
       
 24707             
       
 24708             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24709             {
       
 24710         
       
 24711                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24712                 return return_type_symbol;
       
 24713                 
       
 24714             }
       
 24715             
       
 24716             ERROR;
       
 24717         }
       
 24718         
       
 24719     }/*function_wstring_to_usint*/
       
 24720     break;
       
 24721 
       
 24722 /****
       
 24723  *WSTRING_TO_UINT
       
 24724  */
       
 24725     case function_wstring_to_uint :
       
 24726     {
       
 24727         symbol_c *last_type_symbol = NULL;
       
 24728 
       
 24729         {
       
 24730             symbol_c *IN_type_symbol = param_data_type;
       
 24731             last_type_symbol = param_data_type;
       
 24732             
       
 24733             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24734             {
       
 24735         
       
 24736                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24737                 return return_type_symbol;
       
 24738                 
       
 24739             }
       
 24740             
       
 24741             ERROR;
       
 24742         }
       
 24743         
       
 24744     }/*function_wstring_to_uint*/
       
 24745     break;
       
 24746 
       
 24747 /****
       
 24748  *WSTRING_TO_UDINT
       
 24749  */
       
 24750     case function_wstring_to_udint :
       
 24751     {
       
 24752         symbol_c *last_type_symbol = NULL;
       
 24753 
       
 24754         {
       
 24755             symbol_c *IN_type_symbol = param_data_type;
       
 24756             last_type_symbol = param_data_type;
       
 24757             
       
 24758             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24759             {
       
 24760         
       
 24761                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24762                 return return_type_symbol;
       
 24763                 
       
 24764             }
       
 24765             
       
 24766             ERROR;
       
 24767         }
       
 24768         
       
 24769     }/*function_wstring_to_udint*/
       
 24770     break;
       
 24771 
       
 24772 /****
       
 24773  *WSTRING_TO_ULINT
       
 24774  */
       
 24775     case function_wstring_to_ulint :
       
 24776     {
       
 24777         symbol_c *last_type_symbol = NULL;
       
 24778 
       
 24779         {
       
 24780             symbol_c *IN_type_symbol = param_data_type;
       
 24781             last_type_symbol = param_data_type;
       
 24782             
       
 24783             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24784             {
       
 24785         
       
 24786                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24787                 return return_type_symbol;
       
 24788                 
       
 24789             }
       
 24790             
       
 24791             ERROR;
       
 24792         }
       
 24793         
       
 24794     }/*function_wstring_to_ulint*/
       
 24795     break;
       
 24796 
       
 24797 /****
       
 24798  *WSTRING_TO_TIME
       
 24799  */
       
 24800     case function_wstring_to_time :
       
 24801     {
       
 24802         symbol_c *last_type_symbol = NULL;
       
 24803 
       
 24804         {
       
 24805             symbol_c *IN_type_symbol = param_data_type;
       
 24806             last_type_symbol = param_data_type;
       
 24807             
       
 24808             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24809             {
       
 24810         
       
 24811                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24812                 return return_type_symbol;
       
 24813                 
       
 24814             }
       
 24815             
       
 24816             ERROR;
       
 24817         }
       
 24818         
       
 24819     }/*function_wstring_to_time*/
       
 24820     break;
       
 24821 
       
 24822 /****
       
 24823  *WSTRING_TO_BOOL
       
 24824  */
       
 24825     case function_wstring_to_bool :
       
 24826     {
       
 24827         symbol_c *last_type_symbol = NULL;
       
 24828 
       
 24829         {
       
 24830             symbol_c *IN_type_symbol = param_data_type;
       
 24831             last_type_symbol = param_data_type;
       
 24832             
       
 24833             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24834             {
       
 24835         
       
 24836                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24837                 return return_type_symbol;
       
 24838                 
       
 24839             }
       
 24840             
       
 24841             ERROR;
       
 24842         }
       
 24843         
       
 24844     }/*function_wstring_to_bool*/
       
 24845     break;
       
 24846 
       
 24847 /****
       
 24848  *WSTRING_TO_BYTE
       
 24849  */
       
 24850     case function_wstring_to_byte :
       
 24851     {
       
 24852         symbol_c *last_type_symbol = NULL;
       
 24853 
       
 24854         {
       
 24855             symbol_c *IN_type_symbol = param_data_type;
       
 24856             last_type_symbol = param_data_type;
       
 24857             
       
 24858             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24859             {
       
 24860         
       
 24861                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24862                 return return_type_symbol;
       
 24863                 
       
 24864             }
       
 24865             
       
 24866             ERROR;
       
 24867         }
       
 24868         
       
 24869     }/*function_wstring_to_byte*/
       
 24870     break;
       
 24871 
       
 24872 /****
       
 24873  *WSTRING_TO_WORD
       
 24874  */
       
 24875     case function_wstring_to_word :
       
 24876     {
       
 24877         symbol_c *last_type_symbol = NULL;
       
 24878 
       
 24879         {
       
 24880             symbol_c *IN_type_symbol = param_data_type;
       
 24881             last_type_symbol = param_data_type;
       
 24882             
       
 24883             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24884             {
       
 24885         
       
 24886                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24887                 return return_type_symbol;
       
 24888                 
       
 24889             }
       
 24890             
       
 24891             ERROR;
       
 24892         }
       
 24893         
       
 24894     }/*function_wstring_to_word*/
       
 24895     break;
       
 24896 
       
 24897 /****
       
 24898  *WSTRING_TO_DWORD
       
 24899  */
       
 24900     case function_wstring_to_dword :
       
 24901     {
       
 24902         symbol_c *last_type_symbol = NULL;
       
 24903 
       
 24904         {
       
 24905             symbol_c *IN_type_symbol = param_data_type;
       
 24906             last_type_symbol = param_data_type;
       
 24907             
       
 24908             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24909             {
       
 24910         
       
 24911                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24912                 return return_type_symbol;
       
 24913                 
       
 24914             }
       
 24915             
       
 24916             ERROR;
       
 24917         }
       
 24918         
       
 24919     }/*function_wstring_to_dword*/
       
 24920     break;
       
 24921 
       
 24922 /****
       
 24923  *WSTRING_TO_LWORD
       
 24924  */
       
 24925     case function_wstring_to_lword :
       
 24926     {
       
 24927         symbol_c *last_type_symbol = NULL;
       
 24928 
       
 24929         {
       
 24930             symbol_c *IN_type_symbol = param_data_type;
       
 24931             last_type_symbol = param_data_type;
       
 24932             
       
 24933             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24934             {
       
 24935         
       
 24936                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24937                 return return_type_symbol;
       
 24938                 
       
 24939             }
       
 24940             
       
 24941             ERROR;
       
 24942         }
       
 24943         
       
 24944     }/*function_wstring_to_lword*/
       
 24945     break;
       
 24946 
       
 24947 /****
       
 24948  *WSTRING_TO_DATE
       
 24949  */
       
 24950     case function_wstring_to_date :
       
 24951     {
       
 24952         symbol_c *last_type_symbol = NULL;
       
 24953 
       
 24954         {
       
 24955             symbol_c *IN_type_symbol = param_data_type;
       
 24956             last_type_symbol = param_data_type;
       
 24957             
       
 24958             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24959             {
       
 24960         
       
 24961                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24962                 return return_type_symbol;
       
 24963                 
       
 24964             }
       
 24965             
       
 24966             ERROR;
       
 24967         }
       
 24968         
       
 24969     }/*function_wstring_to_date*/
       
 24970     break;
       
 24971 
       
 24972 /****
       
 24973  *WSTRING_TO_TOD
       
 24974  */
       
 24975     case function_wstring_to_tod :
       
 24976     {
       
 24977         symbol_c *last_type_symbol = NULL;
       
 24978 
       
 24979         {
       
 24980             symbol_c *IN_type_symbol = param_data_type;
       
 24981             last_type_symbol = param_data_type;
       
 24982             
       
 24983             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 24984             {
       
 24985         
       
 24986                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24987                 return return_type_symbol;
       
 24988                 
       
 24989             }
       
 24990             
       
 24991             ERROR;
       
 24992         }
       
 24993         
       
 24994     }/*function_wstring_to_tod*/
       
 24995     break;
       
 24996 
       
 24997 /****
       
 24998  *WSTRING_TO_DT
       
 24999  */
       
 25000     case function_wstring_to_dt :
       
 25001     {
       
 25002         symbol_c *last_type_symbol = NULL;
       
 25003 
       
 25004         {
       
 25005             symbol_c *IN_type_symbol = param_data_type;
       
 25006             last_type_symbol = param_data_type;
       
 25007             
       
 25008             if (typeid(*last_type_symbol) == typeid(wstring_type_name_c))
       
 25009             {
       
 25010         
       
 25011                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 25012                 return return_type_symbol;
       
 25013                 
       
 25014             }
       
 25015             
       
 25016             ERROR;
       
 25017         }
       
 25018         
       
 25019     }/*function_wstring_to_dt*/
       
 25020     break;
       
 25021 
       
 25022 /****
       
 25023  *DATE_TO_REAL
       
 25024  */
       
 25025     case function_date_to_real :
       
 25026     {
       
 25027         symbol_c *last_type_symbol = NULL;
       
 25028 
       
 25029         {
       
 25030             symbol_c *IN_type_symbol = param_data_type;
       
 25031             last_type_symbol = param_data_type;
       
 25032             
       
 25033             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25034             {
       
 25035         
       
 25036                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 25037                 return return_type_symbol;
       
 25038                 
       
 25039             }
       
 25040             
       
 25041             ERROR;
       
 25042         }
       
 25043         
       
 25044     }/*function_date_to_real*/
       
 25045     break;
       
 25046 
       
 25047 /****
       
 25048  *DATE_TO_LREAL
       
 25049  */
       
 25050     case function_date_to_lreal :
       
 25051     {
       
 25052         symbol_c *last_type_symbol = NULL;
       
 25053 
       
 25054         {
       
 25055             symbol_c *IN_type_symbol = param_data_type;
       
 25056             last_type_symbol = param_data_type;
       
 25057             
       
 25058             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25059             {
       
 25060         
       
 25061                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25062                 return return_type_symbol;
       
 25063                 
       
 25064             }
       
 25065             
       
 25066             ERROR;
       
 25067         }
       
 25068         
       
 25069     }/*function_date_to_lreal*/
       
 25070     break;
       
 25071 
       
 25072 /****
       
 25073  *DATE_TO_SINT
       
 25074  */
       
 25075     case function_date_to_sint :
       
 25076     {
       
 25077         symbol_c *last_type_symbol = NULL;
       
 25078 
       
 25079         {
       
 25080             symbol_c *IN_type_symbol = param_data_type;
       
 25081             last_type_symbol = param_data_type;
       
 25082             
       
 25083             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25084             {
       
 25085         
       
 25086                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 25087                 return return_type_symbol;
       
 25088                 
       
 25089             }
       
 25090             
       
 25091             ERROR;
       
 25092         }
       
 25093         
       
 25094     }/*function_date_to_sint*/
       
 25095     break;
       
 25096 
       
 25097 /****
       
 25098  *DATE_TO_INT
       
 25099  */
       
 25100     case function_date_to_int :
       
 25101     {
       
 25102         symbol_c *last_type_symbol = NULL;
       
 25103 
       
 25104         {
       
 25105             symbol_c *IN_type_symbol = param_data_type;
       
 25106             last_type_symbol = param_data_type;
       
 25107             
       
 25108             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25109             {
       
 25110         
       
 25111                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25112                 return return_type_symbol;
       
 25113                 
       
 25114             }
       
 25115             
       
 25116             ERROR;
       
 25117         }
       
 25118         
       
 25119     }/*function_date_to_int*/
       
 25120     break;
       
 25121 
       
 25122 /****
       
 25123  *DATE_TO_DINT
       
 25124  */
       
 25125     case function_date_to_dint :
       
 25126     {
       
 25127         symbol_c *last_type_symbol = NULL;
       
 25128 
       
 25129         {
       
 25130             symbol_c *IN_type_symbol = param_data_type;
       
 25131             last_type_symbol = param_data_type;
       
 25132             
       
 25133             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25134             {
       
 25135         
       
 25136                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25137                 return return_type_symbol;
       
 25138                 
       
 25139             }
       
 25140             
       
 25141             ERROR;
       
 25142         }
       
 25143         
       
 25144     }/*function_date_to_dint*/
       
 25145     break;
       
 25146 
       
 25147 /****
       
 25148  *DATE_TO_LINT
       
 25149  */
       
 25150     case function_date_to_lint :
       
 25151     {
       
 25152         symbol_c *last_type_symbol = NULL;
       
 25153 
       
 25154         {
       
 25155             symbol_c *IN_type_symbol = param_data_type;
       
 25156             last_type_symbol = param_data_type;
       
 25157             
       
 25158             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25159             {
       
 25160         
       
 25161                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 25162                 return return_type_symbol;
       
 25163                 
       
 25164             }
       
 25165             
       
 25166             ERROR;
       
 25167         }
       
 25168         
       
 25169     }/*function_date_to_lint*/
       
 25170     break;
       
 25171 
       
 25172 /****
       
 25173  *DATE_TO_USINT
       
 25174  */
       
 25175     case function_date_to_usint :
       
 25176     {
       
 25177         symbol_c *last_type_symbol = NULL;
       
 25178 
       
 25179         {
       
 25180             symbol_c *IN_type_symbol = param_data_type;
       
 25181             last_type_symbol = param_data_type;
       
 25182             
       
 25183             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25184             {
       
 25185         
       
 25186                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 25187                 return return_type_symbol;
       
 25188                 
       
 25189             }
       
 25190             
       
 25191             ERROR;
       
 25192         }
       
 25193         
       
 25194     }/*function_date_to_usint*/
       
 25195     break;
       
 25196 
       
 25197 /****
       
 25198  *DATE_TO_UINT
       
 25199  */
       
 25200     case function_date_to_uint :
       
 25201     {
       
 25202         symbol_c *last_type_symbol = NULL;
       
 25203 
       
 25204         {
       
 25205             symbol_c *IN_type_symbol = param_data_type;
       
 25206             last_type_symbol = param_data_type;
       
 25207             
       
 25208             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25209             {
       
 25210         
       
 25211                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 25212                 return return_type_symbol;
       
 25213                 
       
 25214             }
       
 25215             
       
 25216             ERROR;
       
 25217         }
       
 25218         
       
 25219     }/*function_date_to_uint*/
       
 25220     break;
       
 25221 
       
 25222 /****
       
 25223  *DATE_TO_UDINT
       
 25224  */
       
 25225     case function_date_to_udint :
       
 25226     {
       
 25227         symbol_c *last_type_symbol = NULL;
       
 25228 
       
 25229         {
       
 25230             symbol_c *IN_type_symbol = param_data_type;
       
 25231             last_type_symbol = param_data_type;
       
 25232             
       
 25233             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25234             {
       
 25235         
       
 25236                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 25237                 return return_type_symbol;
       
 25238                 
       
 25239             }
       
 25240             
       
 25241             ERROR;
       
 25242         }
       
 25243         
       
 25244     }/*function_date_to_udint*/
       
 25245     break;
       
 25246 
       
 25247 /****
       
 25248  *DATE_TO_ULINT
       
 25249  */
       
 25250     case function_date_to_ulint :
       
 25251     {
       
 25252         symbol_c *last_type_symbol = NULL;
       
 25253 
       
 25254         {
       
 25255             symbol_c *IN_type_symbol = param_data_type;
       
 25256             last_type_symbol = param_data_type;
       
 25257             
       
 25258             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25259             {
       
 25260         
       
 25261                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 25262                 return return_type_symbol;
       
 25263                 
       
 25264             }
       
 25265             
       
 25266             ERROR;
       
 25267         }
       
 25268         
       
 25269     }/*function_date_to_ulint*/
       
 25270     break;
       
 25271 
       
 25272 /****
       
 25273  *DATE_TO_BOOL
       
 25274  */
       
 25275     case function_date_to_bool :
       
 25276     {
       
 25277         symbol_c *last_type_symbol = NULL;
       
 25278 
       
 25279         {
       
 25280             symbol_c *IN_type_symbol = param_data_type;
       
 25281             last_type_symbol = param_data_type;
       
 25282             
       
 25283             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25284             {
       
 25285         
       
 25286                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25287                 return return_type_symbol;
       
 25288                 
       
 25289             }
       
 25290             
       
 25291             ERROR;
       
 25292         }
       
 25293         
       
 25294     }/*function_date_to_bool*/
       
 25295     break;
       
 25296 
       
 25297 /****
       
 25298  *DATE_TO_BYTE
       
 25299  */
       
 25300     case function_date_to_byte :
       
 25301     {
       
 25302         symbol_c *last_type_symbol = NULL;
       
 25303 
       
 25304         {
       
 25305             symbol_c *IN_type_symbol = param_data_type;
       
 25306             last_type_symbol = param_data_type;
       
 25307             
       
 25308             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25309             {
       
 25310         
       
 25311                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 25312                 return return_type_symbol;
       
 25313                 
       
 25314             }
       
 25315             
       
 25316             ERROR;
       
 25317         }
       
 25318         
       
 25319     }/*function_date_to_byte*/
       
 25320     break;
       
 25321 
       
 25322 /****
       
 25323  *DATE_TO_WORD
       
 25324  */
       
 25325     case function_date_to_word :
       
 25326     {
       
 25327         symbol_c *last_type_symbol = NULL;
       
 25328 
       
 25329         {
       
 25330             symbol_c *IN_type_symbol = param_data_type;
       
 25331             last_type_symbol = param_data_type;
       
 25332             
       
 25333             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25334             {
       
 25335         
       
 25336                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 25337                 return return_type_symbol;
       
 25338                 
       
 25339             }
       
 25340             
       
 25341             ERROR;
       
 25342         }
       
 25343         
       
 25344     }/*function_date_to_word*/
       
 25345     break;
       
 25346 
       
 25347 /****
       
 25348  *DATE_TO_DWORD
       
 25349  */
       
 25350     case function_date_to_dword :
       
 25351     {
       
 25352         symbol_c *last_type_symbol = NULL;
       
 25353 
       
 25354         {
       
 25355             symbol_c *IN_type_symbol = param_data_type;
       
 25356             last_type_symbol = param_data_type;
       
 25357             
       
 25358             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25359             {
       
 25360         
       
 25361                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 25362                 return return_type_symbol;
       
 25363                 
       
 25364             }
       
 25365             
       
 25366             ERROR;
       
 25367         }
       
 25368         
       
 25369     }/*function_date_to_dword*/
       
 25370     break;
       
 25371 
       
 25372 /****
       
 25373  *DATE_TO_LWORD
       
 25374  */
       
 25375     case function_date_to_lword :
       
 25376     {
       
 25377         symbol_c *last_type_symbol = NULL;
       
 25378 
       
 25379         {
       
 25380             symbol_c *IN_type_symbol = param_data_type;
       
 25381             last_type_symbol = param_data_type;
       
 25382             
       
 25383             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25384             {
       
 25385         
       
 25386                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 25387                 return return_type_symbol;
       
 25388                 
       
 25389             }
       
 25390             
       
 25391             ERROR;
       
 25392         }
       
 25393         
       
 25394     }/*function_date_to_lword*/
       
 25395     break;
       
 25396 
       
 25397 /****
       
 25398  *DATE_TO_STRING
       
 25399  */
       
 25400     case function_date_to_string :
       
 25401     {
       
 25402         symbol_c *last_type_symbol = NULL;
       
 25403 
       
 25404         {
       
 25405             symbol_c *IN_type_symbol = param_data_type;
       
 25406             last_type_symbol = param_data_type;
       
 25407             
       
 25408             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25409             {
       
 25410         
       
 25411                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25412                 return return_type_symbol;
       
 25413                 
       
 25414             }
       
 25415             
       
 25416             ERROR;
       
 25417         }
       
 25418         
       
 25419     }/*function_date_to_string*/
       
 25420     break;
       
 25421 
       
 25422 /****
       
 25423  *DATE_TO_WSTRING
       
 25424  */
       
 25425     case function_date_to_wstring :
       
 25426     {
       
 25427         symbol_c *last_type_symbol = NULL;
       
 25428 
       
 25429         {
       
 25430             symbol_c *IN_type_symbol = param_data_type;
       
 25431             last_type_symbol = param_data_type;
       
 25432             
       
 25433             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 25434             {
       
 25435         
       
 25436                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 25437                 return return_type_symbol;
       
 25438                 
       
 25439             }
       
 25440             
       
 25441             ERROR;
       
 25442         }
       
 25443         
       
 25444     }/*function_date_to_wstring*/
       
 25445     break;
       
 25446 
       
 25447 /****
       
 25448  *TOD_TO_REAL
       
 25449  */
       
 25450     case function_tod_to_real :
       
 25451     {
       
 25452         symbol_c *last_type_symbol = NULL;
       
 25453 
       
 25454         {
       
 25455             symbol_c *IN_type_symbol = param_data_type;
       
 25456             last_type_symbol = param_data_type;
       
 25457             
       
 25458             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25459             {
       
 25460         
       
 25461                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 25462                 return return_type_symbol;
       
 25463                 
       
 25464             }
       
 25465             
       
 25466             ERROR;
       
 25467         }
       
 25468         
       
 25469     }/*function_tod_to_real*/
       
 25470     break;
       
 25471 
       
 25472 /****
       
 25473  *TOD_TO_LREAL
       
 25474  */
       
 25475     case function_tod_to_lreal :
       
 25476     {
       
 25477         symbol_c *last_type_symbol = NULL;
       
 25478 
       
 25479         {
       
 25480             symbol_c *IN_type_symbol = param_data_type;
       
 25481             last_type_symbol = param_data_type;
       
 25482             
       
 25483             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25484             {
       
 25485         
       
 25486                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25487                 return return_type_symbol;
       
 25488                 
       
 25489             }
       
 25490             
       
 25491             ERROR;
       
 25492         }
       
 25493         
       
 25494     }/*function_tod_to_lreal*/
       
 25495     break;
       
 25496 
       
 25497 /****
       
 25498  *TOD_TO_SINT
       
 25499  */
       
 25500     case function_tod_to_sint :
       
 25501     {
       
 25502         symbol_c *last_type_symbol = NULL;
       
 25503 
       
 25504         {
       
 25505             symbol_c *IN_type_symbol = param_data_type;
       
 25506             last_type_symbol = param_data_type;
       
 25507             
       
 25508             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25509             {
       
 25510         
       
 25511                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 25512                 return return_type_symbol;
       
 25513                 
       
 25514             }
       
 25515             
       
 25516             ERROR;
       
 25517         }
       
 25518         
       
 25519     }/*function_tod_to_sint*/
       
 25520     break;
       
 25521 
       
 25522 /****
       
 25523  *TOD_TO_INT
       
 25524  */
       
 25525     case function_tod_to_int :
       
 25526     {
       
 25527         symbol_c *last_type_symbol = NULL;
       
 25528 
       
 25529         {
       
 25530             symbol_c *IN_type_symbol = param_data_type;
       
 25531             last_type_symbol = param_data_type;
       
 25532             
       
 25533             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25534             {
       
 25535         
       
 25536                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25537                 return return_type_symbol;
       
 25538                 
       
 25539             }
       
 25540             
       
 25541             ERROR;
       
 25542         }
       
 25543         
       
 25544     }/*function_tod_to_int*/
       
 25545     break;
       
 25546 
       
 25547 /****
       
 25548  *TOD_TO_DINT
       
 25549  */
       
 25550     case function_tod_to_dint :
       
 25551     {
       
 25552         symbol_c *last_type_symbol = NULL;
       
 25553 
       
 25554         {
       
 25555             symbol_c *IN_type_symbol = param_data_type;
       
 25556             last_type_symbol = param_data_type;
       
 25557             
       
 25558             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25559             {
       
 25560         
       
 25561                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25562                 return return_type_symbol;
       
 25563                 
       
 25564             }
       
 25565             
       
 25566             ERROR;
       
 25567         }
       
 25568         
       
 25569     }/*function_tod_to_dint*/
       
 25570     break;
       
 25571 
       
 25572 /****
       
 25573  *TOD_TO_LINT
       
 25574  */
       
 25575     case function_tod_to_lint :
       
 25576     {
       
 25577         symbol_c *last_type_symbol = NULL;
       
 25578 
       
 25579         {
       
 25580             symbol_c *IN_type_symbol = param_data_type;
       
 25581             last_type_symbol = param_data_type;
       
 25582             
       
 25583             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25584             {
       
 25585         
       
 25586                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 25587                 return return_type_symbol;
       
 25588                 
       
 25589             }
       
 25590             
       
 25591             ERROR;
       
 25592         }
       
 25593         
       
 25594     }/*function_tod_to_lint*/
       
 25595     break;
       
 25596 
       
 25597 /****
       
 25598  *TOD_TO_USINT
       
 25599  */
       
 25600     case function_tod_to_usint :
       
 25601     {
       
 25602         symbol_c *last_type_symbol = NULL;
       
 25603 
       
 25604         {
       
 25605             symbol_c *IN_type_symbol = param_data_type;
       
 25606             last_type_symbol = param_data_type;
       
 25607             
       
 25608             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25609             {
       
 25610         
       
 25611                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 25612                 return return_type_symbol;
       
 25613                 
       
 25614             }
       
 25615             
       
 25616             ERROR;
       
 25617         }
       
 25618         
       
 25619     }/*function_tod_to_usint*/
       
 25620     break;
       
 25621 
       
 25622 /****
       
 25623  *TOD_TO_UINT
       
 25624  */
       
 25625     case function_tod_to_uint :
       
 25626     {
       
 25627         symbol_c *last_type_symbol = NULL;
       
 25628 
       
 25629         {
       
 25630             symbol_c *IN_type_symbol = param_data_type;
       
 25631             last_type_symbol = param_data_type;
       
 25632             
       
 25633             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25634             {
       
 25635         
       
 25636                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 25637                 return return_type_symbol;
       
 25638                 
       
 25639             }
       
 25640             
       
 25641             ERROR;
       
 25642         }
       
 25643         
       
 25644     }/*function_tod_to_uint*/
       
 25645     break;
       
 25646 
       
 25647 /****
       
 25648  *TOD_TO_UDINT
       
 25649  */
       
 25650     case function_tod_to_udint :
       
 25651     {
       
 25652         symbol_c *last_type_symbol = NULL;
       
 25653 
       
 25654         {
       
 25655             symbol_c *IN_type_symbol = param_data_type;
       
 25656             last_type_symbol = param_data_type;
       
 25657             
       
 25658             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25659             {
       
 25660         
       
 25661                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 25662                 return return_type_symbol;
       
 25663                 
       
 25664             }
       
 25665             
       
 25666             ERROR;
       
 25667         }
       
 25668         
       
 25669     }/*function_tod_to_udint*/
       
 25670     break;
       
 25671 
       
 25672 /****
       
 25673  *TOD_TO_ULINT
       
 25674  */
       
 25675     case function_tod_to_ulint :
       
 25676     {
       
 25677         symbol_c *last_type_symbol = NULL;
       
 25678 
       
 25679         {
       
 25680             symbol_c *IN_type_symbol = param_data_type;
       
 25681             last_type_symbol = param_data_type;
       
 25682             
       
 25683             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25684             {
       
 25685         
       
 25686                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 25687                 return return_type_symbol;
       
 25688                 
       
 25689             }
       
 25690             
       
 25691             ERROR;
       
 25692         }
       
 25693         
       
 25694     }/*function_tod_to_ulint*/
       
 25695     break;
       
 25696 
       
 25697 /****
       
 25698  *TOD_TO_BOOL
       
 25699  */
       
 25700     case function_tod_to_bool :
       
 25701     {
       
 25702         symbol_c *last_type_symbol = NULL;
       
 25703 
       
 25704         {
       
 25705             symbol_c *IN_type_symbol = param_data_type;
       
 25706             last_type_symbol = param_data_type;
       
 25707             
       
 25708             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25709             {
       
 25710         
       
 25711                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25712                 return return_type_symbol;
       
 25713                 
       
 25714             }
       
 25715             
       
 25716             ERROR;
       
 25717         }
       
 25718         
       
 25719     }/*function_tod_to_bool*/
       
 25720     break;
       
 25721 
       
 25722 /****
       
 25723  *TOD_TO_BYTE
       
 25724  */
       
 25725     case function_tod_to_byte :
       
 25726     {
       
 25727         symbol_c *last_type_symbol = NULL;
       
 25728 
       
 25729         {
       
 25730             symbol_c *IN_type_symbol = param_data_type;
       
 25731             last_type_symbol = param_data_type;
       
 25732             
       
 25733             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25734             {
       
 25735         
       
 25736                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 25737                 return return_type_symbol;
       
 25738                 
       
 25739             }
       
 25740             
       
 25741             ERROR;
       
 25742         }
       
 25743         
       
 25744     }/*function_tod_to_byte*/
       
 25745     break;
       
 25746 
       
 25747 /****
       
 25748  *TOD_TO_WORD
       
 25749  */
       
 25750     case function_tod_to_word :
       
 25751     {
       
 25752         symbol_c *last_type_symbol = NULL;
       
 25753 
       
 25754         {
       
 25755             symbol_c *IN_type_symbol = param_data_type;
       
 25756             last_type_symbol = param_data_type;
       
 25757             
       
 25758             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25759             {
       
 25760         
       
 25761                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 25762                 return return_type_symbol;
       
 25763                 
       
 25764             }
       
 25765             
       
 25766             ERROR;
       
 25767         }
       
 25768         
       
 25769     }/*function_tod_to_word*/
       
 25770     break;
       
 25771 
       
 25772 /****
       
 25773  *TOD_TO_DWORD
       
 25774  */
       
 25775     case function_tod_to_dword :
       
 25776     {
       
 25777         symbol_c *last_type_symbol = NULL;
       
 25778 
       
 25779         {
       
 25780             symbol_c *IN_type_symbol = param_data_type;
       
 25781             last_type_symbol = param_data_type;
       
 25782             
       
 25783             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25784             {
       
 25785         
       
 25786                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 25787                 return return_type_symbol;
       
 25788                 
       
 25789             }
       
 25790             
       
 25791             ERROR;
       
 25792         }
       
 25793         
       
 25794     }/*function_tod_to_dword*/
       
 25795     break;
       
 25796 
       
 25797 /****
       
 25798  *TOD_TO_LWORD
       
 25799  */
       
 25800     case function_tod_to_lword :
       
 25801     {
       
 25802         symbol_c *last_type_symbol = NULL;
       
 25803 
       
 25804         {
       
 25805             symbol_c *IN_type_symbol = param_data_type;
       
 25806             last_type_symbol = param_data_type;
       
 25807             
       
 25808             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25809             {
       
 25810         
       
 25811                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 25812                 return return_type_symbol;
       
 25813                 
       
 25814             }
       
 25815             
       
 25816             ERROR;
       
 25817         }
       
 25818         
       
 25819     }/*function_tod_to_lword*/
       
 25820     break;
       
 25821 
       
 25822 /****
       
 25823  *TOD_TO_STRING
       
 25824  */
       
 25825     case function_tod_to_string :
       
 25826     {
       
 25827         symbol_c *last_type_symbol = NULL;
       
 25828 
       
 25829         {
       
 25830             symbol_c *IN_type_symbol = param_data_type;
       
 25831             last_type_symbol = param_data_type;
       
 25832             
       
 25833             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25834             {
       
 25835         
       
 25836                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25837                 return return_type_symbol;
       
 25838                 
       
 25839             }
       
 25840             
       
 25841             ERROR;
       
 25842         }
       
 25843         
       
 25844     }/*function_tod_to_string*/
       
 25845     break;
       
 25846 
       
 25847 /****
       
 25848  *TOD_TO_WSTRING
       
 25849  */
       
 25850     case function_tod_to_wstring :
       
 25851     {
       
 25852         symbol_c *last_type_symbol = NULL;
       
 25853 
       
 25854         {
       
 25855             symbol_c *IN_type_symbol = param_data_type;
       
 25856             last_type_symbol = param_data_type;
       
 25857             
       
 25858             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 25859             {
       
 25860         
       
 25861                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 25862                 return return_type_symbol;
       
 25863                 
       
 25864             }
       
 25865             
       
 25866             ERROR;
       
 25867         }
       
 25868         
       
 25869     }/*function_tod_to_wstring*/
       
 25870     break;
       
 25871 
       
 25872 /****
       
 25873  *DT_TO_REAL
       
 25874  */
       
 25875     case function_dt_to_real :
       
 25876     {
       
 25877         symbol_c *last_type_symbol = NULL;
       
 25878 
       
 25879         {
       
 25880             symbol_c *IN_type_symbol = param_data_type;
       
 25881             last_type_symbol = param_data_type;
       
 25882             
       
 25883             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25884             {
       
 25885         
       
 25886                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 25887                 return return_type_symbol;
       
 25888                 
       
 25889             }
       
 25890             
       
 25891             ERROR;
       
 25892         }
       
 25893         
       
 25894     }/*function_dt_to_real*/
       
 25895     break;
       
 25896 
       
 25897 /****
       
 25898  *DT_TO_LREAL
       
 25899  */
       
 25900     case function_dt_to_lreal :
       
 25901     {
       
 25902         symbol_c *last_type_symbol = NULL;
       
 25903 
       
 25904         {
       
 25905             symbol_c *IN_type_symbol = param_data_type;
       
 25906             last_type_symbol = param_data_type;
       
 25907             
       
 25908             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25909             {
       
 25910         
       
 25911                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25912                 return return_type_symbol;
       
 25913                 
       
 25914             }
       
 25915             
       
 25916             ERROR;
       
 25917         }
       
 25918         
       
 25919     }/*function_dt_to_lreal*/
       
 25920     break;
       
 25921 
       
 25922 /****
       
 25923  *DT_TO_SINT
       
 25924  */
       
 25925     case function_dt_to_sint :
       
 25926     {
       
 25927         symbol_c *last_type_symbol = NULL;
       
 25928 
       
 25929         {
       
 25930             symbol_c *IN_type_symbol = param_data_type;
       
 25931             last_type_symbol = param_data_type;
       
 25932             
       
 25933             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25934             {
       
 25935         
       
 25936                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 25937                 return return_type_symbol;
       
 25938                 
       
 25939             }
       
 25940             
       
 25941             ERROR;
       
 25942         }
       
 25943         
       
 25944     }/*function_dt_to_sint*/
       
 25945     break;
       
 25946 
       
 25947 /****
       
 25948  *DT_TO_INT
       
 25949  */
       
 25950     case function_dt_to_int :
       
 25951     {
       
 25952         symbol_c *last_type_symbol = NULL;
       
 25953 
       
 25954         {
       
 25955             symbol_c *IN_type_symbol = param_data_type;
       
 25956             last_type_symbol = param_data_type;
       
 25957             
       
 25958             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25959             {
       
 25960         
       
 25961                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25962                 return return_type_symbol;
       
 25963                 
       
 25964             }
       
 25965             
       
 25966             ERROR;
       
 25967         }
       
 25968         
       
 25969     }/*function_dt_to_int*/
       
 25970     break;
       
 25971 
       
 25972 /****
       
 25973  *DT_TO_DINT
       
 25974  */
       
 25975     case function_dt_to_dint :
       
 25976     {
       
 25977         symbol_c *last_type_symbol = NULL;
       
 25978 
       
 25979         {
       
 25980             symbol_c *IN_type_symbol = param_data_type;
       
 25981             last_type_symbol = param_data_type;
       
 25982             
       
 25983             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 25984             {
       
 25985         
       
 25986                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25987                 return return_type_symbol;
       
 25988                 
       
 25989             }
       
 25990             
       
 25991             ERROR;
       
 25992         }
       
 25993         
       
 25994     }/*function_dt_to_dint*/
       
 25995     break;
       
 25996 
       
 25997 /****
       
 25998  *DT_TO_LINT
       
 25999  */
       
 26000     case function_dt_to_lint :
       
 26001     {
       
 26002         symbol_c *last_type_symbol = NULL;
       
 26003 
       
 26004         {
       
 26005             symbol_c *IN_type_symbol = param_data_type;
       
 26006             last_type_symbol = param_data_type;
       
 26007             
       
 26008             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26009             {
       
 26010         
       
 26011                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 26012                 return return_type_symbol;
       
 26013                 
       
 26014             }
       
 26015             
       
 26016             ERROR;
       
 26017         }
       
 26018         
       
 26019     }/*function_dt_to_lint*/
       
 26020     break;
       
 26021 
       
 26022 /****
       
 26023  *DT_TO_USINT
       
 26024  */
       
 26025     case function_dt_to_usint :
       
 26026     {
       
 26027         symbol_c *last_type_symbol = NULL;
       
 26028 
       
 26029         {
       
 26030             symbol_c *IN_type_symbol = param_data_type;
       
 26031             last_type_symbol = param_data_type;
       
 26032             
       
 26033             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26034             {
       
 26035         
       
 26036                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 26037                 return return_type_symbol;
       
 26038                 
       
 26039             }
       
 26040             
       
 26041             ERROR;
       
 26042         }
       
 26043         
       
 26044     }/*function_dt_to_usint*/
       
 26045     break;
       
 26046 
       
 26047 /****
       
 26048  *DT_TO_UINT
       
 26049  */
       
 26050     case function_dt_to_uint :
       
 26051     {
       
 26052         symbol_c *last_type_symbol = NULL;
       
 26053 
       
 26054         {
       
 26055             symbol_c *IN_type_symbol = param_data_type;
       
 26056             last_type_symbol = param_data_type;
       
 26057             
       
 26058             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26059             {
       
 26060         
       
 26061                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 26062                 return return_type_symbol;
       
 26063                 
       
 26064             }
       
 26065             
       
 26066             ERROR;
       
 26067         }
       
 26068         
       
 26069     }/*function_dt_to_uint*/
       
 26070     break;
       
 26071 
       
 26072 /****
       
 26073  *DT_TO_UDINT
       
 26074  */
       
 26075     case function_dt_to_udint :
       
 26076     {
       
 26077         symbol_c *last_type_symbol = NULL;
       
 26078 
       
 26079         {
       
 26080             symbol_c *IN_type_symbol = param_data_type;
       
 26081             last_type_symbol = param_data_type;
       
 26082             
       
 26083             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26084             {
       
 26085         
       
 26086                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 26087                 return return_type_symbol;
       
 26088                 
       
 26089             }
       
 26090             
       
 26091             ERROR;
       
 26092         }
       
 26093         
       
 26094     }/*function_dt_to_udint*/
       
 26095     break;
       
 26096 
       
 26097 /****
       
 26098  *DT_TO_ULINT
       
 26099  */
       
 26100     case function_dt_to_ulint :
       
 26101     {
       
 26102         symbol_c *last_type_symbol = NULL;
       
 26103 
       
 26104         {
       
 26105             symbol_c *IN_type_symbol = param_data_type;
       
 26106             last_type_symbol = param_data_type;
       
 26107             
       
 26108             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26109             {
       
 26110         
       
 26111                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 26112                 return return_type_symbol;
       
 26113                 
       
 26114             }
       
 26115             
       
 26116             ERROR;
       
 26117         }
       
 26118         
       
 26119     }/*function_dt_to_ulint*/
       
 26120     break;
       
 26121 
       
 26122 /****
       
 26123  *DT_TO_BOOL
       
 26124  */
       
 26125     case function_dt_to_bool :
       
 26126     {
       
 26127         symbol_c *last_type_symbol = NULL;
       
 26128 
       
 26129         {
       
 26130             symbol_c *IN_type_symbol = param_data_type;
       
 26131             last_type_symbol = param_data_type;
       
 26132             
       
 26133             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26134             {
       
 26135         
       
 26136                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 26137                 return return_type_symbol;
       
 26138                 
       
 26139             }
       
 26140             
       
 26141             ERROR;
       
 26142         }
       
 26143         
       
 26144     }/*function_dt_to_bool*/
       
 26145     break;
       
 26146 
       
 26147 /****
       
 26148  *DT_TO_BYTE
       
 26149  */
       
 26150     case function_dt_to_byte :
       
 26151     {
       
 26152         symbol_c *last_type_symbol = NULL;
       
 26153 
       
 26154         {
       
 26155             symbol_c *IN_type_symbol = param_data_type;
       
 26156             last_type_symbol = param_data_type;
       
 26157             
       
 26158             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26159             {
       
 26160         
       
 26161                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 26162                 return return_type_symbol;
       
 26163                 
       
 26164             }
       
 26165             
       
 26166             ERROR;
       
 26167         }
       
 26168         
       
 26169     }/*function_dt_to_byte*/
       
 26170     break;
       
 26171 
       
 26172 /****
       
 26173  *DT_TO_WORD
       
 26174  */
       
 26175     case function_dt_to_word :
       
 26176     {
       
 26177         symbol_c *last_type_symbol = NULL;
       
 26178 
       
 26179         {
       
 26180             symbol_c *IN_type_symbol = param_data_type;
       
 26181             last_type_symbol = param_data_type;
       
 26182             
       
 26183             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26184             {
       
 26185         
       
 26186                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 26187                 return return_type_symbol;
       
 26188                 
       
 26189             }
       
 26190             
       
 26191             ERROR;
       
 26192         }
       
 26193         
       
 26194     }/*function_dt_to_word*/
       
 26195     break;
       
 26196 
       
 26197 /****
       
 26198  *DT_TO_DWORD
       
 26199  */
       
 26200     case function_dt_to_dword :
       
 26201     {
       
 26202         symbol_c *last_type_symbol = NULL;
       
 26203 
       
 26204         {
       
 26205             symbol_c *IN_type_symbol = param_data_type;
       
 26206             last_type_symbol = param_data_type;
       
 26207             
       
 26208             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26209             {
       
 26210         
       
 26211                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 26212                 return return_type_symbol;
       
 26213                 
       
 26214             }
       
 26215             
       
 26216             ERROR;
       
 26217         }
       
 26218         
       
 26219     }/*function_dt_to_dword*/
       
 26220     break;
       
 26221 
       
 26222 /****
       
 26223  *DT_TO_LWORD
       
 26224  */
       
 26225     case function_dt_to_lword :
       
 26226     {
       
 26227         symbol_c *last_type_symbol = NULL;
       
 26228 
       
 26229         {
       
 26230             symbol_c *IN_type_symbol = param_data_type;
       
 26231             last_type_symbol = param_data_type;
       
 26232             
       
 26233             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26234             {
       
 26235         
       
 26236                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 26237                 return return_type_symbol;
       
 26238                 
       
 26239             }
       
 26240             
       
 26241             ERROR;
       
 26242         }
       
 26243         
       
 26244     }/*function_dt_to_lword*/
       
 26245     break;
       
 26246 
       
 26247 /****
       
 26248  *DT_TO_STRING
       
 26249  */
       
 26250     case function_dt_to_string :
       
 26251     {
       
 26252         symbol_c *last_type_symbol = NULL;
       
 26253 
       
 26254         {
       
 26255             symbol_c *IN_type_symbol = param_data_type;
       
 26256             last_type_symbol = param_data_type;
       
 26257             
       
 26258             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26259             {
       
 26260         
       
 26261                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 26262                 return return_type_symbol;
       
 26263                 
       
 26264             }
       
 26265             
       
 26266             ERROR;
       
 26267         }
       
 26268         
       
 26269     }/*function_dt_to_string*/
       
 26270     break;
       
 26271 
       
 26272 /****
       
 26273  *DT_TO_WSTRING
       
 26274  */
       
 26275     case function_dt_to_wstring :
       
 26276     {
       
 26277         symbol_c *last_type_symbol = NULL;
       
 26278 
       
 26279         {
       
 26280             symbol_c *IN_type_symbol = param_data_type;
       
 26281             last_type_symbol = param_data_type;
       
 26282             
       
 26283             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 26284             {
       
 26285         
       
 26286                 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name;
       
 26287                 return return_type_symbol;
       
 26288                 
       
 26289             }
       
 26290             
       
 26291             ERROR;
       
 26292         }
       
 26293         
       
 26294     }/*function_dt_to_wstring*/
       
 26295     break;
       
 26296 
       
 26297 /****
       
 26298  *TRUNC
       
 26299  */
       
 26300     case function_trunc :
       
 26301     {
       
 26302         symbol_c *last_type_symbol = NULL;
       
 26303 
       
 26304         {
       
 26305             symbol_c *IN_type_symbol = param_data_type;
       
 26306             last_type_symbol = param_data_type;
       
 26307             
       
 26308             if(search_expression_type->is_real_type(IN_type_symbol))
       
 26309             {
       
 26310         
       
 26311                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26312                 return return_type_symbol;
       
 26313                 
       
 26314             }
       
 26315             
       
 26316             ERROR;
       
 26317         }
       
 26318         
       
 26319     }/*function_trunc*/
       
 26320     break;
       
 26321 
       
 26322 /****
       
 26323  *BCD_TO_SINT
       
 26324  */
       
 26325     case function_bcd_to_sint :
       
 26326     {
       
 26327         symbol_c *last_type_symbol = NULL;
       
 26328 
       
 26329         {
       
 26330             symbol_c *IN_type_symbol = param_data_type;
       
 26331             last_type_symbol = param_data_type;
       
 26332             
       
 26333             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26334             {
       
 26335         
       
 26336                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 26337                 return return_type_symbol;
       
 26338                 
       
 26339             }
       
 26340             
       
 26341             ERROR;
       
 26342         }
       
 26343         
       
 26344     }/*function_bcd_to_sint*/
       
 26345     break;
       
 26346 
       
 26347 /****
       
 26348  *BCD_TO_INT
       
 26349  */
       
 26350     case function_bcd_to_int :
       
 26351     {
       
 26352         symbol_c *last_type_symbol = NULL;
       
 26353 
       
 26354         {
       
 26355             symbol_c *IN_type_symbol = param_data_type;
       
 26356             last_type_symbol = param_data_type;
       
 26357             
       
 26358             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26359             {
       
 26360         
       
 26361                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 26362                 return return_type_symbol;
       
 26363                 
       
 26364             }
       
 26365             
       
 26366             ERROR;
       
 26367         }
       
 26368         
       
 26369     }/*function_bcd_to_int*/
       
 26370     break;
       
 26371 
       
 26372 /****
       
 26373  *BCD_TO_DINT
       
 26374  */
       
 26375     case function_bcd_to_dint :
       
 26376     {
       
 26377         symbol_c *last_type_symbol = NULL;
       
 26378 
       
 26379         {
       
 26380             symbol_c *IN_type_symbol = param_data_type;
       
 26381             last_type_symbol = param_data_type;
       
 26382             
       
 26383             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26384             {
       
 26385         
       
 26386                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 26387                 return return_type_symbol;
       
 26388                 
       
 26389             }
       
 26390             
       
 26391             ERROR;
       
 26392         }
       
 26393         
       
 26394     }/*function_bcd_to_dint*/
       
 26395     break;
       
 26396 
       
 26397 /****
       
 26398  *BCD_TO_LINT
       
 26399  */
       
 26400     case function_bcd_to_lint :
       
 26401     {
       
 26402         symbol_c *last_type_symbol = NULL;
       
 26403 
       
 26404         {
       
 26405             symbol_c *IN_type_symbol = param_data_type;
       
 26406             last_type_symbol = param_data_type;
       
 26407             
       
 26408             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26409             {
       
 26410         
       
 26411                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 26412                 return return_type_symbol;
       
 26413                 
       
 26414             }
       
 26415             
       
 26416             ERROR;
       
 26417         }
       
 26418         
       
 26419     }/*function_bcd_to_lint*/
       
 26420     break;
       
 26421 
       
 26422 /****
       
 26423  *BCD_TO_USINT
       
 26424  */
       
 26425     case function_bcd_to_usint :
       
 26426     {
       
 26427         symbol_c *last_type_symbol = NULL;
       
 26428 
       
 26429         {
       
 26430             symbol_c *IN_type_symbol = param_data_type;
       
 26431             last_type_symbol = param_data_type;
       
 26432             
       
 26433             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26434             {
       
 26435         
       
 26436                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 26437                 return return_type_symbol;
       
 26438                 
       
 26439             }
       
 26440             
       
 26441             ERROR;
       
 26442         }
       
 26443         
       
 26444     }/*function_bcd_to_usint*/
       
 26445     break;
       
 26446 
       
 26447 /****
       
 26448  *BCD_TO_UINT
       
 26449  */
       
 26450     case function_bcd_to_uint :
       
 26451     {
       
 26452         symbol_c *last_type_symbol = NULL;
       
 26453 
       
 26454         {
       
 26455             symbol_c *IN_type_symbol = param_data_type;
       
 26456             last_type_symbol = param_data_type;
       
 26457             
       
 26458             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26459             {
       
 26460         
       
 26461                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 26462                 return return_type_symbol;
       
 26463                 
       
 26464             }
       
 26465             
       
 26466             ERROR;
       
 26467         }
       
 26468         
       
 26469     }/*function_bcd_to_uint*/
       
 26470     break;
       
 26471 
       
 26472 /****
       
 26473  *BCD_TO_UDINT
       
 26474  */
       
 26475     case function_bcd_to_udint :
       
 26476     {
       
 26477         symbol_c *last_type_symbol = NULL;
       
 26478 
       
 26479         {
       
 26480             symbol_c *IN_type_symbol = param_data_type;
       
 26481             last_type_symbol = param_data_type;
       
 26482             
       
 26483             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26484             {
       
 26485         
       
 26486                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 26487                 return return_type_symbol;
       
 26488                 
       
 26489             }
       
 26490             
       
 26491             ERROR;
       
 26492         }
       
 26493         
       
 26494     }/*function_bcd_to_udint*/
       
 26495     break;
       
 26496 
       
 26497 /****
       
 26498  *BCD_TO_ULINT
       
 26499  */
       
 26500     case function_bcd_to_ulint :
       
 26501     {
       
 26502         symbol_c *last_type_symbol = NULL;
       
 26503 
       
 26504         {
       
 26505             symbol_c *IN_type_symbol = param_data_type;
       
 26506             last_type_symbol = param_data_type;
       
 26507             
       
 26508             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 26509             {
       
 26510         
       
 26511                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 26512                 return return_type_symbol;
       
 26513                 
       
 26514             }
       
 26515             
       
 26516             ERROR;
       
 26517         }
       
 26518         
       
 26519     }/*function_bcd_to_ulint*/
 23997     }/*function_bcd_to_ulint*/
 26520     break;
       
 26521 
       
 26522 /****
       
 26523  *SINT_TO_BCD
       
 26524  */
       
 26525     case function_sint_to_bcd :
       
 26526     {
       
 26527         symbol_c *last_type_symbol = NULL;
       
 26528 
       
 26529         {
       
 26530             symbol_c *IN_type_symbol = param_data_type;
       
 26531             last_type_symbol = param_data_type;
       
 26532             
       
 26533             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
       
 26534             {
       
 26535         
       
 26536                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26537                 return return_type_symbol;
       
 26538                 
       
 26539             }
       
 26540             
       
 26541             ERROR;
       
 26542         }
       
 26543         
       
 26544     }/*function_sint_to_bcd*/
       
 26545     break;
       
 26546 
       
 26547 /****
       
 26548  *INT_TO_BCD
       
 26549  */
       
 26550     case function_int_to_bcd :
       
 26551     {
       
 26552         symbol_c *last_type_symbol = NULL;
       
 26553 
       
 26554         {
       
 26555             symbol_c *IN_type_symbol = param_data_type;
       
 26556             last_type_symbol = param_data_type;
       
 26557             
       
 26558             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
       
 26559             {
       
 26560         
       
 26561                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26562                 return return_type_symbol;
       
 26563                 
       
 26564             }
       
 26565             
       
 26566             ERROR;
       
 26567         }
       
 26568         
       
 26569     }/*function_int_to_bcd*/
       
 26570     break;
       
 26571 
       
 26572 /****
       
 26573  *DINT_TO_BCD
       
 26574  */
       
 26575     case function_dint_to_bcd :
       
 26576     {
       
 26577         symbol_c *last_type_symbol = NULL;
       
 26578 
       
 26579         {
       
 26580             symbol_c *IN_type_symbol = param_data_type;
       
 26581             last_type_symbol = param_data_type;
       
 26582             
       
 26583             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
       
 26584             {
       
 26585         
       
 26586                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26587                 return return_type_symbol;
       
 26588                 
       
 26589             }
       
 26590             
       
 26591             ERROR;
       
 26592         }
       
 26593         
       
 26594     }/*function_dint_to_bcd*/
       
 26595     break;
       
 26596 
       
 26597 /****
       
 26598  *LINT_TO_BCD
       
 26599  */
       
 26600     case function_lint_to_bcd :
       
 26601     {
       
 26602         symbol_c *last_type_symbol = NULL;
       
 26603 
       
 26604         {
       
 26605             symbol_c *IN_type_symbol = param_data_type;
       
 26606             last_type_symbol = param_data_type;
       
 26607             
       
 26608             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
       
 26609             {
       
 26610         
       
 26611                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26612                 return return_type_symbol;
       
 26613                 
       
 26614             }
       
 26615             
       
 26616             ERROR;
       
 26617         }
       
 26618         
       
 26619     }/*function_lint_to_bcd*/
       
 26620     break;
 23998     break;
 26621 
 23999 
 26622 /****
 24000 /****
 26623  *USINT_TO_BCD
 24001  *USINT_TO_BCD
 26624  */
 24002  */
 27689 
 25067 
 27690         {
 25068         {
 27691             symbol_c *IN_type_symbol = param_data_type;
 25069             symbol_c *IN_type_symbol = param_data_type;
 27692             last_type_symbol = param_data_type;
 25070             last_type_symbol = param_data_type;
 27693             
 25071             
 27694             if(search_expression_type->is_binary_type(IN_type_symbol))
 25072             if(search_expression_type->is_nbinary_type(IN_type_symbol))
 27695             {
 25073             {
 27696         
 25074         
 27697                 {
 25075                 {
 27698                     identifier_c param_name("N");
 25076                     identifier_c param_name("N");
 27699                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25077                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27733 
 25111 
 27734         {
 25112         {
 27735             symbol_c *IN_type_symbol = param_data_type;
 25113             symbol_c *IN_type_symbol = param_data_type;
 27736             last_type_symbol = param_data_type;
 25114             last_type_symbol = param_data_type;
 27737             
 25115             
 27738             if(search_expression_type->is_binary_type(IN_type_symbol))
 25116             if(search_expression_type->is_nbinary_type(IN_type_symbol))
 27739             {
 25117             {
 27740         
 25118         
 27741                 {
 25119                 {
 27742                     identifier_c param_name("N");
 25120                     identifier_c param_name("N");
 27743                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25121                     /* Get the value from a foo(<param_name> = <param_value>) style call */