mario@181: /* mario@181: * (c) 2008 Edouard TISSERANT mario@181: * mario@181: * Offered to the public under the terms of the GNU General Public License mario@181: * as published by the Free Software Foundation; either version 2 of the mario@181: * License, or (at your option) any later version. mario@181: * mario@181: * This program is distributed in the hope that it will be useful, but mario@181: * WITHOUT ANY WARRANTY; without even the implied warranty of mario@181: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General mario@181: * Public License for more details. mario@181: * mario@181: * This code is made available on the understanding that it will not be mario@181: * used in safety-critical situations without a full and competent review. mario@181: */ mario@181: mario@181: /* mario@181: * An IEC 61131-3 IL and ST compiler. mario@181: * mario@181: * Based on the mario@181: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) mario@181: * mario@181: */ mario@181: mario@181: /**** mario@181: * IEC 61131-3 standard function library mario@181: * generated code, do not edit by hand mario@181: */ mario@181: mario@181: mario@181: mario@181: void *compute_standard_function_default(function_invocation_c *st_symbol = NULL, il_formal_funct_call_c *il_symbol = NULL) { mario@181: function_type_t current_function_type; mario@181: function_call_param_iterator_c *tmp_function_call_param_iterator; mario@181: if (st_symbol != NULL && il_symbol == NULL) { mario@181: current_function_type = get_function_type((identifier_c *)st_symbol->function_name); mario@181: tmp_function_call_param_iterator = new function_call_param_iterator_c(st_symbol); mario@181: } mario@181: else if (st_symbol == NULL && il_symbol != NULL) { mario@181: current_function_type = get_function_type((identifier_c *)il_symbol->function_name); mario@181: tmp_function_call_param_iterator = new function_call_param_iterator_c(il_symbol); mario@181: } mario@181: else mario@181: ERROR; mario@181: function_call_param_iterator_c function_call_param_iterator(*tmp_function_call_param_iterator); mario@181: search_expression_type_c* search_expression_type = this; mario@181: mario@181: switch(current_function_type){ mario@181: mario@181: /**** mario@181: *REAL_TO_SINT mario@181: */ mario@181: case function_real_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LINT mario@181: */ mario@181: case function_real_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DINT mario@181: */ mario@181: case function_real_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DATE mario@181: */ mario@181: case function_real_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DWORD mario@181: */ mario@181: case function_real_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DT mario@181: */ mario@181: case function_real_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_TOD mario@181: */ mario@181: case function_real_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_UDINT mario@181: */ mario@181: case function_real_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_WORD mario@181: */ mario@181: case function_real_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_STRING mario@181: */ mario@181: case function_real_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LWORD mario@181: */ mario@181: case function_real_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_UINT mario@181: */ mario@181: case function_real_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LREAL mario@181: */ mario@181: case function_real_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_BYTE mario@181: */ mario@181: case function_real_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_USINT mario@181: */ mario@181: case function_real_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_ULINT mario@181: */ mario@181: case function_real_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_BOOL mario@181: */ mario@181: case function_real_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_TIME mario@181: */ mario@181: case function_real_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_INT mario@181: */ mario@181: case function_real_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_REAL mario@181: */ mario@181: case function_sint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LINT mario@181: */ mario@181: case function_sint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DINT mario@181: */ mario@181: case function_sint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DATE mario@181: */ mario@181: case function_sint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DWORD mario@181: */ mario@181: case function_sint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DT mario@181: */ mario@181: case function_sint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_TOD mario@181: */ mario@181: case function_sint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_UDINT mario@181: */ mario@181: case function_sint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_WORD mario@181: */ mario@181: case function_sint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_STRING mario@181: */ mario@181: case function_sint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LWORD mario@181: */ mario@181: case function_sint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_UINT mario@181: */ mario@181: case function_sint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LREAL mario@181: */ mario@181: case function_sint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_BYTE mario@181: */ mario@181: case function_sint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_USINT mario@181: */ mario@181: case function_sint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_ULINT mario@181: */ mario@181: case function_sint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_BOOL mario@181: */ mario@181: case function_sint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_TIME mario@181: */ mario@181: case function_sint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_INT mario@181: */ mario@181: case function_sint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_REAL mario@181: */ mario@181: case function_lint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_SINT mario@181: */ mario@181: case function_lint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DINT mario@181: */ mario@181: case function_lint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DATE mario@181: */ mario@181: case function_lint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DWORD mario@181: */ mario@181: case function_lint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DT mario@181: */ mario@181: case function_lint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_TOD mario@181: */ mario@181: case function_lint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_UDINT mario@181: */ mario@181: case function_lint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_WORD mario@181: */ mario@181: case function_lint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_STRING mario@181: */ mario@181: case function_lint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_LWORD mario@181: */ mario@181: case function_lint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_UINT mario@181: */ mario@181: case function_lint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_LREAL mario@181: */ mario@181: case function_lint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_BYTE mario@181: */ mario@181: case function_lint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_USINT mario@181: */ mario@181: case function_lint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_ULINT mario@181: */ mario@181: case function_lint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_BOOL mario@181: */ mario@181: case function_lint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_TIME mario@181: */ mario@181: case function_lint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_INT mario@181: */ mario@181: case function_lint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_REAL mario@181: */ mario@181: case function_dint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_SINT mario@181: */ mario@181: case function_dint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LINT mario@181: */ mario@181: case function_dint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DATE mario@181: */ mario@181: case function_dint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DWORD mario@181: */ mario@181: case function_dint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DT mario@181: */ mario@181: case function_dint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_TOD mario@181: */ mario@181: case function_dint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_UDINT mario@181: */ mario@181: case function_dint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_WORD mario@181: */ mario@181: case function_dint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_STRING mario@181: */ mario@181: case function_dint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LWORD mario@181: */ mario@181: case function_dint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_UINT mario@181: */ mario@181: case function_dint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LREAL mario@181: */ mario@181: case function_dint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_BYTE mario@181: */ mario@181: case function_dint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_USINT mario@181: */ mario@181: case function_dint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_ULINT mario@181: */ mario@181: case function_dint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_BOOL mario@181: */ mario@181: case function_dint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_TIME mario@181: */ mario@181: case function_dint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_INT mario@181: */ mario@181: case function_dint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_REAL mario@181: */ mario@181: case function_date_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_SINT mario@181: */ mario@181: case function_date_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LINT mario@181: */ mario@181: case function_date_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_DINT mario@181: */ mario@181: case function_date_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_DWORD mario@181: */ mario@181: case function_date_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_UDINT mario@181: */ mario@181: case function_date_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_WORD mario@181: */ mario@181: case function_date_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_STRING mario@181: */ mario@181: case function_date_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LWORD mario@181: */ mario@181: case function_date_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_UINT mario@181: */ mario@181: case function_date_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LREAL mario@181: */ mario@181: case function_date_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_BYTE mario@181: */ mario@181: case function_date_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_USINT mario@181: */ mario@181: case function_date_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_ULINT mario@181: */ mario@181: case function_date_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_INT mario@181: */ mario@181: case function_date_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_REAL mario@181: */ mario@181: case function_dword_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_SINT mario@181: */ mario@181: case function_dword_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LINT mario@181: */ mario@181: case function_dword_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DINT mario@181: */ mario@181: case function_dword_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DATE mario@181: */ mario@181: case function_dword_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DT mario@181: */ mario@181: case function_dword_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_TOD mario@181: */ mario@181: case function_dword_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_UDINT mario@181: */ mario@181: case function_dword_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_WORD mario@181: */ mario@181: case function_dword_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_STRING mario@181: */ mario@181: case function_dword_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LWORD mario@181: */ mario@181: case function_dword_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_UINT mario@181: */ mario@181: case function_dword_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LREAL mario@181: */ mario@181: case function_dword_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_BYTE mario@181: */ mario@181: case function_dword_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_USINT mario@181: */ mario@181: case function_dword_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_ULINT mario@181: */ mario@181: case function_dword_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_BOOL mario@181: */ mario@181: case function_dword_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_TIME mario@181: */ mario@181: case function_dword_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_INT mario@181: */ mario@181: case function_dword_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_REAL mario@181: */ mario@181: case function_dt_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_SINT mario@181: */ mario@181: case function_dt_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LINT mario@181: */ mario@181: case function_dt_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_DINT mario@181: */ mario@181: case function_dt_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_DWORD mario@181: */ mario@181: case function_dt_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_UDINT mario@181: */ mario@181: case function_dt_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_WORD mario@181: */ mario@181: case function_dt_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_STRING mario@181: */ mario@181: case function_dt_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LWORD mario@181: */ mario@181: case function_dt_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_UINT mario@181: */ mario@181: case function_dt_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LREAL mario@181: */ mario@181: case function_dt_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_BYTE mario@181: */ mario@181: case function_dt_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_USINT mario@181: */ mario@181: case function_dt_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_ULINT mario@181: */ mario@181: case function_dt_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_INT mario@181: */ mario@181: case function_dt_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_REAL mario@181: */ mario@181: case function_tod_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_SINT mario@181: */ mario@181: case function_tod_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LINT mario@181: */ mario@181: case function_tod_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_DINT mario@181: */ mario@181: case function_tod_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_DWORD mario@181: */ mario@181: case function_tod_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_UDINT mario@181: */ mario@181: case function_tod_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_WORD mario@181: */ mario@181: case function_tod_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_STRING mario@181: */ mario@181: case function_tod_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LWORD mario@181: */ mario@181: case function_tod_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_UINT mario@181: */ mario@181: case function_tod_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LREAL mario@181: */ mario@181: case function_tod_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_BYTE mario@181: */ mario@181: case function_tod_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_USINT mario@181: */ mario@181: case function_tod_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_ULINT mario@181: */ mario@181: case function_tod_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_INT mario@181: */ mario@181: case function_tod_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_REAL mario@181: */ mario@181: case function_udint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_SINT mario@181: */ mario@181: case function_udint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LINT mario@181: */ mario@181: case function_udint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DINT mario@181: */ mario@181: case function_udint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DATE mario@181: */ mario@181: case function_udint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DWORD mario@181: */ mario@181: case function_udint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DT mario@181: */ mario@181: case function_udint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_TOD mario@181: */ mario@181: case function_udint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_WORD mario@181: */ mario@181: case function_udint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_STRING mario@181: */ mario@181: case function_udint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LWORD mario@181: */ mario@181: case function_udint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_UINT mario@181: */ mario@181: case function_udint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LREAL mario@181: */ mario@181: case function_udint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BYTE mario@181: */ mario@181: case function_udint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_USINT mario@181: */ mario@181: case function_udint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_ULINT mario@181: */ mario@181: case function_udint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BOOL mario@181: */ mario@181: case function_udint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_TIME mario@181: */ mario@181: case function_udint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_INT mario@181: */ mario@181: case function_udint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_REAL mario@181: */ mario@181: case function_word_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_SINT mario@181: */ mario@181: case function_word_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LINT mario@181: */ mario@181: case function_word_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DINT mario@181: */ mario@181: case function_word_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DATE mario@181: */ mario@181: case function_word_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DWORD mario@181: */ mario@181: case function_word_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DT mario@181: */ mario@181: case function_word_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_TOD mario@181: */ mario@181: case function_word_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_UDINT mario@181: */ mario@181: case function_word_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_STRING mario@181: */ mario@181: case function_word_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LWORD mario@181: */ mario@181: case function_word_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_UINT mario@181: */ mario@181: case function_word_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LREAL mario@181: */ mario@181: case function_word_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_BYTE mario@181: */ mario@181: case function_word_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_USINT mario@181: */ mario@181: case function_word_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_ULINT mario@181: */ mario@181: case function_word_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_BOOL mario@181: */ mario@181: case function_word_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_TIME mario@181: */ mario@181: case function_word_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_INT mario@181: */ mario@181: case function_word_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_REAL mario@181: */ mario@181: case function_string_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_SINT mario@181: */ mario@181: case function_string_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LINT mario@181: */ mario@181: case function_string_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DINT mario@181: */ mario@181: case function_string_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DATE mario@181: */ mario@181: case function_string_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DWORD mario@181: */ mario@181: case function_string_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DT mario@181: */ mario@181: case function_string_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_TOD mario@181: */ mario@181: case function_string_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_UDINT mario@181: */ mario@181: case function_string_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_WORD mario@181: */ mario@181: case function_string_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LWORD mario@181: */ mario@181: case function_string_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_UINT mario@181: */ mario@181: case function_string_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LREAL mario@181: */ mario@181: case function_string_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_BYTE mario@181: */ mario@181: case function_string_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_USINT mario@181: */ mario@181: case function_string_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_ULINT mario@181: */ mario@181: case function_string_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_BOOL mario@181: */ mario@181: case function_string_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_TIME mario@181: */ mario@181: case function_string_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_INT mario@181: */ mario@181: case function_string_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_REAL mario@181: */ mario@181: case function_lword_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_SINT mario@181: */ mario@181: case function_lword_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_LINT mario@181: */ mario@181: case function_lword_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DINT mario@181: */ mario@181: case function_lword_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DATE mario@181: */ mario@181: case function_lword_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DWORD mario@181: */ mario@181: case function_lword_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DT mario@181: */ mario@181: case function_lword_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_TOD mario@181: */ mario@181: case function_lword_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_UDINT mario@181: */ mario@181: case function_lword_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_WORD mario@181: */ mario@181: case function_lword_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_STRING mario@181: */ mario@181: case function_lword_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_UINT mario@181: */ mario@181: case function_lword_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_LREAL mario@181: */ mario@181: case function_lword_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_BYTE mario@181: */ mario@181: case function_lword_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_USINT mario@181: */ mario@181: case function_lword_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_ULINT mario@181: */ mario@181: case function_lword_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_BOOL mario@181: */ mario@181: case function_lword_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_TIME mario@181: */ mario@181: case function_lword_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_INT mario@181: */ mario@181: case function_lword_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_REAL mario@181: */ mario@181: case function_uint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_SINT mario@181: */ mario@181: case function_uint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LINT mario@181: */ mario@181: case function_uint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DINT mario@181: */ mario@181: case function_uint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DATE mario@181: */ mario@181: case function_uint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DWORD mario@181: */ mario@181: case function_uint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DT mario@181: */ mario@181: case function_uint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_TOD mario@181: */ mario@181: case function_uint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_UDINT mario@181: */ mario@181: case function_uint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_WORD mario@181: */ mario@181: case function_uint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_STRING mario@181: */ mario@181: case function_uint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LWORD mario@181: */ mario@181: case function_uint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LREAL mario@181: */ mario@181: case function_uint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BYTE mario@181: */ mario@181: case function_uint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_USINT mario@181: */ mario@181: case function_uint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_ULINT mario@181: */ mario@181: case function_uint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BOOL mario@181: */ mario@181: case function_uint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_TIME mario@181: */ mario@181: case function_uint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_INT mario@181: */ mario@181: case function_uint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_REAL mario@181: */ mario@181: case function_lreal_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_SINT mario@181: */ mario@181: case function_lreal_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_LINT mario@181: */ mario@181: case function_lreal_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DINT mario@181: */ mario@181: case function_lreal_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DATE mario@181: */ mario@181: case function_lreal_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DWORD mario@181: */ mario@181: case function_lreal_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DT mario@181: */ mario@181: case function_lreal_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_TOD mario@181: */ mario@181: case function_lreal_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_UDINT mario@181: */ mario@181: case function_lreal_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_WORD mario@181: */ mario@181: case function_lreal_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_STRING mario@181: */ mario@181: case function_lreal_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_LWORD mario@181: */ mario@181: case function_lreal_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_UINT mario@181: */ mario@181: case function_lreal_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_BYTE mario@181: */ mario@181: case function_lreal_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_USINT mario@181: */ mario@181: case function_lreal_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_ULINT mario@181: */ mario@181: case function_lreal_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_BOOL mario@181: */ mario@181: case function_lreal_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_TIME mario@181: */ mario@181: case function_lreal_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_INT mario@181: */ mario@181: case function_lreal_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_REAL mario@181: */ mario@181: case function_byte_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_SINT mario@181: */ mario@181: case function_byte_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LINT mario@181: */ mario@181: case function_byte_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DINT mario@181: */ mario@181: case function_byte_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DATE mario@181: */ mario@181: case function_byte_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DWORD mario@181: */ mario@181: case function_byte_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DT mario@181: */ mario@181: case function_byte_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_TOD mario@181: */ mario@181: case function_byte_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_UDINT mario@181: */ mario@181: case function_byte_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_WORD mario@181: */ mario@181: case function_byte_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_STRING mario@181: */ mario@181: case function_byte_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LWORD mario@181: */ mario@181: case function_byte_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_UINT mario@181: */ mario@181: case function_byte_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LREAL mario@181: */ mario@181: case function_byte_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_USINT mario@181: */ mario@181: case function_byte_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_ULINT mario@181: */ mario@181: case function_byte_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_BOOL mario@181: */ mario@181: case function_byte_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_TIME mario@181: */ mario@181: case function_byte_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_INT mario@181: */ mario@181: case function_byte_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_REAL mario@181: */ mario@181: case function_usint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_SINT mario@181: */ mario@181: case function_usint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LINT mario@181: */ mario@181: case function_usint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DINT mario@181: */ mario@181: case function_usint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DATE mario@181: */ mario@181: case function_usint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DWORD mario@181: */ mario@181: case function_usint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DT mario@181: */ mario@181: case function_usint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_TOD mario@181: */ mario@181: case function_usint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_UDINT mario@181: */ mario@181: case function_usint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_WORD mario@181: */ mario@181: case function_usint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_STRING mario@181: */ mario@181: case function_usint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LWORD mario@181: */ mario@181: case function_usint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_UINT mario@181: */ mario@181: case function_usint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LREAL mario@181: */ mario@181: case function_usint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BYTE mario@181: */ mario@181: case function_usint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_ULINT mario@181: */ mario@181: case function_usint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BOOL mario@181: */ mario@181: case function_usint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_TIME mario@181: */ mario@181: case function_usint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_INT mario@181: */ mario@181: case function_usint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_REAL mario@181: */ mario@181: case function_ulint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_SINT mario@181: */ mario@181: case function_ulint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LINT mario@181: */ mario@181: case function_ulint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DINT mario@181: */ mario@181: case function_ulint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DATE mario@181: */ mario@181: case function_ulint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DWORD mario@181: */ mario@181: case function_ulint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DT mario@181: */ mario@181: case function_ulint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_TOD mario@181: */ mario@181: case function_ulint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_UDINT mario@181: */ mario@181: case function_ulint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_WORD mario@181: */ mario@181: case function_ulint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_STRING mario@181: */ mario@181: case function_ulint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LWORD mario@181: */ mario@181: case function_ulint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_UINT mario@181: */ mario@181: case function_ulint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LREAL mario@181: */ mario@181: case function_ulint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BYTE mario@181: */ mario@181: case function_ulint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_USINT mario@181: */ mario@181: case function_ulint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BOOL mario@181: */ mario@181: case function_ulint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_TIME mario@181: */ mario@181: case function_ulint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_INT mario@181: */ mario@181: case function_ulint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_REAL mario@181: */ mario@181: case function_bool_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_SINT mario@181: */ mario@181: case function_bool_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LINT mario@181: */ mario@181: case function_bool_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DINT mario@181: */ mario@181: case function_bool_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DATE mario@181: */ mario@181: case function_bool_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DWORD mario@181: */ mario@181: case function_bool_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DT mario@181: */ mario@181: case function_bool_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_TOD mario@181: */ mario@181: case function_bool_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_UDINT mario@181: */ mario@181: case function_bool_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_WORD mario@181: */ mario@181: case function_bool_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_STRING mario@181: */ mario@181: case function_bool_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LWORD mario@181: */ mario@181: case function_bool_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_UINT mario@181: */ mario@181: case function_bool_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LREAL mario@181: */ mario@181: case function_bool_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_BYTE mario@181: */ mario@181: case function_bool_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_USINT mario@181: */ mario@181: case function_bool_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_ULINT mario@181: */ mario@181: case function_bool_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_TIME mario@181: */ mario@181: case function_bool_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_INT mario@181: */ mario@181: case function_bool_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_REAL mario@181: */ mario@181: case function_time_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_SINT mario@181: */ mario@181: case function_time_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LINT mario@181: */ mario@181: case function_time_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_DINT mario@181: */ mario@181: case function_time_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_DWORD mario@181: */ mario@181: case function_time_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_UDINT mario@181: */ mario@181: case function_time_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_WORD mario@181: */ mario@181: case function_time_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_STRING mario@181: */ mario@181: case function_time_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LWORD mario@181: */ mario@181: case function_time_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_UINT mario@181: */ mario@181: case function_time_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LREAL mario@181: */ mario@181: case function_time_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_BYTE mario@181: */ mario@181: case function_time_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_USINT mario@181: */ mario@181: case function_time_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_ULINT mario@181: */ mario@181: case function_time_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_INT mario@181: */ mario@181: case function_time_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_REAL mario@181: */ mario@181: case function_int_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_SINT mario@181: */ mario@181: case function_int_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LINT mario@181: */ mario@181: case function_int_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DINT mario@181: */ mario@181: case function_int_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DATE mario@181: */ mario@181: case function_int_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DWORD mario@181: */ mario@181: case function_int_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DT mario@181: */ mario@181: case function_int_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_TOD mario@181: */ mario@181: case function_int_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_UDINT mario@181: */ mario@181: case function_int_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_WORD mario@181: */ mario@181: case function_int_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_STRING mario@181: */ mario@181: case function_int_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LWORD mario@181: */ mario@181: case function_int_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_UINT mario@181: */ mario@181: case function_int_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LREAL mario@181: */ mario@181: case function_int_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_BYTE mario@181: */ mario@181: case function_int_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_USINT mario@181: */ mario@181: case function_int_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_ULINT mario@181: */ mario@181: case function_int_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_BOOL mario@181: */ mario@181: case function_int_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_TIME mario@181: */ mario@181: case function_int_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TRUNC mario@181: */ mario@181: case function_trunc : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_trunc*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_UDINT mario@181: */ mario@181: case function_bcd_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_UINT mario@181: */ mario@181: case function_bcd_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_ULINT mario@181: */ mario@181: case function_bcd_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_USINT mario@181: */ mario@181: case function_bcd_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BCD mario@181: */ mario@181: case function_udint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BCD mario@181: */ mario@181: case function_uint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BCD mario@181: */ mario@181: case function_usint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BCD mario@181: */ mario@181: case function_ulint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_AND_TIME_TO_TIME_OF_DAY mario@181: */ mario@181: case function_date_and_time_to_time_of_day : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_and_time_to_time_of_day*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_AND_TIME_TO_DATE mario@181: */ mario@181: case function_date_and_time_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_and_time_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ABS mario@181: */ mario@181: case function_abs : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_abs*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SQRT mario@181: */ mario@181: case function_sqrt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sqrt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LN mario@181: */ mario@181: case function_ln : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ln*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LOG mario@181: */ mario@181: case function_log : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_log*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EXP mario@181: */ mario@181: case function_exp : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_exp*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SIN mario@181: */ mario@181: case function_sin : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sin*/ mario@181: break; mario@181: mario@181: /**** mario@181: *COS mario@181: */ mario@181: case function_cos : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_cos*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TAN mario@181: */ mario@181: case function_tan : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tan*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ASIN mario@181: */ mario@181: case function_asin : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_asin*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ACOS mario@181: */ mario@181: case function_acos : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_acos*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ATAN mario@181: */ mario@181: case function_atan : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_atan*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ADD mario@181: */ mario@181: case function_add : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_add*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MUL mario@181: */ mario@181: case function_mul : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mul*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SUB mario@181: */ mario@181: case function_sub : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sub*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DIV mario@181: */ mario@181: case function_div : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_div*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MOD mario@181: */ mario@181: case function_mod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EXPT mario@181: */ mario@181: case function_expt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_expt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MOVE mario@181: */ mario@181: case function_move : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_move*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SHL mario@181: */ mario@181: case function_shl : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_shl*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SHR mario@181: */ mario@181: case function_shr : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_shr*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ROR mario@181: */ mario@181: case function_ror : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ror*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ROL mario@181: */ mario@181: case function_rol : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_rol*/ mario@181: break; mario@181: mario@181: /**** mario@181: *AND mario@181: */ mario@181: case function_and : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_and*/ mario@181: break; mario@181: mario@181: /**** mario@181: *OR mario@181: */ mario@181: case function_or : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_or*/ mario@181: break; mario@181: mario@181: /**** mario@181: *XOR mario@181: */ mario@181: case function_xor : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_xor*/ mario@181: break; mario@181: mario@181: /**** mario@181: *NOT mario@181: */ mario@181: case function_not : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_not*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SEL mario@181: */ mario@181: case function_sel : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("G"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *G_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *G_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (G_param_value == NULL) mario@181: G_param_value = function_call_param_iterator.next(); mario@181: if (G_param_value != NULL) { mario@181: G_type_symbol = search_expression_type->get_type(G_param_value); mario@181: last_type_symbol = last_type_symbol && G_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 ; mario@181: } mario@181: mario@181: if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN0"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN0_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN0_param_value == NULL) mario@181: IN0_param_value = function_call_param_iterator.next(); mario@181: if (IN0_param_value != NULL) { mario@181: IN0_type_symbol = search_expression_type->get_type(IN0_param_value); mario@181: last_type_symbol = last_type_symbol && IN0_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sel*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MAX mario@181: */ mario@181: case function_max : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_max*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MIN mario@181: */ mario@181: case function_min : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_min*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LIMIT mario@181: */ mario@181: case function_limit : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("MN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *MN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *MN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (MN_param_value == NULL) mario@181: MN_param_value = function_call_param_iterator.next(); mario@181: if (MN_param_value != NULL) { mario@181: MN_type_symbol = search_expression_type->get_type(MN_param_value); mario@181: last_type_symbol = last_type_symbol && MN_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("MX"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *MX_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (MX_param_value == NULL) mario@181: MX_param_value = function_call_param_iterator.next(); mario@181: if (MX_param_value != NULL) { mario@181: MX_type_symbol = search_expression_type->get_type(MX_param_value); mario@181: last_type_symbol = last_type_symbol && MX_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_limit*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MUX mario@181: */ mario@181: case function_mux : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("K"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *K_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *K_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (K_param_value == NULL) mario@181: K_param_value = function_call_param_iterator.next(); mario@181: if (K_param_value != NULL) { mario@181: K_type_symbol = search_expression_type->get_type(K_param_value); mario@181: last_type_symbol = last_type_symbol && K_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 ; mario@181: } mario@181: mario@181: if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN0"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN0_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN0_param_value == NULL) mario@181: IN0_param_value = function_call_param_iterator.next(); mario@181: if (IN0_param_value != NULL) { mario@181: IN0_type_symbol = search_expression_type->get_type(IN0_param_value); mario@181: last_type_symbol = last_type_symbol && IN0_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mux*/ mario@181: break; mario@181: mario@181: /**** mario@181: *GT mario@181: */ mario@181: case function_gt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_gt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *GE mario@181: */ mario@181: case function_ge : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ge*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EQ mario@181: */ mario@181: case function_eq : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_eq*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LT mario@181: */ mario@181: case function_lt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LE mario@181: */ mario@181: case function_le : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_le*/ mario@181: break; mario@181: mario@181: /**** mario@181: *NE mario@181: */ mario@181: case function_ne : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ne*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LEN mario@181: */ mario@181: case function_len : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_len*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LEFT mario@181: */ mario@181: case function_left : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_left*/ mario@181: break; mario@181: mario@181: /**** mario@181: *RIGHT mario@181: */ mario@181: case function_right : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_right*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MID mario@181: */ mario@181: case function_mid : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mid*/ mario@181: break; mario@181: mario@181: /**** mario@181: *CONCAT mario@181: */ mario@181: case function_concat : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_concat*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INSERT mario@181: */ mario@181: case function_insert : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_insert*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DELETE mario@181: */ mario@181: case function_delete : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_delete*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REPLACE mario@181: */ mario@181: case function_replace : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_replace*/ mario@181: break; mario@181: mario@181: /**** mario@181: *FIND mario@181: */ mario@181: case function_find : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_find*/ mario@181: break; mario@181: mario@181: case function_none : mario@181: ERROR; mario@181: } mario@181: return NULL; mario@181: } mario@181: mario@181: void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type) { mario@181: mario@181: function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name); mario@181: function_call_param_iterator_c function_call_param_iterator(symbol); mario@181: search_expression_type_c* search_expression_type = this; mario@181: mario@181: switch(current_function_type){ mario@181: mario@181: /**** mario@181: *REAL_TO_SINT mario@181: */ mario@181: case function_real_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LINT mario@181: */ mario@181: case function_real_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DINT mario@181: */ mario@181: case function_real_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DATE mario@181: */ mario@181: case function_real_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DWORD mario@181: */ mario@181: case function_real_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_DT mario@181: */ mario@181: case function_real_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_TOD mario@181: */ mario@181: case function_real_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_UDINT mario@181: */ mario@181: case function_real_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_WORD mario@181: */ mario@181: case function_real_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_STRING mario@181: */ mario@181: case function_real_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LWORD mario@181: */ mario@181: case function_real_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_UINT mario@181: */ mario@181: case function_real_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_LREAL mario@181: */ mario@181: case function_real_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_BYTE mario@181: */ mario@181: case function_real_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_USINT mario@181: */ mario@181: case function_real_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_ULINT mario@181: */ mario@181: case function_real_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_BOOL mario@181: */ mario@181: case function_real_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_TIME mario@181: */ mario@181: case function_real_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REAL_TO_INT mario@181: */ mario@181: case function_real_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_real_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_REAL mario@181: */ mario@181: case function_sint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LINT mario@181: */ mario@181: case function_sint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DINT mario@181: */ mario@181: case function_sint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DATE mario@181: */ mario@181: case function_sint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DWORD mario@181: */ mario@181: case function_sint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_DT mario@181: */ mario@181: case function_sint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_TOD mario@181: */ mario@181: case function_sint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_UDINT mario@181: */ mario@181: case function_sint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_WORD mario@181: */ mario@181: case function_sint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_STRING mario@181: */ mario@181: case function_sint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LWORD mario@181: */ mario@181: case function_sint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_UINT mario@181: */ mario@181: case function_sint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_LREAL mario@181: */ mario@181: case function_sint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_BYTE mario@181: */ mario@181: case function_sint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_USINT mario@181: */ mario@181: case function_sint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_ULINT mario@181: */ mario@181: case function_sint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_BOOL mario@181: */ mario@181: case function_sint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_TIME mario@181: */ mario@181: case function_sint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SINT_TO_INT mario@181: */ mario@181: case function_sint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_REAL mario@181: */ mario@181: case function_lint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_SINT mario@181: */ mario@181: case function_lint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DINT mario@181: */ mario@181: case function_lint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DATE mario@181: */ mario@181: case function_lint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DWORD mario@181: */ mario@181: case function_lint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_DT mario@181: */ mario@181: case function_lint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_TOD mario@181: */ mario@181: case function_lint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_UDINT mario@181: */ mario@181: case function_lint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_WORD mario@181: */ mario@181: case function_lint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_STRING mario@181: */ mario@181: case function_lint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_LWORD mario@181: */ mario@181: case function_lint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_UINT mario@181: */ mario@181: case function_lint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_LREAL mario@181: */ mario@181: case function_lint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_BYTE mario@181: */ mario@181: case function_lint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_USINT mario@181: */ mario@181: case function_lint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_ULINT mario@181: */ mario@181: case function_lint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_BOOL mario@181: */ mario@181: case function_lint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_TIME mario@181: */ mario@181: case function_lint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LINT_TO_INT mario@181: */ mario@181: case function_lint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_REAL mario@181: */ mario@181: case function_dint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_SINT mario@181: */ mario@181: case function_dint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LINT mario@181: */ mario@181: case function_dint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DATE mario@181: */ mario@181: case function_dint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DWORD mario@181: */ mario@181: case function_dint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_DT mario@181: */ mario@181: case function_dint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_TOD mario@181: */ mario@181: case function_dint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_UDINT mario@181: */ mario@181: case function_dint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_WORD mario@181: */ mario@181: case function_dint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_STRING mario@181: */ mario@181: case function_dint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LWORD mario@181: */ mario@181: case function_dint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_UINT mario@181: */ mario@181: case function_dint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_LREAL mario@181: */ mario@181: case function_dint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_BYTE mario@181: */ mario@181: case function_dint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_USINT mario@181: */ mario@181: case function_dint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_ULINT mario@181: */ mario@181: case function_dint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_BOOL mario@181: */ mario@181: case function_dint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_TIME mario@181: */ mario@181: case function_dint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DINT_TO_INT mario@181: */ mario@181: case function_dint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_REAL mario@181: */ mario@181: case function_date_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_SINT mario@181: */ mario@181: case function_date_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LINT mario@181: */ mario@181: case function_date_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_DINT mario@181: */ mario@181: case function_date_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_DWORD mario@181: */ mario@181: case function_date_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_UDINT mario@181: */ mario@181: case function_date_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_WORD mario@181: */ mario@181: case function_date_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_STRING mario@181: */ mario@181: case function_date_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LWORD mario@181: */ mario@181: case function_date_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_UINT mario@181: */ mario@181: case function_date_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_LREAL mario@181: */ mario@181: case function_date_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_BYTE mario@181: */ mario@181: case function_date_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_USINT mario@181: */ mario@181: case function_date_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_ULINT mario@181: */ mario@181: case function_date_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_TO_INT mario@181: */ mario@181: case function_date_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_REAL mario@181: */ mario@181: case function_dword_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_SINT mario@181: */ mario@181: case function_dword_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LINT mario@181: */ mario@181: case function_dword_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DINT mario@181: */ mario@181: case function_dword_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DATE mario@181: */ mario@181: case function_dword_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_DT mario@181: */ mario@181: case function_dword_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_TOD mario@181: */ mario@181: case function_dword_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_UDINT mario@181: */ mario@181: case function_dword_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_WORD mario@181: */ mario@181: case function_dword_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_STRING mario@181: */ mario@181: case function_dword_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LWORD mario@181: */ mario@181: case function_dword_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_UINT mario@181: */ mario@181: case function_dword_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_LREAL mario@181: */ mario@181: case function_dword_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_BYTE mario@181: */ mario@181: case function_dword_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_USINT mario@181: */ mario@181: case function_dword_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_ULINT mario@181: */ mario@181: case function_dword_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_BOOL mario@181: */ mario@181: case function_dword_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_TIME mario@181: */ mario@181: case function_dword_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DWORD_TO_INT mario@181: */ mario@181: case function_dword_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dword_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_REAL mario@181: */ mario@181: case function_dt_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_SINT mario@181: */ mario@181: case function_dt_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LINT mario@181: */ mario@181: case function_dt_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_DINT mario@181: */ mario@181: case function_dt_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_DWORD mario@181: */ mario@181: case function_dt_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_UDINT mario@181: */ mario@181: case function_dt_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_WORD mario@181: */ mario@181: case function_dt_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_STRING mario@181: */ mario@181: case function_dt_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LWORD mario@181: */ mario@181: case function_dt_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_UINT mario@181: */ mario@181: case function_dt_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_LREAL mario@181: */ mario@181: case function_dt_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_BYTE mario@181: */ mario@181: case function_dt_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_USINT mario@181: */ mario@181: case function_dt_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_ULINT mario@181: */ mario@181: case function_dt_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DT_TO_INT mario@181: */ mario@181: case function_dt_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_dt_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_REAL mario@181: */ mario@181: case function_tod_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_SINT mario@181: */ mario@181: case function_tod_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LINT mario@181: */ mario@181: case function_tod_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_DINT mario@181: */ mario@181: case function_tod_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_DWORD mario@181: */ mario@181: case function_tod_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_UDINT mario@181: */ mario@181: case function_tod_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_WORD mario@181: */ mario@181: case function_tod_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_STRING mario@181: */ mario@181: case function_tod_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LWORD mario@181: */ mario@181: case function_tod_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_UINT mario@181: */ mario@181: case function_tod_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_LREAL mario@181: */ mario@181: case function_tod_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_BYTE mario@181: */ mario@181: case function_tod_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_USINT mario@181: */ mario@181: case function_tod_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_ULINT mario@181: */ mario@181: case function_tod_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TOD_TO_INT mario@181: */ mario@181: case function_tod_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tod_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_REAL mario@181: */ mario@181: case function_udint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_SINT mario@181: */ mario@181: case function_udint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LINT mario@181: */ mario@181: case function_udint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DINT mario@181: */ mario@181: case function_udint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DATE mario@181: */ mario@181: case function_udint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DWORD mario@181: */ mario@181: case function_udint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_DT mario@181: */ mario@181: case function_udint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_TOD mario@181: */ mario@181: case function_udint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_WORD mario@181: */ mario@181: case function_udint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_STRING mario@181: */ mario@181: case function_udint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LWORD mario@181: */ mario@181: case function_udint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_UINT mario@181: */ mario@181: case function_udint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_LREAL mario@181: */ mario@181: case function_udint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BYTE mario@181: */ mario@181: case function_udint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_USINT mario@181: */ mario@181: case function_udint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_ULINT mario@181: */ mario@181: case function_udint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BOOL mario@181: */ mario@181: case function_udint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_TIME mario@181: */ mario@181: case function_udint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_INT mario@181: */ mario@181: case function_udint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_REAL mario@181: */ mario@181: case function_word_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_SINT mario@181: */ mario@181: case function_word_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LINT mario@181: */ mario@181: case function_word_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DINT mario@181: */ mario@181: case function_word_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DATE mario@181: */ mario@181: case function_word_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DWORD mario@181: */ mario@181: case function_word_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_DT mario@181: */ mario@181: case function_word_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_TOD mario@181: */ mario@181: case function_word_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_UDINT mario@181: */ mario@181: case function_word_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_STRING mario@181: */ mario@181: case function_word_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LWORD mario@181: */ mario@181: case function_word_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_UINT mario@181: */ mario@181: case function_word_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_LREAL mario@181: */ mario@181: case function_word_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_BYTE mario@181: */ mario@181: case function_word_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_USINT mario@181: */ mario@181: case function_word_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_ULINT mario@181: */ mario@181: case function_word_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_BOOL mario@181: */ mario@181: case function_word_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_TIME mario@181: */ mario@181: case function_word_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *WORD_TO_INT mario@181: */ mario@181: case function_word_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_word_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_REAL mario@181: */ mario@181: case function_string_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_SINT mario@181: */ mario@181: case function_string_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LINT mario@181: */ mario@181: case function_string_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DINT mario@181: */ mario@181: case function_string_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DATE mario@181: */ mario@181: case function_string_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DWORD mario@181: */ mario@181: case function_string_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_DT mario@181: */ mario@181: case function_string_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_TOD mario@181: */ mario@181: case function_string_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_UDINT mario@181: */ mario@181: case function_string_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_WORD mario@181: */ mario@181: case function_string_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LWORD mario@181: */ mario@181: case function_string_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_UINT mario@181: */ mario@181: case function_string_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_LREAL mario@181: */ mario@181: case function_string_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_BYTE mario@181: */ mario@181: case function_string_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_USINT mario@181: */ mario@181: case function_string_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_ULINT mario@181: */ mario@181: case function_string_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_BOOL mario@181: */ mario@181: case function_string_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_TIME mario@181: */ mario@181: case function_string_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *STRING_TO_INT mario@181: */ mario@181: case function_string_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_string_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_REAL mario@181: */ mario@181: case function_lword_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_SINT mario@181: */ mario@181: case function_lword_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_LINT mario@181: */ mario@181: case function_lword_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DINT mario@181: */ mario@181: case function_lword_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DATE mario@181: */ mario@181: case function_lword_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DWORD mario@181: */ mario@181: case function_lword_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_DT mario@181: */ mario@181: case function_lword_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_TOD mario@181: */ mario@181: case function_lword_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_UDINT mario@181: */ mario@181: case function_lword_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_WORD mario@181: */ mario@181: case function_lword_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_STRING mario@181: */ mario@181: case function_lword_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_UINT mario@181: */ mario@181: case function_lword_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_LREAL mario@181: */ mario@181: case function_lword_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_BYTE mario@181: */ mario@181: case function_lword_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_USINT mario@181: */ mario@181: case function_lword_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_ULINT mario@181: */ mario@181: case function_lword_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_BOOL mario@181: */ mario@181: case function_lword_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_TIME mario@181: */ mario@181: case function_lword_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LWORD_TO_INT mario@181: */ mario@181: case function_lword_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lword_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_REAL mario@181: */ mario@181: case function_uint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_SINT mario@181: */ mario@181: case function_uint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LINT mario@181: */ mario@181: case function_uint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DINT mario@181: */ mario@181: case function_uint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DATE mario@181: */ mario@181: case function_uint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DWORD mario@181: */ mario@181: case function_uint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_DT mario@181: */ mario@181: case function_uint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_TOD mario@181: */ mario@181: case function_uint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_UDINT mario@181: */ mario@181: case function_uint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_WORD mario@181: */ mario@181: case function_uint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_STRING mario@181: */ mario@181: case function_uint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LWORD mario@181: */ mario@181: case function_uint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_LREAL mario@181: */ mario@181: case function_uint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BYTE mario@181: */ mario@181: case function_uint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_USINT mario@181: */ mario@181: case function_uint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_ULINT mario@181: */ mario@181: case function_uint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BOOL mario@181: */ mario@181: case function_uint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_TIME mario@181: */ mario@181: case function_uint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_INT mario@181: */ mario@181: case function_uint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_REAL mario@181: */ mario@181: case function_lreal_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_SINT mario@181: */ mario@181: case function_lreal_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_LINT mario@181: */ mario@181: case function_lreal_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DINT mario@181: */ mario@181: case function_lreal_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DATE mario@181: */ mario@181: case function_lreal_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DWORD mario@181: */ mario@181: case function_lreal_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_DT mario@181: */ mario@181: case function_lreal_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_TOD mario@181: */ mario@181: case function_lreal_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_UDINT mario@181: */ mario@181: case function_lreal_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_WORD mario@181: */ mario@181: case function_lreal_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_STRING mario@181: */ mario@181: case function_lreal_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_LWORD mario@181: */ mario@181: case function_lreal_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_UINT mario@181: */ mario@181: case function_lreal_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_BYTE mario@181: */ mario@181: case function_lreal_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_USINT mario@181: */ mario@181: case function_lreal_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_ULINT mario@181: */ mario@181: case function_lreal_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_BOOL mario@181: */ mario@181: case function_lreal_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_TIME mario@181: */ mario@181: case function_lreal_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LREAL_TO_INT mario@181: */ mario@181: case function_lreal_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lreal_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_REAL mario@181: */ mario@181: case function_byte_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_SINT mario@181: */ mario@181: case function_byte_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LINT mario@181: */ mario@181: case function_byte_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DINT mario@181: */ mario@181: case function_byte_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DATE mario@181: */ mario@181: case function_byte_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DWORD mario@181: */ mario@181: case function_byte_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_DT mario@181: */ mario@181: case function_byte_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_TOD mario@181: */ mario@181: case function_byte_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_UDINT mario@181: */ mario@181: case function_byte_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_WORD mario@181: */ mario@181: case function_byte_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_STRING mario@181: */ mario@181: case function_byte_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LWORD mario@181: */ mario@181: case function_byte_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_UINT mario@181: */ mario@181: case function_byte_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_LREAL mario@181: */ mario@181: case function_byte_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_USINT mario@181: */ mario@181: case function_byte_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_ULINT mario@181: */ mario@181: case function_byte_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_BOOL mario@181: */ mario@181: case function_byte_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_TIME mario@181: */ mario@181: case function_byte_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BYTE_TO_INT mario@181: */ mario@181: case function_byte_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_byte_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_REAL mario@181: */ mario@181: case function_usint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_SINT mario@181: */ mario@181: case function_usint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LINT mario@181: */ mario@181: case function_usint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DINT mario@181: */ mario@181: case function_usint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DATE mario@181: */ mario@181: case function_usint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DWORD mario@181: */ mario@181: case function_usint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_DT mario@181: */ mario@181: case function_usint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_TOD mario@181: */ mario@181: case function_usint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_UDINT mario@181: */ mario@181: case function_usint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_WORD mario@181: */ mario@181: case function_usint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_STRING mario@181: */ mario@181: case function_usint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LWORD mario@181: */ mario@181: case function_usint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_UINT mario@181: */ mario@181: case function_usint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_LREAL mario@181: */ mario@181: case function_usint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BYTE mario@181: */ mario@181: case function_usint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_ULINT mario@181: */ mario@181: case function_usint_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BOOL mario@181: */ mario@181: case function_usint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_TIME mario@181: */ mario@181: case function_usint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_INT mario@181: */ mario@181: case function_usint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_REAL mario@181: */ mario@181: case function_ulint_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_SINT mario@181: */ mario@181: case function_ulint_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LINT mario@181: */ mario@181: case function_ulint_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DINT mario@181: */ mario@181: case function_ulint_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DATE mario@181: */ mario@181: case function_ulint_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DWORD mario@181: */ mario@181: case function_ulint_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_DT mario@181: */ mario@181: case function_ulint_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_TOD mario@181: */ mario@181: case function_ulint_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_UDINT mario@181: */ mario@181: case function_ulint_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_WORD mario@181: */ mario@181: case function_ulint_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_STRING mario@181: */ mario@181: case function_ulint_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LWORD mario@181: */ mario@181: case function_ulint_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_UINT mario@181: */ mario@181: case function_ulint_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_LREAL mario@181: */ mario@181: case function_ulint_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BYTE mario@181: */ mario@181: case function_ulint_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_USINT mario@181: */ mario@181: case function_ulint_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BOOL mario@181: */ mario@181: case function_ulint_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_TIME mario@181: */ mario@181: case function_ulint_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_INT mario@181: */ mario@181: case function_ulint_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_REAL mario@181: */ mario@181: case function_bool_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_SINT mario@181: */ mario@181: case function_bool_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LINT mario@181: */ mario@181: case function_bool_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DINT mario@181: */ mario@181: case function_bool_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DATE mario@181: */ mario@181: case function_bool_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DWORD mario@181: */ mario@181: case function_bool_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_DT mario@181: */ mario@181: case function_bool_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_TOD mario@181: */ mario@181: case function_bool_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_UDINT mario@181: */ mario@181: case function_bool_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_WORD mario@181: */ mario@181: case function_bool_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_STRING mario@181: */ mario@181: case function_bool_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LWORD mario@181: */ mario@181: case function_bool_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_UINT mario@181: */ mario@181: case function_bool_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_LREAL mario@181: */ mario@181: case function_bool_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_BYTE mario@181: */ mario@181: case function_bool_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_USINT mario@181: */ mario@181: case function_bool_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_ULINT mario@181: */ mario@181: case function_bool_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_TIME mario@181: */ mario@181: case function_bool_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BOOL_TO_INT mario@181: */ mario@181: case function_bool_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bool_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_REAL mario@181: */ mario@181: case function_time_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_SINT mario@181: */ mario@181: case function_time_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LINT mario@181: */ mario@181: case function_time_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_DINT mario@181: */ mario@181: case function_time_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_DWORD mario@181: */ mario@181: case function_time_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_UDINT mario@181: */ mario@181: case function_time_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_WORD mario@181: */ mario@181: case function_time_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_STRING mario@181: */ mario@181: case function_time_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LWORD mario@181: */ mario@181: case function_time_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_UINT mario@181: */ mario@181: case function_time_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_LREAL mario@181: */ mario@181: case function_time_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_BYTE mario@181: */ mario@181: case function_time_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_USINT mario@181: */ mario@181: case function_time_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_ULINT mario@181: */ mario@181: case function_time_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TIME_TO_INT mario@181: */ mario@181: case function_time_to_int : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_time_to_int*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_REAL mario@181: */ mario@181: case function_int_to_real : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_real*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_SINT mario@181: */ mario@181: case function_int_to_sint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_sint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LINT mario@181: */ mario@181: case function_int_to_lint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DINT mario@181: */ mario@181: case function_int_to_dint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DATE mario@181: */ mario@181: case function_int_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DWORD mario@181: */ mario@181: case function_int_to_dword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_DT mario@181: */ mario@181: case function_int_to_dt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_dt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_TOD mario@181: */ mario@181: case function_int_to_tod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_tod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_UDINT mario@181: */ mario@181: case function_int_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_WORD mario@181: */ mario@181: case function_int_to_word : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_word*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_STRING mario@181: */ mario@181: case function_int_to_string : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_string*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LWORD mario@181: */ mario@181: case function_int_to_lword : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lword*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_UINT mario@181: */ mario@181: case function_int_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_LREAL mario@181: */ mario@181: case function_int_to_lreal : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_lreal*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_BYTE mario@181: */ mario@181: case function_int_to_byte : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_byte*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_USINT mario@181: */ mario@181: case function_int_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_ULINT mario@181: */ mario@181: case function_int_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_BOOL mario@181: */ mario@181: case function_int_to_bool : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_bool*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INT_TO_TIME mario@181: */ mario@181: case function_int_to_time : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_int_to_time*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TRUNC mario@181: */ mario@181: case function_trunc : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_trunc*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_UDINT mario@181: */ mario@181: case function_bcd_to_udint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_udint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_UINT mario@181: */ mario@181: case function_bcd_to_uint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_uint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_ULINT mario@181: */ mario@181: case function_bcd_to_ulint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_ulint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *BCD_TO_USINT mario@181: */ mario@181: case function_bcd_to_usint : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_bcd_to_usint*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UDINT_TO_BCD mario@181: */ mario@181: case function_udint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_udint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *UINT_TO_BCD mario@181: */ mario@181: case function_uint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_uint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *USINT_TO_BCD mario@181: */ mario@181: case function_usint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_usint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ULINT_TO_BCD mario@181: */ mario@181: case function_ulint_to_bcd : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ulint_to_bcd*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_AND_TIME_TO_TIME_OF_DAY mario@181: */ mario@181: case function_date_and_time_to_time_of_day : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_and_time_to_time_of_day*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DATE_AND_TIME_TO_DATE mario@181: */ mario@181: case function_date_and_time_to_date : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_date_and_time_to_date*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ABS mario@181: */ mario@181: case function_abs : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_abs*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SQRT mario@181: */ mario@181: case function_sqrt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sqrt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LN mario@181: */ mario@181: case function_ln : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ln*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LOG mario@181: */ mario@181: case function_log : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_log*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EXP mario@181: */ mario@181: case function_exp : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_exp*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SIN mario@181: */ mario@181: case function_sin : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sin*/ mario@181: break; mario@181: mario@181: /**** mario@181: *COS mario@181: */ mario@181: case function_cos : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_cos*/ mario@181: break; mario@181: mario@181: /**** mario@181: *TAN mario@181: */ mario@181: case function_tan : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_tan*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ASIN mario@181: */ mario@181: case function_asin : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_asin*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ACOS mario@181: */ mario@181: case function_acos : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_acos*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ATAN mario@181: */ mario@181: case function_atan : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_atan*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ADD mario@181: */ mario@181: case function_add : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_add*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MUL mario@181: */ mario@181: case function_mul : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mul*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SUB mario@181: */ mario@181: case function_sub : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sub*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DIV mario@181: */ mario@181: case function_div : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_div*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MOD mario@181: */ mario@181: case function_mod : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mod*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EXPT mario@181: */ mario@181: case function_expt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_expt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MOVE mario@181: */ mario@181: case function_move : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_move*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SHL mario@181: */ mario@181: case function_shl : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_shl*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SHR mario@181: */ mario@181: case function_shr : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_shr*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ROR mario@181: */ mario@181: case function_ror : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ror*/ mario@181: break; mario@181: mario@181: /**** mario@181: *ROL mario@181: */ mario@181: case function_rol : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("N"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *N_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (N_param_value == NULL) mario@181: N_param_value = function_call_param_iterator.next(); mario@181: if (N_param_value != NULL) { mario@181: N_type_symbol = search_expression_type->get_type(N_param_value); mario@181: last_type_symbol = last_type_symbol && N_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 ; mario@181: } mario@181: mario@181: if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_rol*/ mario@181: break; mario@181: mario@181: /**** mario@181: *AND mario@181: */ mario@181: case function_and : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_and*/ mario@181: break; mario@181: mario@181: /**** mario@181: *OR mario@181: */ mario@181: case function_or : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_or*/ mario@181: break; mario@181: mario@181: /**** mario@181: *XOR mario@181: */ mario@181: case function_xor : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_xor*/ mario@181: break; mario@181: mario@181: /**** mario@181: *NOT mario@181: */ mario@181: case function_not : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_not*/ mario@181: break; mario@181: mario@181: /**** mario@181: *SEL mario@181: */ mario@181: case function_sel : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *G_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN0"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN0_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN0_param_value == NULL) mario@181: IN0_param_value = function_call_param_iterator.next(); mario@181: if (IN0_param_value != NULL) { mario@181: IN0_type_symbol = search_expression_type->get_type(IN0_param_value); mario@181: last_type_symbol = last_type_symbol && IN0_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_sel*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MAX mario@181: */ mario@181: case function_max : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_max*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MIN mario@181: */ mario@181: case function_min : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_min*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LIMIT mario@181: */ mario@181: case function_limit : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *MN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN_param_value == NULL) mario@181: IN_param_value = function_call_param_iterator.next(); mario@181: if (IN_param_value != NULL) { mario@181: IN_type_symbol = search_expression_type->get_type(IN_param_value); mario@181: last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("MX"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *MX_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (MX_param_value == NULL) mario@181: MX_param_value = function_call_param_iterator.next(); mario@181: if (MX_param_value != NULL) { mario@181: MX_type_symbol = search_expression_type->get_type(MX_param_value); mario@181: last_type_symbol = last_type_symbol && MX_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = IN_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_limit*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MUX mario@181: */ mario@181: case function_mux : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *K_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN0"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN0_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN0_param_value == NULL) mario@181: IN0_param_value = function_call_param_iterator.next(); mario@181: if (IN0_param_value != NULL) { mario@181: IN0_type_symbol = search_expression_type->get_type(IN0_param_value); mario@181: last_type_symbol = last_type_symbol && IN0_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN1"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN1_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN1_param_value == NULL) mario@181: IN1_param_value = function_call_param_iterator.next(); mario@181: if (IN1_param_value != NULL) { mario@181: IN1_type_symbol = search_expression_type->get_type(IN1_param_value); mario@181: last_type_symbol = last_type_symbol && IN1_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = last_type_symbol; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mux*/ mario@181: break; mario@181: mario@181: /**** mario@181: *GT mario@181: */ mario@181: case function_gt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_gt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *GE mario@181: */ mario@181: case function_ge : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ge*/ mario@181: break; mario@181: mario@181: /**** mario@181: *EQ mario@181: */ mario@181: case function_eq : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_eq*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LT mario@181: */ mario@181: case function_lt : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_lt*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LE mario@181: */ mario@181: case function_le : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_le*/ mario@181: break; mario@181: mario@181: /**** mario@181: *NE mario@181: */ mario@181: case function_ne : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_ne*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LEN mario@181: */ mario@181: case function_len : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_len*/ mario@181: break; mario@181: mario@181: /**** mario@181: *LEFT mario@181: */ mario@181: case function_left : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_left*/ mario@181: break; mario@181: mario@181: /**** mario@181: *RIGHT mario@181: */ mario@181: case function_right : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_right*/ mario@181: break; mario@181: mario@181: /**** mario@181: *MID mario@181: */ mario@181: case function_mid : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_mid*/ mario@181: break; mario@181: mario@181: /**** mario@181: *CONCAT mario@181: */ mario@181: case function_concat : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_concat*/ mario@181: break; mario@181: mario@181: /**** mario@181: *INSERT mario@181: */ mario@181: case function_insert : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_insert*/ mario@181: break; mario@181: mario@181: /**** mario@181: *DELETE mario@181: */ mario@181: case function_delete : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_delete*/ mario@181: break; mario@181: mario@181: /**** mario@181: *REPLACE mario@181: */ mario@181: case function_replace : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("L"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *L_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (L_param_value == NULL) mario@181: L_param_value = function_call_param_iterator.next(); mario@181: if (L_param_value != NULL) { mario@181: L_type_symbol = search_expression_type->get_type(L_param_value); mario@181: last_type_symbol = last_type_symbol && L_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 ; mario@181: } mario@181: mario@181: if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("P"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *P_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (P_param_value == NULL) mario@181: P_param_value = function_call_param_iterator.next(); mario@181: if (P_param_value != NULL) { mario@181: P_type_symbol = search_expression_type->get_type(P_param_value); mario@181: last_type_symbol = last_type_symbol && P_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 ; mario@181: } mario@181: mario@181: if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_replace*/ mario@181: break; mario@181: mario@181: /**** mario@181: *FIND mario@181: */ mario@181: case function_find : mario@181: { mario@181: symbol_c *last_type_symbol = NULL; mario@181: mario@181: { mario@181: symbol_c *IN1_type_symbol = param_data_type; mario@181: last_type_symbol = param_data_type; mario@181: mario@181: if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: { mario@181: identifier_c param_name("IN2"); mario@181: /* Get the value from a foo( = ) style call */ mario@181: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); mario@181: symbol_c *IN2_type_symbol = NULL; mario@181: mario@181: /* Get the value from a foo() style call */ mario@181: if (IN2_param_value == NULL) mario@181: IN2_param_value = function_call_param_iterator.next(); mario@181: if (IN2_param_value != NULL) { mario@181: IN2_type_symbol = search_expression_type->get_type(IN2_param_value); mario@181: last_type_symbol = last_type_symbol && IN2_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 ; mario@181: } mario@181: mario@181: if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) mario@181: { mario@181: mario@181: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; mario@181: return return_type_symbol; mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: } mario@181: mario@181: mario@181: ERROR; mario@181: } mario@181: mario@181: }/*function_find*/ mario@181: break; mario@181: mario@181: case function_none : mario@181: ERROR; mario@181: } mario@181: return NULL; mario@181: }