lbessard@49: /* lbessard@49: * (c) 2003 Mario de Sousa lbessard@49: * lbessard@49: * Offered to the public under the terms of the GNU General Public License lbessard@49: * as published by the Free Software Foundation; either version 2 of the lbessard@49: * License, or (at your option) any later version. lbessard@49: * lbessard@49: * This program is distributed in the hope that it will be useful, but lbessard@49: * WITHOUT ANY WARRANTY; without even the implied warranty of lbessard@49: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General lbessard@49: * Public License for more details. lbessard@49: * lbessard@49: * This code is made available on the understanding that it will not be lbessard@49: * used in safety-critical situations without a full and competent review. lbessard@49: */ lbessard@49: lbessard@49: /* lbessard@49: * An IEC 61131-3 IL and ST compiler. lbessard@49: * lbessard@49: * Based on the lbessard@49: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) lbessard@49: * lbessard@49: */ lbessard@49: lbessard@49: etisserant@33: /**** etisserant@33: * IEC 61131-3 standard function lib etisserant@33: * generated code, do not edit by hand etisserant@33: */ lbessard@35: lbessard@35: void *compute_standard_function_st(function_invocation_c *symbol) { lbessard@35: lbessard@35: function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); lbessard@35: function_call_param_iterator_c function_call_param_iterator(symbol); lbessard@35: search_expression_type_c* search_expression_type = this; lbessard@35: lbessard@35: switch(current_function_type){ lbessard@35: lbessard@35: /**** etisserant@40: *BOOL_TO_SINT etisserant@40: */ etisserant@40: case function_bool_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_INT etisserant@40: */ etisserant@40: case function_bool_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DINT etisserant@40: */ etisserant@40: case function_bool_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LINT etisserant@40: */ etisserant@40: case function_bool_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_USINT etisserant@40: */ etisserant@40: case function_bool_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_UINT etisserant@40: */ etisserant@40: case function_bool_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_UDINT etisserant@40: */ etisserant@40: case function_bool_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_ULINT etisserant@40: */ etisserant@40: case function_bool_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_REAL etisserant@40: */ etisserant@40: case function_bool_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LREAL etisserant@40: */ etisserant@40: case function_bool_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_TIME etisserant@40: */ etisserant@40: case function_bool_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DATE etisserant@40: */ etisserant@40: case function_bool_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_TOD etisserant@40: */ etisserant@40: case function_bool_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DT etisserant@40: */ etisserant@40: case function_bool_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_STRING etisserant@40: */ etisserant@40: case function_bool_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_BYTE etisserant@40: */ etisserant@40: case function_bool_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_WORD etisserant@40: */ etisserant@40: case function_bool_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DWORD etisserant@40: */ etisserant@40: case function_bool_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LWORD etisserant@40: */ etisserant@40: case function_bool_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_BOOL etisserant@40: */ etisserant@40: case function_sint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_INT etisserant@40: */ etisserant@40: case function_sint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DINT etisserant@40: */ etisserant@40: case function_sint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LINT etisserant@40: */ etisserant@40: case function_sint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_USINT etisserant@40: */ etisserant@40: case function_sint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_UINT etisserant@40: */ etisserant@40: case function_sint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_UDINT etisserant@40: */ etisserant@40: case function_sint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_ULINT etisserant@40: */ etisserant@40: case function_sint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_REAL etisserant@40: */ etisserant@40: case function_sint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LREAL etisserant@40: */ etisserant@40: case function_sint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_TIME etisserant@40: */ etisserant@40: case function_sint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DATE etisserant@40: */ etisserant@40: case function_sint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_TOD etisserant@40: */ etisserant@40: case function_sint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DT etisserant@40: */ etisserant@40: case function_sint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_STRING etisserant@40: */ etisserant@40: case function_sint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_BYTE etisserant@40: */ etisserant@40: case function_sint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_WORD etisserant@40: */ etisserant@40: case function_sint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DWORD etisserant@40: */ etisserant@40: case function_sint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LWORD etisserant@40: */ etisserant@40: case function_sint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_BOOL etisserant@40: */ etisserant@40: case function_int_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_SINT etisserant@40: */ etisserant@40: case function_int_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DINT etisserant@40: */ etisserant@40: case function_int_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LINT etisserant@40: */ etisserant@40: case function_int_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_USINT etisserant@40: */ etisserant@40: case function_int_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_UINT etisserant@40: */ etisserant@40: case function_int_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_UDINT etisserant@40: */ etisserant@40: case function_int_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_ULINT etisserant@40: */ etisserant@40: case function_int_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_REAL etisserant@40: */ etisserant@40: case function_int_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LREAL etisserant@40: */ etisserant@40: case function_int_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_TIME etisserant@40: */ etisserant@40: case function_int_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DATE etisserant@40: */ etisserant@40: case function_int_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_TOD etisserant@40: */ etisserant@40: case function_int_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DT etisserant@40: */ etisserant@40: case function_int_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_STRING etisserant@40: */ etisserant@40: case function_int_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_BYTE etisserant@40: */ etisserant@40: case function_int_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_WORD etisserant@40: */ etisserant@40: case function_int_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DWORD etisserant@40: */ etisserant@40: case function_int_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LWORD etisserant@40: */ etisserant@40: case function_int_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_BOOL etisserant@40: */ etisserant@40: case function_dint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_SINT etisserant@40: */ etisserant@40: case function_dint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_INT etisserant@40: */ etisserant@40: case function_dint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LINT etisserant@40: */ etisserant@40: case function_dint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_USINT etisserant@40: */ etisserant@40: case function_dint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_UINT etisserant@40: */ etisserant@40: case function_dint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_UDINT etisserant@40: */ etisserant@40: case function_dint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_ULINT etisserant@40: */ etisserant@40: case function_dint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_REAL etisserant@40: */ etisserant@40: case function_dint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LREAL etisserant@40: */ etisserant@40: case function_dint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_TIME etisserant@40: */ etisserant@40: case function_dint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DATE etisserant@40: */ etisserant@40: case function_dint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_TOD etisserant@40: */ etisserant@40: case function_dint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DT etisserant@40: */ etisserant@40: case function_dint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_STRING etisserant@40: */ etisserant@40: case function_dint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_BYTE etisserant@40: */ etisserant@40: case function_dint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_WORD etisserant@40: */ etisserant@40: case function_dint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DWORD etisserant@40: */ etisserant@40: case function_dint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LWORD etisserant@40: */ etisserant@40: case function_dint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_BOOL etisserant@40: */ etisserant@40: case function_lint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_SINT etisserant@40: */ etisserant@40: case function_lint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_INT etisserant@40: */ etisserant@40: case function_lint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DINT etisserant@40: */ etisserant@40: case function_lint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_USINT etisserant@40: */ etisserant@40: case function_lint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_UINT etisserant@40: */ etisserant@40: case function_lint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_UDINT etisserant@40: */ etisserant@40: case function_lint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_ULINT etisserant@40: */ etisserant@40: case function_lint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_REAL etisserant@40: */ etisserant@40: case function_lint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_LREAL etisserant@40: */ etisserant@40: case function_lint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_TIME etisserant@40: */ etisserant@40: case function_lint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DATE etisserant@40: */ etisserant@40: case function_lint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_TOD etisserant@40: */ etisserant@40: case function_lint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DT etisserant@40: */ etisserant@40: case function_lint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_STRING etisserant@40: */ etisserant@40: case function_lint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_BYTE etisserant@40: */ etisserant@40: case function_lint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_WORD etisserant@40: */ etisserant@40: case function_lint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DWORD etisserant@40: */ etisserant@40: case function_lint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_LWORD etisserant@40: */ etisserant@40: case function_lint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_BOOL etisserant@40: */ etisserant@40: case function_usint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_SINT etisserant@40: */ etisserant@40: case function_usint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_INT etisserant@40: */ etisserant@40: case function_usint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DINT etisserant@40: */ etisserant@40: case function_usint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LINT etisserant@40: */ etisserant@40: case function_usint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_UINT etisserant@40: */ etisserant@40: case function_usint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_UDINT etisserant@40: */ etisserant@40: case function_usint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_ULINT etisserant@40: */ etisserant@40: case function_usint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_REAL etisserant@40: */ etisserant@40: case function_usint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LREAL etisserant@40: */ etisserant@40: case function_usint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_TIME etisserant@40: */ etisserant@40: case function_usint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DATE etisserant@40: */ etisserant@40: case function_usint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_TOD etisserant@40: */ etisserant@40: case function_usint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DT etisserant@40: */ etisserant@40: case function_usint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_STRING etisserant@40: */ etisserant@40: case function_usint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_BYTE etisserant@40: */ etisserant@40: case function_usint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_WORD etisserant@40: */ etisserant@40: case function_usint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DWORD etisserant@40: */ etisserant@40: case function_usint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LWORD etisserant@40: */ etisserant@40: case function_usint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_BOOL etisserant@40: */ etisserant@40: case function_uint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_SINT etisserant@40: */ etisserant@40: case function_uint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_INT etisserant@40: */ etisserant@40: case function_uint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DINT etisserant@40: */ etisserant@40: case function_uint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LINT etisserant@40: */ etisserant@40: case function_uint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_USINT etisserant@40: */ etisserant@40: case function_uint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_UDINT etisserant@40: */ etisserant@40: case function_uint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_ULINT etisserant@40: */ etisserant@40: case function_uint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_REAL etisserant@40: */ etisserant@40: case function_uint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LREAL etisserant@40: */ etisserant@40: case function_uint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_TIME etisserant@40: */ etisserant@40: case function_uint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DATE etisserant@40: */ etisserant@40: case function_uint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_TOD etisserant@40: */ etisserant@40: case function_uint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DT etisserant@40: */ etisserant@40: case function_uint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_STRING etisserant@40: */ etisserant@40: case function_uint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_BYTE etisserant@40: */ etisserant@40: case function_uint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_WORD etisserant@40: */ etisserant@40: case function_uint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DWORD etisserant@40: */ etisserant@40: case function_uint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LWORD etisserant@40: */ etisserant@40: case function_uint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_BOOL etisserant@40: */ etisserant@40: case function_udint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_SINT etisserant@40: */ etisserant@40: case function_udint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_INT etisserant@40: */ etisserant@40: case function_udint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DINT etisserant@40: */ etisserant@40: case function_udint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LINT etisserant@40: */ etisserant@40: case function_udint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_USINT etisserant@40: */ etisserant@40: case function_udint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_UINT etisserant@40: */ etisserant@40: case function_udint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_ULINT etisserant@40: */ etisserant@40: case function_udint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_REAL etisserant@40: */ etisserant@40: case function_udint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LREAL etisserant@40: */ etisserant@40: case function_udint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_TIME etisserant@40: */ etisserant@40: case function_udint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DATE etisserant@40: */ etisserant@40: case function_udint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_TOD etisserant@40: */ etisserant@40: case function_udint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DT etisserant@40: */ etisserant@40: case function_udint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_STRING etisserant@40: */ etisserant@40: case function_udint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_BYTE etisserant@40: */ etisserant@40: case function_udint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_WORD etisserant@40: */ etisserant@40: case function_udint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DWORD etisserant@40: */ etisserant@40: case function_udint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LWORD etisserant@40: */ etisserant@40: case function_udint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_BOOL etisserant@40: */ etisserant@40: case function_ulint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_SINT etisserant@40: */ etisserant@40: case function_ulint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_INT etisserant@40: */ etisserant@40: case function_ulint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DINT etisserant@40: */ etisserant@40: case function_ulint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LINT etisserant@40: */ etisserant@40: case function_ulint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_USINT etisserant@40: */ etisserant@40: case function_ulint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_UINT etisserant@40: */ etisserant@40: case function_ulint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_UDINT etisserant@40: */ etisserant@40: case function_ulint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_REAL etisserant@40: */ etisserant@40: case function_ulint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LREAL etisserant@40: */ etisserant@40: case function_ulint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_TIME etisserant@40: */ etisserant@40: case function_ulint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DATE etisserant@40: */ etisserant@40: case function_ulint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_TOD etisserant@40: */ etisserant@40: case function_ulint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DT etisserant@40: */ etisserant@40: case function_ulint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_STRING etisserant@40: */ etisserant@40: case function_ulint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_BYTE etisserant@40: */ etisserant@40: case function_ulint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_WORD etisserant@40: */ etisserant@40: case function_ulint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DWORD etisserant@40: */ etisserant@40: case function_ulint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LWORD etisserant@40: */ etisserant@40: case function_ulint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_BOOL etisserant@40: */ etisserant@40: case function_real_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_SINT etisserant@40: */ etisserant@40: case function_real_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_INT etisserant@40: */ etisserant@40: case function_real_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DINT etisserant@40: */ etisserant@40: case function_real_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_LINT etisserant@40: */ etisserant@40: case function_real_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_USINT etisserant@40: */ etisserant@40: case function_real_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_UINT etisserant@40: */ etisserant@40: case function_real_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_UDINT etisserant@40: */ etisserant@40: case function_real_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_ULINT etisserant@40: */ etisserant@40: case function_real_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** lbessard@35: *REAL_TO_LREAL lbessard@35: */ lbessard@35: case function_real_to_lreal : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_real_to_lreal*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@40: *REAL_TO_TIME etisserant@40: */ etisserant@40: case function_real_to_time : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) lbessard@35: { lbessard@35: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DATE etisserant@40: */ etisserant@40: case function_real_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_TOD etisserant@40: */ etisserant@40: case function_real_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DT etisserant@40: */ etisserant@40: case function_real_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_STRING etisserant@40: */ etisserant@40: case function_real_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_BYTE etisserant@40: */ etisserant@40: case function_real_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_WORD etisserant@40: */ etisserant@40: case function_real_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DWORD etisserant@40: */ etisserant@40: case function_real_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_LWORD etisserant@40: */ etisserant@40: case function_real_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_BOOL etisserant@40: */ etisserant@40: case function_lreal_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_SINT etisserant@40: */ etisserant@40: case function_lreal_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_INT etisserant@40: */ etisserant@40: case function_lreal_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DINT etisserant@40: */ etisserant@40: case function_lreal_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_LINT etisserant@40: */ etisserant@40: case function_lreal_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_USINT etisserant@40: */ etisserant@40: case function_lreal_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_UINT etisserant@40: */ etisserant@40: case function_lreal_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_UDINT etisserant@40: */ etisserant@40: case function_lreal_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_ULINT etisserant@40: */ etisserant@40: case function_lreal_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_REAL etisserant@40: */ etisserant@40: case function_lreal_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_TIME etisserant@40: */ etisserant@40: case function_lreal_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DATE etisserant@40: */ etisserant@40: case function_lreal_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_TOD etisserant@40: */ etisserant@40: case function_lreal_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DT etisserant@40: */ etisserant@40: case function_lreal_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_STRING etisserant@40: */ etisserant@40: case function_lreal_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_BYTE etisserant@40: */ etisserant@40: case function_lreal_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_WORD etisserant@40: */ etisserant@40: case function_lreal_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DWORD etisserant@40: */ etisserant@40: case function_lreal_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_LWORD etisserant@40: */ etisserant@40: case function_lreal_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: identifier_c param_name("IN"); etisserant@40: /* Get the value from a foo( = ) style call */ etisserant@40: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@40: etisserant@40: /* Get the value from a foo() style call */ etisserant@40: if (IN_param_value == NULL) etisserant@40: IN_param_value = function_call_param_iterator.next(); etisserant@40: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@40: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@42: *TIME_TO_SINT etisserant@42: */ etisserant@42: case function_time_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_INT etisserant@42: */ etisserant@42: case function_time_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_DINT etisserant@42: */ etisserant@42: case function_time_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LINT etisserant@42: */ etisserant@42: case function_time_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_USINT etisserant@42: */ etisserant@42: case function_time_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_UINT etisserant@42: */ etisserant@42: case function_time_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_UDINT etisserant@42: */ etisserant@42: case function_time_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_ULINT etisserant@42: */ etisserant@42: case function_time_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_REAL etisserant@42: */ etisserant@42: case function_time_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LREAL etisserant@42: */ etisserant@42: case function_time_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_STRING etisserant@42: */ etisserant@42: case function_time_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_BYTE etisserant@42: */ etisserant@42: case function_time_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_WORD etisserant@42: */ etisserant@42: case function_time_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_DWORD etisserant@42: */ etisserant@42: case function_time_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LWORD etisserant@42: */ etisserant@42: case function_time_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_SINT etisserant@42: */ etisserant@42: case function_date_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_INT etisserant@42: */ etisserant@42: case function_date_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_DINT etisserant@42: */ etisserant@42: case function_date_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LINT etisserant@42: */ etisserant@42: case function_date_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_USINT etisserant@42: */ etisserant@42: case function_date_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_UINT etisserant@42: */ etisserant@42: case function_date_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_UDINT etisserant@42: */ etisserant@42: case function_date_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_ULINT etisserant@42: */ etisserant@42: case function_date_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_REAL etisserant@42: */ etisserant@42: case function_date_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LREAL etisserant@42: */ etisserant@42: case function_date_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_STRING etisserant@42: */ etisserant@42: case function_date_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_BYTE etisserant@42: */ etisserant@42: case function_date_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_WORD etisserant@42: */ etisserant@42: case function_date_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_DWORD etisserant@42: */ etisserant@42: case function_date_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LWORD etisserant@42: */ etisserant@42: case function_date_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_SINT etisserant@42: */ etisserant@42: case function_tod_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_INT etisserant@42: */ etisserant@42: case function_tod_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_DINT etisserant@42: */ etisserant@42: case function_tod_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LINT etisserant@42: */ etisserant@42: case function_tod_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_USINT etisserant@42: */ etisserant@42: case function_tod_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_UINT etisserant@42: */ etisserant@42: case function_tod_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_UDINT etisserant@42: */ etisserant@42: case function_tod_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_ULINT etisserant@42: */ etisserant@42: case function_tod_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_REAL etisserant@42: */ etisserant@42: case function_tod_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LREAL etisserant@42: */ etisserant@42: case function_tod_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_STRING etisserant@42: */ etisserant@42: case function_tod_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_BYTE etisserant@42: */ etisserant@42: case function_tod_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_WORD etisserant@42: */ etisserant@42: case function_tod_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_DWORD etisserant@42: */ etisserant@42: case function_tod_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LWORD etisserant@42: */ etisserant@42: case function_tod_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_SINT etisserant@42: */ etisserant@42: case function_dt_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_INT etisserant@42: */ etisserant@42: case function_dt_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_DINT etisserant@42: */ etisserant@42: case function_dt_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LINT etisserant@42: */ etisserant@42: case function_dt_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_USINT etisserant@42: */ etisserant@42: case function_dt_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_UINT etisserant@42: */ etisserant@42: case function_dt_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_UDINT etisserant@42: */ etisserant@42: case function_dt_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_ULINT etisserant@42: */ etisserant@42: case function_dt_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_REAL etisserant@42: */ etisserant@42: case function_dt_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LREAL etisserant@42: */ etisserant@42: case function_dt_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_STRING etisserant@42: */ etisserant@42: case function_dt_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_BYTE etisserant@42: */ etisserant@42: case function_dt_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_WORD etisserant@42: */ etisserant@42: case function_dt_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_DWORD etisserant@42: */ etisserant@42: case function_dt_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LWORD etisserant@42: */ etisserant@42: case function_dt_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_BOOL etisserant@42: */ etisserant@42: case function_string_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_string_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_SINT etisserant@42: */ etisserant@42: case function_string_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_INT etisserant@42: */ etisserant@42: case function_string_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DINT etisserant@42: */ etisserant@42: case function_string_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LINT etisserant@42: */ etisserant@42: case function_string_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_USINT etisserant@42: */ etisserant@42: case function_string_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_UINT etisserant@42: */ etisserant@42: case function_string_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_UDINT etisserant@42: */ etisserant@42: case function_string_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_ULINT etisserant@42: */ etisserant@42: case function_string_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_REAL etisserant@42: */ etisserant@42: case function_string_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LREAL etisserant@42: */ etisserant@42: case function_string_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_TIME etisserant@42: */ etisserant@42: case function_string_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DATE etisserant@42: */ etisserant@42: case function_string_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_TOD etisserant@42: */ etisserant@42: case function_string_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DT etisserant@42: */ etisserant@42: case function_string_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_BYTE etisserant@42: */ etisserant@42: case function_string_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_WORD etisserant@42: */ etisserant@42: case function_string_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DWORD etisserant@42: */ etisserant@42: case function_string_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LWORD etisserant@42: */ etisserant@42: case function_string_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_BOOL etisserant@42: */ etisserant@42: case function_byte_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_SINT etisserant@42: */ etisserant@42: case function_byte_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_INT etisserant@42: */ etisserant@42: case function_byte_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DINT etisserant@42: */ etisserant@42: case function_byte_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LINT etisserant@42: */ etisserant@42: case function_byte_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_USINT etisserant@42: */ etisserant@42: case function_byte_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_UINT etisserant@42: */ etisserant@42: case function_byte_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_UDINT etisserant@42: */ etisserant@42: case function_byte_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_ULINT etisserant@42: */ etisserant@42: case function_byte_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_REAL etisserant@42: */ etisserant@42: case function_byte_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LREAL etisserant@42: */ etisserant@42: case function_byte_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_TIME etisserant@42: */ etisserant@42: case function_byte_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DATE etisserant@42: */ etisserant@42: case function_byte_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_TOD etisserant@42: */ etisserant@42: case function_byte_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DT etisserant@42: */ etisserant@42: case function_byte_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_STRING etisserant@42: */ etisserant@42: case function_byte_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_byte_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_WORD etisserant@42: */ etisserant@42: case function_byte_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DWORD etisserant@42: */ etisserant@42: case function_byte_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LWORD etisserant@42: */ etisserant@42: case function_byte_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_BOOL etisserant@42: */ etisserant@42: case function_word_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_SINT etisserant@42: */ etisserant@42: case function_word_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_INT etisserant@42: */ etisserant@42: case function_word_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DINT etisserant@42: */ etisserant@42: case function_word_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LINT etisserant@42: */ etisserant@42: case function_word_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_USINT etisserant@42: */ etisserant@42: case function_word_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_UINT etisserant@42: */ etisserant@42: case function_word_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_UDINT etisserant@42: */ etisserant@42: case function_word_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_ULINT etisserant@42: */ etisserant@42: case function_word_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_REAL etisserant@42: */ etisserant@42: case function_word_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LREAL etisserant@42: */ etisserant@42: case function_word_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_TIME etisserant@42: */ etisserant@42: case function_word_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DATE etisserant@42: */ etisserant@42: case function_word_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_TOD etisserant@42: */ etisserant@42: case function_word_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DT etisserant@42: */ etisserant@42: case function_word_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_STRING etisserant@42: */ etisserant@42: case function_word_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_BYTE etisserant@42: */ etisserant@42: case function_word_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_word_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DWORD etisserant@42: */ etisserant@42: case function_word_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LWORD etisserant@42: */ etisserant@42: case function_word_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_BOOL etisserant@42: */ etisserant@42: case function_dword_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_SINT etisserant@42: */ etisserant@42: case function_dword_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_INT etisserant@42: */ etisserant@42: case function_dword_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DINT etisserant@42: */ etisserant@42: case function_dword_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LINT etisserant@42: */ etisserant@42: case function_dword_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_USINT etisserant@42: */ etisserant@42: case function_dword_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_UINT etisserant@42: */ etisserant@42: case function_dword_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_UDINT etisserant@42: */ etisserant@42: case function_dword_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_ULINT etisserant@42: */ etisserant@42: case function_dword_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_REAL etisserant@42: */ etisserant@42: case function_dword_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LREAL etisserant@42: */ etisserant@42: case function_dword_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_TIME etisserant@42: */ etisserant@42: case function_dword_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DATE etisserant@42: */ etisserant@42: case function_dword_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_TOD etisserant@42: */ etisserant@42: case function_dword_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DT etisserant@42: */ etisserant@42: case function_dword_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_STRING etisserant@42: */ etisserant@42: case function_dword_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_BYTE etisserant@42: */ etisserant@42: case function_dword_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_WORD etisserant@42: */ etisserant@42: case function_dword_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_dword_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LWORD etisserant@42: */ etisserant@42: case function_dword_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_BOOL etisserant@42: */ etisserant@42: case function_lword_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_SINT etisserant@42: */ etisserant@42: case function_lword_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_INT etisserant@42: */ etisserant@42: case function_lword_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DINT etisserant@42: */ etisserant@42: case function_lword_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_LINT etisserant@42: */ etisserant@42: case function_lword_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_USINT etisserant@42: */ etisserant@42: case function_lword_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_UINT etisserant@42: */ etisserant@42: case function_lword_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_UDINT etisserant@42: */ etisserant@42: case function_lword_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_ULINT etisserant@42: */ etisserant@42: case function_lword_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_REAL etisserant@42: */ etisserant@42: case function_lword_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_LREAL etisserant@42: */ etisserant@42: case function_lword_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_TIME etisserant@42: */ etisserant@42: case function_lword_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DATE etisserant@42: */ etisserant@42: case function_lword_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_TOD etisserant@42: */ etisserant@42: case function_lword_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DT etisserant@42: */ etisserant@42: case function_lword_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_STRING etisserant@42: */ etisserant@42: case function_lword_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_BYTE etisserant@42: */ etisserant@42: case function_lword_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_WORD etisserant@42: */ etisserant@42: case function_lword_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DWORD etisserant@42: */ etisserant@42: case function_lword_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_lword_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TRUNC etisserant@42: */ etisserant@42: case function_trunc : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_real_type(IN_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_trunc*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_USINT etisserant@42: */ etisserant@42: case function_bcd_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_UINT etisserant@42: */ etisserant@42: case function_bcd_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_UDINT etisserant@42: */ etisserant@42: case function_bcd_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_ULINT etisserant@42: */ etisserant@42: case function_bcd_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *USINT_TO_BCD etisserant@42: */ etisserant@42: case function_usint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_usint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *UINT_TO_BCD etisserant@42: */ etisserant@42: case function_uint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_uint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *UDINT_TO_BCD etisserant@42: */ etisserant@42: case function_udint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_udint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *ULINT_TO_BCD etisserant@42: */ etisserant@42: case function_ulint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_ulint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_AND_TIME_TO_TIME_OF_DAY etisserant@42: */ etisserant@42: case function_date_and_time_to_time_of_day : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: identifier_c param_name("IN"); etisserant@42: /* Get the value from a foo( = ) style call */ etisserant@42: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@42: etisserant@42: /* Get the value from a foo() style call */ etisserant@42: if (IN_param_value == NULL) etisserant@42: IN_param_value = function_call_param_iterator.next(); etisserant@42: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@42: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: etisserant@38: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@38: return return_type_symbol; etisserant@38: etisserant@38: } etisserant@38: etisserant@38: ERROR; etisserant@38: } etisserant@38: lbessard@35: }/*function_date_and_time_to_time_of_day*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *DATE_AND_TIME_TO_DATE lbessard@35: */ lbessard@35: case function_date_and_time_to_date : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_date_and_time_to_date*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ABS lbessard@35: */ lbessard@35: case function_abs : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_abs*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SQRT lbessard@35: */ lbessard@35: case function_sqrt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sqrt*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LN lbessard@35: */ lbessard@35: case function_ln : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ln*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LOG lbessard@35: */ lbessard@35: case function_log : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_log*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *EXP lbessard@35: */ lbessard@35: case function_exp : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_exp*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SIN lbessard@35: */ lbessard@35: case function_sin : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sin*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *COS lbessard@35: */ lbessard@35: case function_cos : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_cos*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *TAN lbessard@35: */ lbessard@35: case function_tan : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_tan*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ASIN lbessard@35: */ lbessard@35: case function_asin : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_asin*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ACOS lbessard@35: */ lbessard@35: case function_acos : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_acos*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ATAN lbessard@35: */ lbessard@35: case function_atan : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_atan*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ADD lbessard@35: */ lbessard@35: case function_add : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_add*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MUL lbessard@35: */ lbessard@35: case function_mul : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mul*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SUB lbessard@35: */ lbessard@35: case function_sub : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sub*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *DIV lbessard@35: */ lbessard@35: case function_div : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_div*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MOD lbessard@35: */ lbessard@35: case function_mod : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mod*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *EXPT lbessard@35: */ lbessard@35: case function_expt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_expt*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MOVE lbessard@35: */ lbessard@35: case function_move : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_move*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SHL lbessard@35: */ lbessard@35: case function_shl : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_shl*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SHR lbessard@35: */ lbessard@35: case function_shr : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_shr*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ROR lbessard@35: */ lbessard@35: case function_ror : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@38: if(search_expression_type->is_nbinary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ror*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *ROL lbessard@35: */ lbessard@35: case function_rol : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@38: if(search_expression_type->is_nbinary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_rol*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *AND lbessard@35: */ lbessard@35: case function_and : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_and*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *OR lbessard@35: */ lbessard@35: case function_or : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_or*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *XOR lbessard@35: */ lbessard@35: case function_xor : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_xor*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *NOT lbessard@35: */ lbessard@35: case function_not : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_not*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *SEL lbessard@35: */ lbessard@35: case function_sel : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("G"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *G_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (G_param_value == NULL) lbessard@35: G_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN0"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN0_param_value == NULL) lbessard@35: IN0_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sel*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MAX lbessard@35: */ lbessard@35: case function_max : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_max*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MIN lbessard@35: */ lbessard@35: case function_min : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_min*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LIMIT lbessard@35: */ lbessard@35: case function_limit : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("MN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *MN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (MN_param_value == NULL) lbessard@35: MN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("MX"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (MX_param_value == NULL) lbessard@35: MX_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_limit*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MUX lbessard@35: */ lbessard@35: case function_mux : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("K"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *K_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (K_param_value == NULL) lbessard@35: K_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_integer_type(K_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN0"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN0_param_value == NULL) lbessard@35: IN0_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mux*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *GT lbessard@35: */ lbessard@35: case function_gt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_gt*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *GE lbessard@35: */ lbessard@35: case function_ge : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ge*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *EQ lbessard@35: */ lbessard@35: case function_eq : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_eq*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LT lbessard@35: */ lbessard@35: case function_lt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_lt*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LE lbessard@35: */ lbessard@35: case function_le : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_le*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *NE lbessard@35: */ lbessard@35: case function_ne : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ne*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LEN lbessard@35: */ lbessard@35: case function_len : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_len*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *LEFT lbessard@35: */ lbessard@35: case function_left : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_left*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *RIGHT lbessard@35: */ lbessard@35: case function_right : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_right*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *MID lbessard@35: */ lbessard@35: case function_mid : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mid*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *CONCAT lbessard@35: */ lbessard@35: case function_concat : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_concat*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *INSERT lbessard@35: */ lbessard@35: case function_insert : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_insert*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *DELETE lbessard@35: */ lbessard@35: case function_delete : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_delete*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *REPLACE lbessard@35: */ lbessard@35: case function_replace : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_replace*/ lbessard@35: break; lbessard@35: lbessard@35: /**** lbessard@35: *FIND lbessard@35: */ lbessard@35: case function_find : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_find*/ lbessard@35: break; lbessard@35: lbessard@35: case function_none : lbessard@35: ERROR; lbessard@35: } lbessard@35: return NULL; lbessard@35: } lbessard@35: lbessard@35: void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type) { lbessard@35: lbessard@35: function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); lbessard@35: function_call_param_iterator_c function_call_param_iterator(symbol); lbessard@35: search_expression_type_c* search_expression_type = this; lbessard@35: lbessard@35: switch(current_function_type){ lbessard@35: lbessard@35: /**** etisserant@40: *BOOL_TO_SINT etisserant@40: */ etisserant@40: case function_bool_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_INT etisserant@40: */ etisserant@40: case function_bool_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DINT etisserant@40: */ etisserant@40: case function_bool_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LINT etisserant@40: */ etisserant@40: case function_bool_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_USINT etisserant@40: */ etisserant@40: case function_bool_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_UINT etisserant@40: */ etisserant@40: case function_bool_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_UDINT etisserant@40: */ etisserant@40: case function_bool_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_ULINT etisserant@40: */ etisserant@40: case function_bool_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_REAL etisserant@40: */ etisserant@40: case function_bool_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LREAL etisserant@40: */ etisserant@40: case function_bool_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_TIME etisserant@40: */ etisserant@40: case function_bool_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DATE etisserant@40: */ etisserant@40: case function_bool_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_TOD etisserant@40: */ etisserant@40: case function_bool_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DT etisserant@40: */ etisserant@40: case function_bool_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_STRING etisserant@40: */ etisserant@40: case function_bool_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_BYTE etisserant@40: */ etisserant@40: case function_bool_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_WORD etisserant@40: */ etisserant@40: case function_bool_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_DWORD etisserant@40: */ etisserant@40: case function_bool_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *BOOL_TO_LWORD etisserant@40: */ etisserant@40: case function_bool_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_bool_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_BOOL etisserant@40: */ etisserant@40: case function_sint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_INT etisserant@40: */ etisserant@40: case function_sint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DINT etisserant@40: */ etisserant@40: case function_sint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LINT etisserant@40: */ etisserant@40: case function_sint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_USINT etisserant@40: */ etisserant@40: case function_sint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_UINT etisserant@40: */ etisserant@40: case function_sint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_UDINT etisserant@40: */ etisserant@40: case function_sint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_ULINT etisserant@40: */ etisserant@40: case function_sint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_REAL etisserant@40: */ etisserant@40: case function_sint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LREAL etisserant@40: */ etisserant@40: case function_sint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_TIME etisserant@40: */ etisserant@40: case function_sint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DATE etisserant@40: */ etisserant@40: case function_sint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_TOD etisserant@40: */ etisserant@40: case function_sint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DT etisserant@40: */ etisserant@40: case function_sint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_STRING etisserant@40: */ etisserant@40: case function_sint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_BYTE etisserant@40: */ etisserant@40: case function_sint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_WORD etisserant@40: */ etisserant@40: case function_sint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_DWORD etisserant@40: */ etisserant@40: case function_sint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *SINT_TO_LWORD etisserant@40: */ etisserant@40: case function_sint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_sint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_BOOL etisserant@40: */ etisserant@40: case function_int_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_SINT etisserant@40: */ etisserant@40: case function_int_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DINT etisserant@40: */ etisserant@40: case function_int_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LINT etisserant@40: */ etisserant@40: case function_int_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_USINT etisserant@40: */ etisserant@40: case function_int_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_UINT etisserant@40: */ etisserant@40: case function_int_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_UDINT etisserant@40: */ etisserant@40: case function_int_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_ULINT etisserant@40: */ etisserant@40: case function_int_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_REAL etisserant@40: */ etisserant@40: case function_int_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LREAL etisserant@40: */ etisserant@40: case function_int_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_TIME etisserant@40: */ etisserant@40: case function_int_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DATE etisserant@40: */ etisserant@40: case function_int_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_TOD etisserant@40: */ etisserant@40: case function_int_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DT etisserant@40: */ etisserant@40: case function_int_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_STRING etisserant@40: */ etisserant@40: case function_int_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_BYTE etisserant@40: */ etisserant@40: case function_int_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_WORD etisserant@40: */ etisserant@40: case function_int_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_DWORD etisserant@40: */ etisserant@40: case function_int_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *INT_TO_LWORD etisserant@40: */ etisserant@40: case function_int_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_int_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_BOOL etisserant@40: */ etisserant@40: case function_dint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_SINT etisserant@40: */ etisserant@40: case function_dint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_INT etisserant@40: */ etisserant@40: case function_dint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LINT etisserant@40: */ etisserant@40: case function_dint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_USINT etisserant@40: */ etisserant@40: case function_dint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_UINT etisserant@40: */ etisserant@40: case function_dint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_UDINT etisserant@40: */ etisserant@40: case function_dint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_ULINT etisserant@40: */ etisserant@40: case function_dint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_REAL etisserant@40: */ etisserant@40: case function_dint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LREAL etisserant@40: */ etisserant@40: case function_dint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_TIME etisserant@40: */ etisserant@40: case function_dint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DATE etisserant@40: */ etisserant@40: case function_dint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_TOD etisserant@40: */ etisserant@40: case function_dint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DT etisserant@40: */ etisserant@40: case function_dint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_STRING etisserant@40: */ etisserant@40: case function_dint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_BYTE etisserant@40: */ etisserant@40: case function_dint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_WORD etisserant@40: */ etisserant@40: case function_dint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_DWORD etisserant@40: */ etisserant@40: case function_dint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *DINT_TO_LWORD etisserant@40: */ etisserant@40: case function_dint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_dint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_BOOL etisserant@40: */ etisserant@40: case function_lint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_SINT etisserant@40: */ etisserant@40: case function_lint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_INT etisserant@40: */ etisserant@40: case function_lint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DINT etisserant@40: */ etisserant@40: case function_lint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_USINT etisserant@40: */ etisserant@40: case function_lint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_UINT etisserant@40: */ etisserant@40: case function_lint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_UDINT etisserant@40: */ etisserant@40: case function_lint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_ULINT etisserant@40: */ etisserant@40: case function_lint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_REAL etisserant@40: */ etisserant@40: case function_lint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_LREAL etisserant@40: */ etisserant@40: case function_lint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_TIME etisserant@40: */ etisserant@40: case function_lint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DATE etisserant@40: */ etisserant@40: case function_lint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_TOD etisserant@40: */ etisserant@40: case function_lint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DT etisserant@40: */ etisserant@40: case function_lint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_STRING etisserant@40: */ etisserant@40: case function_lint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_BYTE etisserant@40: */ etisserant@40: case function_lint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_WORD etisserant@40: */ etisserant@40: case function_lint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_DWORD etisserant@40: */ etisserant@40: case function_lint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LINT_TO_LWORD etisserant@40: */ etisserant@40: case function_lint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_BOOL etisserant@40: */ etisserant@40: case function_usint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_SINT etisserant@40: */ etisserant@40: case function_usint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_INT etisserant@40: */ etisserant@40: case function_usint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DINT etisserant@40: */ etisserant@40: case function_usint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LINT etisserant@40: */ etisserant@40: case function_usint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_UINT etisserant@40: */ etisserant@40: case function_usint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_UDINT etisserant@40: */ etisserant@40: case function_usint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_ULINT etisserant@40: */ etisserant@40: case function_usint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_REAL etisserant@40: */ etisserant@40: case function_usint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LREAL etisserant@40: */ etisserant@40: case function_usint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_TIME etisserant@40: */ etisserant@40: case function_usint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DATE etisserant@40: */ etisserant@40: case function_usint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_TOD etisserant@40: */ etisserant@40: case function_usint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DT etisserant@40: */ etisserant@40: case function_usint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_STRING etisserant@40: */ etisserant@40: case function_usint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_BYTE etisserant@40: */ etisserant@40: case function_usint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_WORD etisserant@40: */ etisserant@40: case function_usint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_DWORD etisserant@40: */ etisserant@40: case function_usint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *USINT_TO_LWORD etisserant@40: */ etisserant@40: case function_usint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_usint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_BOOL etisserant@40: */ etisserant@40: case function_uint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_SINT etisserant@40: */ etisserant@40: case function_uint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_INT etisserant@40: */ etisserant@40: case function_uint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DINT etisserant@40: */ etisserant@40: case function_uint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LINT etisserant@40: */ etisserant@40: case function_uint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_USINT etisserant@40: */ etisserant@40: case function_uint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_UDINT etisserant@40: */ etisserant@40: case function_uint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_ULINT etisserant@40: */ etisserant@40: case function_uint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_REAL etisserant@40: */ etisserant@40: case function_uint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LREAL etisserant@40: */ etisserant@40: case function_uint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_TIME etisserant@40: */ etisserant@40: case function_uint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DATE etisserant@40: */ etisserant@40: case function_uint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_TOD etisserant@40: */ etisserant@40: case function_uint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DT etisserant@40: */ etisserant@40: case function_uint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_STRING etisserant@40: */ etisserant@40: case function_uint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_BYTE etisserant@40: */ etisserant@40: case function_uint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_WORD etisserant@40: */ etisserant@40: case function_uint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_DWORD etisserant@40: */ etisserant@40: case function_uint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UINT_TO_LWORD etisserant@40: */ etisserant@40: case function_uint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_uint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_BOOL etisserant@40: */ etisserant@40: case function_udint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_SINT etisserant@40: */ etisserant@40: case function_udint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_INT etisserant@40: */ etisserant@40: case function_udint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DINT etisserant@40: */ etisserant@40: case function_udint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LINT etisserant@40: */ etisserant@40: case function_udint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_USINT etisserant@40: */ etisserant@40: case function_udint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_UINT etisserant@40: */ etisserant@40: case function_udint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_ULINT etisserant@40: */ etisserant@40: case function_udint_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_REAL etisserant@40: */ etisserant@40: case function_udint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LREAL etisserant@40: */ etisserant@40: case function_udint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_TIME etisserant@40: */ etisserant@40: case function_udint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DATE etisserant@40: */ etisserant@40: case function_udint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_TOD etisserant@40: */ etisserant@40: case function_udint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DT etisserant@40: */ etisserant@40: case function_udint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_STRING etisserant@40: */ etisserant@40: case function_udint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_BYTE etisserant@40: */ etisserant@40: case function_udint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_WORD etisserant@40: */ etisserant@40: case function_udint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_DWORD etisserant@40: */ etisserant@40: case function_udint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *UDINT_TO_LWORD etisserant@40: */ etisserant@40: case function_udint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_udint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_BOOL etisserant@40: */ etisserant@40: case function_ulint_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_SINT etisserant@40: */ etisserant@40: case function_ulint_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_INT etisserant@40: */ etisserant@40: case function_ulint_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DINT etisserant@40: */ etisserant@40: case function_ulint_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LINT etisserant@40: */ etisserant@40: case function_ulint_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_USINT etisserant@40: */ etisserant@40: case function_ulint_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_UINT etisserant@40: */ etisserant@40: case function_ulint_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_UDINT etisserant@40: */ etisserant@40: case function_ulint_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_REAL etisserant@40: */ etisserant@40: case function_ulint_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LREAL etisserant@40: */ etisserant@40: case function_ulint_to_lreal : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lreal*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_TIME etisserant@40: */ etisserant@40: case function_ulint_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DATE etisserant@40: */ etisserant@40: case function_ulint_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_TOD etisserant@40: */ etisserant@40: case function_ulint_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DT etisserant@40: */ etisserant@40: case function_ulint_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_STRING etisserant@40: */ etisserant@40: case function_ulint_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_BYTE etisserant@40: */ etisserant@40: case function_ulint_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_WORD etisserant@40: */ etisserant@40: case function_ulint_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_DWORD etisserant@40: */ etisserant@40: case function_ulint_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *ULINT_TO_LWORD etisserant@40: */ etisserant@40: case function_ulint_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_ulint_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_BOOL etisserant@40: */ etisserant@40: case function_real_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_SINT etisserant@40: */ etisserant@40: case function_real_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_INT etisserant@40: */ etisserant@40: case function_real_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DINT etisserant@40: */ etisserant@40: case function_real_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_LINT etisserant@40: */ etisserant@40: case function_real_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_USINT etisserant@40: */ etisserant@40: case function_real_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_UINT etisserant@40: */ etisserant@40: case function_real_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_UDINT etisserant@40: */ etisserant@40: case function_real_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_ULINT etisserant@40: */ etisserant@40: case function_real_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** lbessard@35: *REAL_TO_LREAL lbessard@35: */ lbessard@35: case function_real_to_lreal : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_real_to_lreal*/ lbessard@35: break; lbessard@35: lbessard@35: /**** etisserant@40: *REAL_TO_TIME etisserant@40: */ etisserant@40: case function_real_to_time : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) lbessard@35: { lbessard@35: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DATE etisserant@40: */ etisserant@40: case function_real_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_TOD etisserant@40: */ etisserant@40: case function_real_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DT etisserant@40: */ etisserant@40: case function_real_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_STRING etisserant@40: */ etisserant@40: case function_real_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_BYTE etisserant@40: */ etisserant@40: case function_real_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_WORD etisserant@40: */ etisserant@40: case function_real_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_DWORD etisserant@40: */ etisserant@40: case function_real_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *REAL_TO_LWORD etisserant@40: */ etisserant@40: case function_real_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_real_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_BOOL etisserant@40: */ etisserant@40: case function_lreal_to_bool : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_bool*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_SINT etisserant@40: */ etisserant@40: case function_lreal_to_sint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_sint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_INT etisserant@40: */ etisserant@40: case function_lreal_to_int : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_int*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DINT etisserant@40: */ etisserant@40: case function_lreal_to_dint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_dint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_LINT etisserant@40: */ etisserant@40: case function_lreal_to_lint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_lint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_USINT etisserant@40: */ etisserant@40: case function_lreal_to_usint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_usint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_UINT etisserant@40: */ etisserant@40: case function_lreal_to_uint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_uint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_UDINT etisserant@40: */ etisserant@40: case function_lreal_to_udint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_udint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_ULINT etisserant@40: */ etisserant@40: case function_lreal_to_ulint : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_ulint*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_REAL etisserant@40: */ etisserant@40: case function_lreal_to_real : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_real*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_TIME etisserant@40: */ etisserant@40: case function_lreal_to_time : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@40: }/*function_lreal_to_time*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DATE etisserant@40: */ etisserant@40: case function_lreal_to_date : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_date*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_TOD etisserant@40: */ etisserant@40: case function_lreal_to_tod : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_tod*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DT etisserant@40: */ etisserant@40: case function_lreal_to_dt : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_dt*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_STRING etisserant@40: */ etisserant@40: case function_lreal_to_string : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_string*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_BYTE etisserant@40: */ etisserant@40: case function_lreal_to_byte : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_byte*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_WORD etisserant@40: */ etisserant@40: case function_lreal_to_word : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_word*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_DWORD etisserant@40: */ etisserant@40: case function_lreal_to_dword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_dword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@40: *LREAL_TO_LWORD etisserant@40: */ etisserant@40: case function_lreal_to_lword : etisserant@40: { etisserant@40: symbol_c *last_type_symbol = NULL; etisserant@40: etisserant@40: { etisserant@40: symbol_c *IN_type_symbol = param_data_type; etisserant@40: last_type_symbol = param_data_type; etisserant@40: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@40: }/*function_lreal_to_lword*/ etisserant@40: break; etisserant@40: etisserant@40: /**** etisserant@42: *TIME_TO_SINT etisserant@42: */ etisserant@42: case function_time_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_INT etisserant@42: */ etisserant@42: case function_time_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_DINT etisserant@42: */ etisserant@42: case function_time_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LINT etisserant@42: */ etisserant@42: case function_time_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_USINT etisserant@42: */ etisserant@42: case function_time_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_UINT etisserant@42: */ etisserant@42: case function_time_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_UDINT etisserant@42: */ etisserant@42: case function_time_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_ULINT etisserant@42: */ etisserant@42: case function_time_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_REAL etisserant@42: */ etisserant@42: case function_time_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LREAL etisserant@42: */ etisserant@42: case function_time_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_STRING etisserant@42: */ etisserant@42: case function_time_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_BYTE etisserant@42: */ etisserant@42: case function_time_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_WORD etisserant@42: */ etisserant@42: case function_time_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_DWORD etisserant@42: */ etisserant@42: case function_time_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TIME_TO_LWORD etisserant@42: */ etisserant@42: case function_time_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_time_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_SINT etisserant@42: */ etisserant@42: case function_date_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_INT etisserant@42: */ etisserant@42: case function_date_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_DINT etisserant@42: */ etisserant@42: case function_date_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LINT etisserant@42: */ etisserant@42: case function_date_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_USINT etisserant@42: */ etisserant@42: case function_date_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_UINT etisserant@42: */ etisserant@42: case function_date_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_UDINT etisserant@42: */ etisserant@42: case function_date_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_ULINT etisserant@42: */ etisserant@42: case function_date_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_REAL etisserant@42: */ etisserant@42: case function_date_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LREAL etisserant@42: */ etisserant@42: case function_date_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_STRING etisserant@42: */ etisserant@42: case function_date_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_BYTE etisserant@42: */ etisserant@42: case function_date_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_WORD etisserant@42: */ etisserant@42: case function_date_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_DWORD etisserant@42: */ etisserant@42: case function_date_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_TO_LWORD etisserant@42: */ etisserant@42: case function_date_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_date_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_SINT etisserant@42: */ etisserant@42: case function_tod_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_INT etisserant@42: */ etisserant@42: case function_tod_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_DINT etisserant@42: */ etisserant@42: case function_tod_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LINT etisserant@42: */ etisserant@42: case function_tod_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_USINT etisserant@42: */ etisserant@42: case function_tod_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_UINT etisserant@42: */ etisserant@42: case function_tod_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_UDINT etisserant@42: */ etisserant@42: case function_tod_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_ULINT etisserant@42: */ etisserant@42: case function_tod_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_REAL etisserant@42: */ etisserant@42: case function_tod_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LREAL etisserant@42: */ etisserant@42: case function_tod_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_STRING etisserant@42: */ etisserant@42: case function_tod_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_BYTE etisserant@42: */ etisserant@42: case function_tod_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_WORD etisserant@42: */ etisserant@42: case function_tod_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_DWORD etisserant@42: */ etisserant@42: case function_tod_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TOD_TO_LWORD etisserant@42: */ etisserant@42: case function_tod_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_tod_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_SINT etisserant@42: */ etisserant@42: case function_dt_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_INT etisserant@42: */ etisserant@42: case function_dt_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_DINT etisserant@42: */ etisserant@42: case function_dt_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LINT etisserant@42: */ etisserant@42: case function_dt_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_USINT etisserant@42: */ etisserant@42: case function_dt_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_UINT etisserant@42: */ etisserant@42: case function_dt_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_UDINT etisserant@42: */ etisserant@42: case function_dt_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_ULINT etisserant@42: */ etisserant@42: case function_dt_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_REAL etisserant@42: */ etisserant@42: case function_dt_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LREAL etisserant@42: */ etisserant@42: case function_dt_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_STRING etisserant@42: */ etisserant@42: case function_dt_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_BYTE etisserant@42: */ etisserant@42: case function_dt_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_WORD etisserant@42: */ etisserant@42: case function_dt_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_DWORD etisserant@42: */ etisserant@42: case function_dt_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DT_TO_LWORD etisserant@42: */ etisserant@42: case function_dt_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dt_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_BOOL etisserant@42: */ etisserant@42: case function_string_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_string_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_SINT etisserant@42: */ etisserant@42: case function_string_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_INT etisserant@42: */ etisserant@42: case function_string_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DINT etisserant@42: */ etisserant@42: case function_string_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LINT etisserant@42: */ etisserant@42: case function_string_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_USINT etisserant@42: */ etisserant@42: case function_string_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_UINT etisserant@42: */ etisserant@42: case function_string_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_UDINT etisserant@42: */ etisserant@42: case function_string_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_ULINT etisserant@42: */ etisserant@42: case function_string_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_REAL etisserant@42: */ etisserant@42: case function_string_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LREAL etisserant@42: */ etisserant@42: case function_string_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_string_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_TIME etisserant@42: */ etisserant@42: case function_string_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DATE etisserant@42: */ etisserant@42: case function_string_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_TOD etisserant@42: */ etisserant@42: case function_string_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DT etisserant@42: */ etisserant@42: case function_string_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_BYTE etisserant@42: */ etisserant@42: case function_string_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_WORD etisserant@42: */ etisserant@42: case function_string_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_DWORD etisserant@42: */ etisserant@42: case function_string_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *STRING_TO_LWORD etisserant@42: */ etisserant@42: case function_string_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_string_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_BOOL etisserant@42: */ etisserant@42: case function_byte_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_SINT etisserant@42: */ etisserant@42: case function_byte_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_INT etisserant@42: */ etisserant@42: case function_byte_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DINT etisserant@42: */ etisserant@42: case function_byte_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LINT etisserant@42: */ etisserant@42: case function_byte_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_USINT etisserant@42: */ etisserant@42: case function_byte_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_UINT etisserant@42: */ etisserant@42: case function_byte_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_UDINT etisserant@42: */ etisserant@42: case function_byte_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_ULINT etisserant@42: */ etisserant@42: case function_byte_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_REAL etisserant@42: */ etisserant@42: case function_byte_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LREAL etisserant@42: */ etisserant@42: case function_byte_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_TIME etisserant@42: */ etisserant@42: case function_byte_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DATE etisserant@42: */ etisserant@42: case function_byte_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_TOD etisserant@42: */ etisserant@42: case function_byte_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DT etisserant@42: */ etisserant@42: case function_byte_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_STRING etisserant@42: */ etisserant@42: case function_byte_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_byte_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_WORD etisserant@42: */ etisserant@42: case function_byte_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_DWORD etisserant@42: */ etisserant@42: case function_byte_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BYTE_TO_LWORD etisserant@42: */ etisserant@42: case function_byte_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_byte_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_BOOL etisserant@42: */ etisserant@42: case function_word_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_SINT etisserant@42: */ etisserant@42: case function_word_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_INT etisserant@42: */ etisserant@42: case function_word_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DINT etisserant@42: */ etisserant@42: case function_word_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LINT etisserant@42: */ etisserant@42: case function_word_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_USINT etisserant@42: */ etisserant@42: case function_word_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_UINT etisserant@42: */ etisserant@42: case function_word_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_UDINT etisserant@42: */ etisserant@42: case function_word_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_ULINT etisserant@42: */ etisserant@42: case function_word_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_REAL etisserant@42: */ etisserant@42: case function_word_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LREAL etisserant@42: */ etisserant@42: case function_word_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_TIME etisserant@42: */ etisserant@42: case function_word_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DATE etisserant@42: */ etisserant@42: case function_word_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_TOD etisserant@42: */ etisserant@42: case function_word_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DT etisserant@42: */ etisserant@42: case function_word_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_STRING etisserant@42: */ etisserant@42: case function_word_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_BYTE etisserant@42: */ etisserant@42: case function_word_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_word_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_DWORD etisserant@42: */ etisserant@42: case function_word_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *WORD_TO_LWORD etisserant@42: */ etisserant@42: case function_word_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_word_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_BOOL etisserant@42: */ etisserant@42: case function_dword_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_SINT etisserant@42: */ etisserant@42: case function_dword_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_INT etisserant@42: */ etisserant@42: case function_dword_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DINT etisserant@42: */ etisserant@42: case function_dword_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LINT etisserant@42: */ etisserant@42: case function_dword_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_USINT etisserant@42: */ etisserant@42: case function_dword_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_UINT etisserant@42: */ etisserant@42: case function_dword_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_UDINT etisserant@42: */ etisserant@42: case function_dword_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_ULINT etisserant@42: */ etisserant@42: case function_dword_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_REAL etisserant@42: */ etisserant@42: case function_dword_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LREAL etisserant@42: */ etisserant@42: case function_dword_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_TIME etisserant@42: */ etisserant@42: case function_dword_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DATE etisserant@42: */ etisserant@42: case function_dword_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_TOD etisserant@42: */ etisserant@42: case function_dword_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_DT etisserant@42: */ etisserant@42: case function_dword_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_STRING etisserant@42: */ etisserant@42: case function_dword_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_BYTE etisserant@42: */ etisserant@42: case function_dword_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_WORD etisserant@42: */ etisserant@42: case function_dword_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_dword_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DWORD_TO_LWORD etisserant@42: */ etisserant@42: case function_dword_to_lword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_dword_to_lword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_BOOL etisserant@42: */ etisserant@42: case function_lword_to_bool : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_bool*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_SINT etisserant@42: */ etisserant@42: case function_lword_to_sint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_sint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_INT etisserant@42: */ etisserant@42: case function_lword_to_int : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_int*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DINT etisserant@42: */ etisserant@42: case function_lword_to_dint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_dint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_LINT etisserant@42: */ etisserant@42: case function_lword_to_lint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_lint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_USINT etisserant@42: */ etisserant@42: case function_lword_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_UINT etisserant@42: */ etisserant@42: case function_lword_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_UDINT etisserant@42: */ etisserant@42: case function_lword_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_ULINT etisserant@42: */ etisserant@42: case function_lword_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_REAL etisserant@42: */ etisserant@42: case function_lword_to_real : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_real*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_LREAL etisserant@42: */ etisserant@42: case function_lword_to_lreal : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_lreal*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_TIME etisserant@42: */ etisserant@42: case function_lword_to_time : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_time*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DATE etisserant@42: */ etisserant@42: case function_lword_to_date : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_date*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_TOD etisserant@42: */ etisserant@42: case function_lword_to_tod : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_tod*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DT etisserant@42: */ etisserant@42: case function_lword_to_dt : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_dt*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_STRING etisserant@42: */ etisserant@42: case function_lword_to_string : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_string*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_BYTE etisserant@42: */ etisserant@42: case function_lword_to_byte : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_byte*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_WORD etisserant@42: */ etisserant@42: case function_lword_to_word : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_lword_to_word*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *LWORD_TO_DWORD etisserant@42: */ etisserant@42: case function_lword_to_dword : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: etisserant@42: }/*function_lword_to_dword*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *TRUNC etisserant@42: */ etisserant@42: case function_trunc : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_real_type(IN_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_trunc*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_USINT etisserant@42: */ etisserant@42: case function_bcd_to_usint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_usint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_UINT etisserant@42: */ etisserant@42: case function_bcd_to_uint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_uint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_UDINT etisserant@42: */ etisserant@42: case function_bcd_to_udint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_udint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *BCD_TO_ULINT etisserant@42: */ etisserant@42: case function_bcd_to_ulint : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) etisserant@40: { etisserant@40: etisserant@40: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@40: return return_type_symbol; etisserant@40: etisserant@40: } etisserant@40: etisserant@40: ERROR; etisserant@40: } etisserant@40: etisserant@42: }/*function_bcd_to_ulint*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *USINT_TO_BCD etisserant@42: */ etisserant@42: case function_usint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_usint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *UINT_TO_BCD etisserant@42: */ etisserant@42: case function_uint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_uint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *UDINT_TO_BCD etisserant@42: */ etisserant@42: case function_udint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_udint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *ULINT_TO_BCD etisserant@42: */ etisserant@42: case function_ulint_to_bcd : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) etisserant@42: { etisserant@42: etisserant@42: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@42: return return_type_symbol; etisserant@42: etisserant@42: } etisserant@42: etisserant@42: ERROR; etisserant@42: } etisserant@42: etisserant@42: }/*function_ulint_to_bcd*/ etisserant@42: break; etisserant@42: etisserant@42: /**** etisserant@42: *DATE_AND_TIME_TO_TIME_OF_DAY etisserant@42: */ etisserant@42: case function_date_and_time_to_time_of_day : etisserant@42: { etisserant@42: symbol_c *last_type_symbol = NULL; etisserant@42: etisserant@42: { etisserant@42: symbol_c *IN_type_symbol = param_data_type; etisserant@42: last_type_symbol = param_data_type; etisserant@42: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: etisserant@38: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@38: return return_type_symbol; etisserant@38: etisserant@38: } etisserant@38: etisserant@38: ERROR; etisserant@38: } etisserant@38: lbessard@35: }/*function_date_and_time_to_time_of_day*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_AND_TIME_TO_DATE etisserant@33: */ lbessard@35: case function_date_and_time_to_date : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_date_and_time_to_date*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ABS etisserant@33: */ lbessard@35: case function_abs : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_abs*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SQRT etisserant@33: */ lbessard@35: case function_sqrt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sqrt*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LN etisserant@33: */ lbessard@35: case function_ln : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ln*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LOG etisserant@33: */ lbessard@35: case function_log : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_log*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *EXP etisserant@33: */ lbessard@35: case function_exp : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_exp*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SIN etisserant@33: */ lbessard@35: case function_sin : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sin*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *COS etisserant@33: */ lbessard@35: case function_cos : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_cos*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *TAN etisserant@33: */ lbessard@35: case function_tan : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_tan*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ASIN etisserant@33: */ lbessard@35: case function_asin : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_asin*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ACOS etisserant@33: */ lbessard@35: case function_acos : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_acos*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ATAN etisserant@33: */ lbessard@35: case function_atan : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_real_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_atan*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ADD etisserant@33: */ lbessard@35: case function_add : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_add*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MUL etisserant@33: */ lbessard@35: case function_mul : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mul*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SUB etisserant@33: */ lbessard@35: case function_sub : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sub*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *DIV etisserant@33: */ lbessard@35: case function_div : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_div*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MOD etisserant@33: */ lbessard@35: case function_mod : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mod*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *EXPT etisserant@33: */ lbessard@35: case function_expt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_expt*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MOVE etisserant@33: */ lbessard@35: case function_move : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_num_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_move*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SHL etisserant@33: */ lbessard@35: case function_shl : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_shl*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SHR etisserant@33: */ lbessard@35: case function_shr : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_shr*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ROR etisserant@33: */ lbessard@35: case function_ror : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@38: if(search_expression_type->is_nbinary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ror*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *ROL etisserant@33: */ lbessard@35: case function_rol : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@38: if(search_expression_type->is_nbinary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("N"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (N_param_value == NULL) lbessard@35: N_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(N_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_rol*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *AND etisserant@33: */ lbessard@35: case function_and : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_and*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *OR etisserant@33: */ lbessard@35: case function_or : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_or*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *XOR etisserant@33: */ lbessard@35: case function_xor : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN1_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN2_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_xor*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *NOT etisserant@33: */ lbessard@35: case function_not : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_binary_type(IN_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_not*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *SEL etisserant@33: */ lbessard@35: case function_sel : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *G_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN0"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN0_param_value == NULL) lbessard@35: IN0_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_sel*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MAX etisserant@33: */ lbessard@35: case function_max : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_max*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MIN etisserant@33: */ lbessard@35: case function_min : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_min*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LIMIT etisserant@33: */ lbessard@35: case function_limit : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *MN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN_param_value == NULL) lbessard@35: IN_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("MX"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (MX_param_value == NULL) lbessard@35: MX_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = IN_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_limit*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MUX etisserant@33: */ lbessard@35: case function_mux : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *K_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: if(search_expression_type->is_integer_type(K_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN0"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN0_param_value == NULL) lbessard@35: IN0_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN1"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN1_param_value == NULL) lbessard@35: IN1_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = last_type_symbol; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mux*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *GT etisserant@33: */ lbessard@35: case function_gt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_gt*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *GE etisserant@33: */ lbessard@35: case function_ge : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ge*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *EQ etisserant@33: */ lbessard@35: case function_eq : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_eq*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LT etisserant@33: */ lbessard@35: case function_lt : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_lt*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LE etisserant@33: */ lbessard@35: case function_le : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_le*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *NE etisserant@33: */ lbessard@35: case function_ne : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: lbessard@35: lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_ne*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LEN etisserant@33: */ lbessard@35: case function_len : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_len*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *LEFT etisserant@33: */ lbessard@35: case function_left : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_left*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *RIGHT etisserant@33: */ lbessard@35: case function_right : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_right*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *MID etisserant@33: */ lbessard@35: case function_mid : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_mid*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *CONCAT etisserant@33: */ lbessard@35: case function_concat : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_concat*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *INSERT etisserant@33: */ lbessard@35: case function_insert : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_insert*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *DELETE etisserant@33: */ lbessard@35: case function_delete : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_delete*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *REPLACE etisserant@33: */ lbessard@35: case function_replace : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("L"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (L_param_value == NULL) lbessard@35: L_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(L_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("P"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (P_param_value == NULL) lbessard@35: P_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; lbessard@35: etisserant@40: if(search_expression_type->is_integer_type(P_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_replace*/ lbessard@35: break; etisserant@33: etisserant@33: /**** etisserant@33: *FIND etisserant@33: */ lbessard@35: case function_find : lbessard@35: { lbessard@35: symbol_c *last_type_symbol = NULL; lbessard@35: lbessard@35: { lbessard@35: symbol_c *IN1_type_symbol = param_data_type; lbessard@35: last_type_symbol = param_data_type; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: { lbessard@35: identifier_c param_name("IN2"); lbessard@35: /* Get the value from a foo( = ) style call */ lbessard@35: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); lbessard@35: lbessard@35: /* Get the value from a foo() style call */ lbessard@35: if (IN2_param_value == NULL) lbessard@35: IN2_param_value = function_call_param_iterator.next(); lbessard@35: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); lbessard@35: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; lbessard@35: etisserant@42: if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) lbessard@35: { lbessard@35: lbessard@35: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; lbessard@35: return return_type_symbol; lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: } lbessard@35: lbessard@35: ERROR; lbessard@35: } lbessard@35: lbessard@35: }/*function_find*/ lbessard@35: break; lbessard@35: lbessard@35: case function_none : lbessard@35: ERROR; lbessard@35: } lbessard@35: return NULL; etisserant@33: }