1095 } |
9591 } |
1096 |
9592 |
1097 ERROR; |
9593 ERROR; |
1098 } |
9594 } |
1099 |
9595 |
1100 }/*function_lreal_to_dword*/ |
9596 }/*function_lword_to_dword*/ |
1101 break; |
9597 break; |
1102 |
9598 |
1103 /**** |
9599 /**** |
1104 *LREAL_TO_LWORD |
9600 *LWORD_TO_STRING |
1105 */ |
9601 */ |
1106 case function_lreal_to_lword : |
9602 case function_lword_to_string : |
1107 { |
9603 { |
1108 symbol_c *last_type_symbol = NULL; |
9604 symbol_c *last_type_symbol = NULL; |
1109 |
9605 |
1110 { |
9606 { |
1111 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9607 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1112 symbol_c *IN_param_value = &this->default_variable_name; |
9608 symbol_c *IN_param_value = &this->default_variable_name; |
1113 |
9609 |
1114 symbol_c *IN_type_symbol = param_data_type; |
9610 symbol_c *IN_type_symbol = param_data_type; |
1115 last_type_symbol = param_data_type; |
9611 last_type_symbol = param_data_type; |
1116 |
9612 |
1117 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
9613 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9614 { |
|
9615 |
|
9616 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9617 s4o.print("("); |
|
9618 return_type_symbol->accept(*this); |
|
9619 s4o.print(")__bit_to_string("); |
|
9620 IN_param_value->accept(*this); |
|
9621 s4o.print(")"); |
|
9622 return NULL; |
|
9623 |
|
9624 } |
|
9625 |
|
9626 ERROR; |
|
9627 } |
|
9628 |
|
9629 }/*function_lword_to_string*/ |
|
9630 break; |
|
9631 |
|
9632 /**** |
|
9633 *LWORD_TO_DATE |
|
9634 */ |
|
9635 case function_lword_to_date : |
|
9636 { |
|
9637 symbol_c *last_type_symbol = NULL; |
|
9638 |
|
9639 { |
|
9640 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9641 symbol_c *IN_param_value = &this->default_variable_name; |
|
9642 |
|
9643 symbol_c *IN_type_symbol = param_data_type; |
|
9644 last_type_symbol = param_data_type; |
|
9645 |
|
9646 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9647 { |
|
9648 |
|
9649 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9650 s4o.print("("); |
|
9651 return_type_symbol->accept(*this); |
|
9652 s4o.print(")__int_to_time("); |
|
9653 IN_param_value->accept(*this); |
|
9654 s4o.print(")"); |
|
9655 return NULL; |
|
9656 |
|
9657 } |
|
9658 |
|
9659 ERROR; |
|
9660 } |
|
9661 |
|
9662 }/*function_lword_to_date*/ |
|
9663 break; |
|
9664 |
|
9665 /**** |
|
9666 *LWORD_TO_TOD |
|
9667 */ |
|
9668 case function_lword_to_tod : |
|
9669 { |
|
9670 symbol_c *last_type_symbol = NULL; |
|
9671 |
|
9672 { |
|
9673 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9674 symbol_c *IN_param_value = &this->default_variable_name; |
|
9675 |
|
9676 symbol_c *IN_type_symbol = param_data_type; |
|
9677 last_type_symbol = param_data_type; |
|
9678 |
|
9679 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9680 { |
|
9681 |
|
9682 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9683 s4o.print("("); |
|
9684 return_type_symbol->accept(*this); |
|
9685 s4o.print(")__int_to_time("); |
|
9686 IN_param_value->accept(*this); |
|
9687 s4o.print(")"); |
|
9688 return NULL; |
|
9689 |
|
9690 } |
|
9691 |
|
9692 ERROR; |
|
9693 } |
|
9694 |
|
9695 }/*function_lword_to_tod*/ |
|
9696 break; |
|
9697 |
|
9698 /**** |
|
9699 *LWORD_TO_DT |
|
9700 */ |
|
9701 case function_lword_to_dt : |
|
9702 { |
|
9703 symbol_c *last_type_symbol = NULL; |
|
9704 |
|
9705 { |
|
9706 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9707 symbol_c *IN_param_value = &this->default_variable_name; |
|
9708 |
|
9709 symbol_c *IN_type_symbol = param_data_type; |
|
9710 last_type_symbol = param_data_type; |
|
9711 |
|
9712 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9713 { |
|
9714 |
|
9715 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9716 s4o.print("("); |
|
9717 return_type_symbol->accept(*this); |
|
9718 s4o.print(")__int_to_time("); |
|
9719 IN_param_value->accept(*this); |
|
9720 s4o.print(")"); |
|
9721 return NULL; |
|
9722 |
|
9723 } |
|
9724 |
|
9725 ERROR; |
|
9726 } |
|
9727 |
|
9728 }/*function_lword_to_dt*/ |
|
9729 break; |
|
9730 |
|
9731 /**** |
|
9732 *STRING_TO_REAL |
|
9733 */ |
|
9734 case function_string_to_real : |
|
9735 { |
|
9736 symbol_c *last_type_symbol = NULL; |
|
9737 |
|
9738 { |
|
9739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9740 symbol_c *IN_param_value = &this->default_variable_name; |
|
9741 |
|
9742 symbol_c *IN_type_symbol = param_data_type; |
|
9743 last_type_symbol = param_data_type; |
|
9744 |
|
9745 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9746 { |
|
9747 |
|
9748 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9749 s4o.print("("); |
|
9750 return_type_symbol->accept(*this); |
|
9751 s4o.print(")__string_to_real("); |
|
9752 IN_param_value->accept(*this); |
|
9753 s4o.print(")"); |
|
9754 return NULL; |
|
9755 |
|
9756 } |
|
9757 |
|
9758 ERROR; |
|
9759 } |
|
9760 |
|
9761 }/*function_string_to_real*/ |
|
9762 break; |
|
9763 |
|
9764 /**** |
|
9765 *STRING_TO_LREAL |
|
9766 */ |
|
9767 case function_string_to_lreal : |
|
9768 { |
|
9769 symbol_c *last_type_symbol = NULL; |
|
9770 |
|
9771 { |
|
9772 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9773 symbol_c *IN_param_value = &this->default_variable_name; |
|
9774 |
|
9775 symbol_c *IN_type_symbol = param_data_type; |
|
9776 last_type_symbol = param_data_type; |
|
9777 |
|
9778 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9779 { |
|
9780 |
|
9781 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9782 s4o.print("("); |
|
9783 return_type_symbol->accept(*this); |
|
9784 s4o.print(")__string_to_real("); |
|
9785 IN_param_value->accept(*this); |
|
9786 s4o.print(")"); |
|
9787 return NULL; |
|
9788 |
|
9789 } |
|
9790 |
|
9791 ERROR; |
|
9792 } |
|
9793 |
|
9794 }/*function_string_to_lreal*/ |
|
9795 break; |
|
9796 |
|
9797 /**** |
|
9798 *STRING_TO_SINT |
|
9799 */ |
|
9800 case function_string_to_sint : |
|
9801 { |
|
9802 symbol_c *last_type_symbol = NULL; |
|
9803 |
|
9804 { |
|
9805 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9806 symbol_c *IN_param_value = &this->default_variable_name; |
|
9807 |
|
9808 symbol_c *IN_type_symbol = param_data_type; |
|
9809 last_type_symbol = param_data_type; |
|
9810 |
|
9811 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9812 { |
|
9813 |
|
9814 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9815 s4o.print("("); |
|
9816 return_type_symbol->accept(*this); |
|
9817 s4o.print(")__string_to_sint("); |
|
9818 IN_param_value->accept(*this); |
|
9819 s4o.print(")"); |
|
9820 return NULL; |
|
9821 |
|
9822 } |
|
9823 |
|
9824 ERROR; |
|
9825 } |
|
9826 |
|
9827 }/*function_string_to_sint*/ |
|
9828 break; |
|
9829 |
|
9830 /**** |
|
9831 *STRING_TO_INT |
|
9832 */ |
|
9833 case function_string_to_int : |
|
9834 { |
|
9835 symbol_c *last_type_symbol = NULL; |
|
9836 |
|
9837 { |
|
9838 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9839 symbol_c *IN_param_value = &this->default_variable_name; |
|
9840 |
|
9841 symbol_c *IN_type_symbol = param_data_type; |
|
9842 last_type_symbol = param_data_type; |
|
9843 |
|
9844 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9845 { |
|
9846 |
|
9847 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9848 s4o.print("("); |
|
9849 return_type_symbol->accept(*this); |
|
9850 s4o.print(")__string_to_sint("); |
|
9851 IN_param_value->accept(*this); |
|
9852 s4o.print(")"); |
|
9853 return NULL; |
|
9854 |
|
9855 } |
|
9856 |
|
9857 ERROR; |
|
9858 } |
|
9859 |
|
9860 }/*function_string_to_int*/ |
|
9861 break; |
|
9862 |
|
9863 /**** |
|
9864 *STRING_TO_DINT |
|
9865 */ |
|
9866 case function_string_to_dint : |
|
9867 { |
|
9868 symbol_c *last_type_symbol = NULL; |
|
9869 |
|
9870 { |
|
9871 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9872 symbol_c *IN_param_value = &this->default_variable_name; |
|
9873 |
|
9874 symbol_c *IN_type_symbol = param_data_type; |
|
9875 last_type_symbol = param_data_type; |
|
9876 |
|
9877 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9878 { |
|
9879 |
|
9880 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9881 s4o.print("("); |
|
9882 return_type_symbol->accept(*this); |
|
9883 s4o.print(")__string_to_sint("); |
|
9884 IN_param_value->accept(*this); |
|
9885 s4o.print(")"); |
|
9886 return NULL; |
|
9887 |
|
9888 } |
|
9889 |
|
9890 ERROR; |
|
9891 } |
|
9892 |
|
9893 }/*function_string_to_dint*/ |
|
9894 break; |
|
9895 |
|
9896 /**** |
|
9897 *STRING_TO_LINT |
|
9898 */ |
|
9899 case function_string_to_lint : |
|
9900 { |
|
9901 symbol_c *last_type_symbol = NULL; |
|
9902 |
|
9903 { |
|
9904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9905 symbol_c *IN_param_value = &this->default_variable_name; |
|
9906 |
|
9907 symbol_c *IN_type_symbol = param_data_type; |
|
9908 last_type_symbol = param_data_type; |
|
9909 |
|
9910 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9911 { |
|
9912 |
|
9913 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9914 s4o.print("("); |
|
9915 return_type_symbol->accept(*this); |
|
9916 s4o.print(")__string_to_sint("); |
|
9917 IN_param_value->accept(*this); |
|
9918 s4o.print(")"); |
|
9919 return NULL; |
|
9920 |
|
9921 } |
|
9922 |
|
9923 ERROR; |
|
9924 } |
|
9925 |
|
9926 }/*function_string_to_lint*/ |
|
9927 break; |
|
9928 |
|
9929 /**** |
|
9930 *STRING_TO_USINT |
|
9931 */ |
|
9932 case function_string_to_usint : |
|
9933 { |
|
9934 symbol_c *last_type_symbol = NULL; |
|
9935 |
|
9936 { |
|
9937 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9938 symbol_c *IN_param_value = &this->default_variable_name; |
|
9939 |
|
9940 symbol_c *IN_type_symbol = param_data_type; |
|
9941 last_type_symbol = param_data_type; |
|
9942 |
|
9943 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9944 { |
|
9945 |
|
9946 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9947 s4o.print("("); |
|
9948 return_type_symbol->accept(*this); |
|
9949 s4o.print(")__string_to_uint("); |
|
9950 IN_param_value->accept(*this); |
|
9951 s4o.print(")"); |
|
9952 return NULL; |
|
9953 |
|
9954 } |
|
9955 |
|
9956 ERROR; |
|
9957 } |
|
9958 |
|
9959 }/*function_string_to_usint*/ |
|
9960 break; |
|
9961 |
|
9962 /**** |
|
9963 *STRING_TO_UINT |
|
9964 */ |
|
9965 case function_string_to_uint : |
|
9966 { |
|
9967 symbol_c *last_type_symbol = NULL; |
|
9968 |
|
9969 { |
|
9970 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9971 symbol_c *IN_param_value = &this->default_variable_name; |
|
9972 |
|
9973 symbol_c *IN_type_symbol = param_data_type; |
|
9974 last_type_symbol = param_data_type; |
|
9975 |
|
9976 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
9977 { |
|
9978 |
|
9979 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9980 s4o.print("("); |
|
9981 return_type_symbol->accept(*this); |
|
9982 s4o.print(")__string_to_uint("); |
|
9983 IN_param_value->accept(*this); |
|
9984 s4o.print(")"); |
|
9985 return NULL; |
|
9986 |
|
9987 } |
|
9988 |
|
9989 ERROR; |
|
9990 } |
|
9991 |
|
9992 }/*function_string_to_uint*/ |
|
9993 break; |
|
9994 |
|
9995 /**** |
|
9996 *STRING_TO_UDINT |
|
9997 */ |
|
9998 case function_string_to_udint : |
|
9999 { |
|
10000 symbol_c *last_type_symbol = NULL; |
|
10001 |
|
10002 { |
|
10003 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10004 symbol_c *IN_param_value = &this->default_variable_name; |
|
10005 |
|
10006 symbol_c *IN_type_symbol = param_data_type; |
|
10007 last_type_symbol = param_data_type; |
|
10008 |
|
10009 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10010 { |
|
10011 |
|
10012 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10013 s4o.print("("); |
|
10014 return_type_symbol->accept(*this); |
|
10015 s4o.print(")__string_to_uint("); |
|
10016 IN_param_value->accept(*this); |
|
10017 s4o.print(")"); |
|
10018 return NULL; |
|
10019 |
|
10020 } |
|
10021 |
|
10022 ERROR; |
|
10023 } |
|
10024 |
|
10025 }/*function_string_to_udint*/ |
|
10026 break; |
|
10027 |
|
10028 /**** |
|
10029 *STRING_TO_ULINT |
|
10030 */ |
|
10031 case function_string_to_ulint : |
|
10032 { |
|
10033 symbol_c *last_type_symbol = NULL; |
|
10034 |
|
10035 { |
|
10036 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10037 symbol_c *IN_param_value = &this->default_variable_name; |
|
10038 |
|
10039 symbol_c *IN_type_symbol = param_data_type; |
|
10040 last_type_symbol = param_data_type; |
|
10041 |
|
10042 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10043 { |
|
10044 |
|
10045 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10046 s4o.print("("); |
|
10047 return_type_symbol->accept(*this); |
|
10048 s4o.print(")__string_to_uint("); |
|
10049 IN_param_value->accept(*this); |
|
10050 s4o.print(")"); |
|
10051 return NULL; |
|
10052 |
|
10053 } |
|
10054 |
|
10055 ERROR; |
|
10056 } |
|
10057 |
|
10058 }/*function_string_to_ulint*/ |
|
10059 break; |
|
10060 |
|
10061 /**** |
|
10062 *STRING_TO_TIME |
|
10063 */ |
|
10064 case function_string_to_time : |
|
10065 { |
|
10066 symbol_c *last_type_symbol = NULL; |
|
10067 |
|
10068 { |
|
10069 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10070 symbol_c *IN_param_value = &this->default_variable_name; |
|
10071 |
|
10072 symbol_c *IN_type_symbol = param_data_type; |
|
10073 last_type_symbol = param_data_type; |
|
10074 |
|
10075 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10076 { |
|
10077 |
|
10078 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10079 s4o.print("("); |
|
10080 return_type_symbol->accept(*this); |
|
10081 s4o.print(")__string_to_time("); |
|
10082 IN_param_value->accept(*this); |
|
10083 s4o.print(")"); |
|
10084 return NULL; |
|
10085 |
|
10086 } |
|
10087 |
|
10088 ERROR; |
|
10089 } |
|
10090 |
|
10091 }/*function_string_to_time*/ |
|
10092 break; |
|
10093 |
|
10094 /**** |
|
10095 *STRING_TO_BOOL |
|
10096 */ |
|
10097 case function_string_to_bool : |
|
10098 { |
|
10099 symbol_c *last_type_symbol = NULL; |
|
10100 |
|
10101 { |
|
10102 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10103 symbol_c *IN_param_value = &this->default_variable_name; |
|
10104 |
|
10105 symbol_c *IN_type_symbol = param_data_type; |
|
10106 last_type_symbol = param_data_type; |
|
10107 |
|
10108 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10109 { |
|
10110 |
|
10111 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10112 s4o.print("("); |
|
10113 return_type_symbol->accept(*this); |
|
10114 s4o.print(")__string_to_bool("); |
|
10115 IN_param_value->accept(*this); |
|
10116 s4o.print(")"); |
|
10117 return NULL; |
|
10118 |
|
10119 } |
|
10120 |
|
10121 ERROR; |
|
10122 } |
|
10123 |
|
10124 }/*function_string_to_bool*/ |
|
10125 break; |
|
10126 |
|
10127 /**** |
|
10128 *STRING_TO_BYTE |
|
10129 */ |
|
10130 case function_string_to_byte : |
|
10131 { |
|
10132 symbol_c *last_type_symbol = NULL; |
|
10133 |
|
10134 { |
|
10135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10136 symbol_c *IN_param_value = &this->default_variable_name; |
|
10137 |
|
10138 symbol_c *IN_type_symbol = param_data_type; |
|
10139 last_type_symbol = param_data_type; |
|
10140 |
|
10141 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10142 { |
|
10143 |
|
10144 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10145 s4o.print("("); |
|
10146 return_type_symbol->accept(*this); |
|
10147 s4o.print(")__string_to_bit("); |
|
10148 IN_param_value->accept(*this); |
|
10149 s4o.print(")"); |
|
10150 return NULL; |
|
10151 |
|
10152 } |
|
10153 |
|
10154 ERROR; |
|
10155 } |
|
10156 |
|
10157 }/*function_string_to_byte*/ |
|
10158 break; |
|
10159 |
|
10160 /**** |
|
10161 *STRING_TO_WORD |
|
10162 */ |
|
10163 case function_string_to_word : |
|
10164 { |
|
10165 symbol_c *last_type_symbol = NULL; |
|
10166 |
|
10167 { |
|
10168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10169 symbol_c *IN_param_value = &this->default_variable_name; |
|
10170 |
|
10171 symbol_c *IN_type_symbol = param_data_type; |
|
10172 last_type_symbol = param_data_type; |
|
10173 |
|
10174 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10175 { |
|
10176 |
|
10177 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10178 s4o.print("("); |
|
10179 return_type_symbol->accept(*this); |
|
10180 s4o.print(")__string_to_bit("); |
|
10181 IN_param_value->accept(*this); |
|
10182 s4o.print(")"); |
|
10183 return NULL; |
|
10184 |
|
10185 } |
|
10186 |
|
10187 ERROR; |
|
10188 } |
|
10189 |
|
10190 }/*function_string_to_word*/ |
|
10191 break; |
|
10192 |
|
10193 /**** |
|
10194 *STRING_TO_DWORD |
|
10195 */ |
|
10196 case function_string_to_dword : |
|
10197 { |
|
10198 symbol_c *last_type_symbol = NULL; |
|
10199 |
|
10200 { |
|
10201 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10202 symbol_c *IN_param_value = &this->default_variable_name; |
|
10203 |
|
10204 symbol_c *IN_type_symbol = param_data_type; |
|
10205 last_type_symbol = param_data_type; |
|
10206 |
|
10207 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10208 { |
|
10209 |
|
10210 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10211 s4o.print("("); |
|
10212 return_type_symbol->accept(*this); |
|
10213 s4o.print(")__string_to_bit("); |
|
10214 IN_param_value->accept(*this); |
|
10215 s4o.print(")"); |
|
10216 return NULL; |
|
10217 |
|
10218 } |
|
10219 |
|
10220 ERROR; |
|
10221 } |
|
10222 |
|
10223 }/*function_string_to_dword*/ |
|
10224 break; |
|
10225 |
|
10226 /**** |
|
10227 *STRING_TO_LWORD |
|
10228 */ |
|
10229 case function_string_to_lword : |
|
10230 { |
|
10231 symbol_c *last_type_symbol = NULL; |
|
10232 |
|
10233 { |
|
10234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10235 symbol_c *IN_param_value = &this->default_variable_name; |
|
10236 |
|
10237 symbol_c *IN_type_symbol = param_data_type; |
|
10238 last_type_symbol = param_data_type; |
|
10239 |
|
10240 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
1118 { |
10241 { |
1119 |
10242 |
1120 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
10243 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
1121 s4o.print("("); |
10244 s4o.print("("); |
1122 return_type_symbol->accept(*this); |
10245 return_type_symbol->accept(*this); |
1123 s4o.print(")"); |
10246 s4o.print(")__string_to_bit("); |
1124 IN_param_value->accept(*this); |
10247 IN_param_value->accept(*this); |
1125 return NULL; |
10248 s4o.print(")"); |
1126 |
10249 return NULL; |
1127 } |
10250 |
1128 |
10251 } |
1129 ERROR; |
10252 |
1130 } |
10253 ERROR; |
1131 |
10254 } |
1132 }/*function_lreal_to_lword*/ |
10255 |
1133 break; |
10256 }/*function_string_to_lword*/ |
1134 |
10257 break; |
1135 /**** |
10258 |
1136 *LREAL_TO_STRING |
10259 /**** |
1137 */ |
10260 *STRING_TO_DATE |
1138 case function_lreal_to_string : |
10261 */ |
1139 { |
10262 case function_string_to_date : |
1140 symbol_c *last_type_symbol = NULL; |
10263 { |
1141 |
10264 symbol_c *last_type_symbol = NULL; |
1142 { |
10265 |
1143 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10266 { |
1144 symbol_c *IN_param_value = &this->default_variable_name; |
10267 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1145 |
10268 symbol_c *IN_param_value = &this->default_variable_name; |
1146 symbol_c *IN_type_symbol = param_data_type; |
10269 |
1147 last_type_symbol = param_data_type; |
10270 symbol_c *IN_type_symbol = param_data_type; |
1148 |
10271 last_type_symbol = param_data_type; |
1149 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
10272 |
|
10273 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10274 { |
|
10275 |
|
10276 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10277 s4o.print("("); |
|
10278 return_type_symbol->accept(*this); |
|
10279 s4o.print(")__string_to_time("); |
|
10280 IN_param_value->accept(*this); |
|
10281 s4o.print(")"); |
|
10282 return NULL; |
|
10283 |
|
10284 } |
|
10285 |
|
10286 ERROR; |
|
10287 } |
|
10288 |
|
10289 }/*function_string_to_date*/ |
|
10290 break; |
|
10291 |
|
10292 /**** |
|
10293 *STRING_TO_TOD |
|
10294 */ |
|
10295 case function_string_to_tod : |
|
10296 { |
|
10297 symbol_c *last_type_symbol = NULL; |
|
10298 |
|
10299 { |
|
10300 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10301 symbol_c *IN_param_value = &this->default_variable_name; |
|
10302 |
|
10303 symbol_c *IN_type_symbol = param_data_type; |
|
10304 last_type_symbol = param_data_type; |
|
10305 |
|
10306 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10307 { |
|
10308 |
|
10309 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10310 s4o.print("("); |
|
10311 return_type_symbol->accept(*this); |
|
10312 s4o.print(")__string_to_time("); |
|
10313 IN_param_value->accept(*this); |
|
10314 s4o.print(")"); |
|
10315 return NULL; |
|
10316 |
|
10317 } |
|
10318 |
|
10319 ERROR; |
|
10320 } |
|
10321 |
|
10322 }/*function_string_to_tod*/ |
|
10323 break; |
|
10324 |
|
10325 /**** |
|
10326 *STRING_TO_DT |
|
10327 */ |
|
10328 case function_string_to_dt : |
|
10329 { |
|
10330 symbol_c *last_type_symbol = NULL; |
|
10331 |
|
10332 { |
|
10333 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10334 symbol_c *IN_param_value = &this->default_variable_name; |
|
10335 |
|
10336 symbol_c *IN_type_symbol = param_data_type; |
|
10337 last_type_symbol = param_data_type; |
|
10338 |
|
10339 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10340 { |
|
10341 |
|
10342 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10343 s4o.print("("); |
|
10344 return_type_symbol->accept(*this); |
|
10345 s4o.print(")__string_to_time("); |
|
10346 IN_param_value->accept(*this); |
|
10347 s4o.print(")"); |
|
10348 return NULL; |
|
10349 |
|
10350 } |
|
10351 |
|
10352 ERROR; |
|
10353 } |
|
10354 |
|
10355 }/*function_string_to_dt*/ |
|
10356 break; |
|
10357 |
|
10358 /**** |
|
10359 *DATE_TO_REAL |
|
10360 */ |
|
10361 case function_date_to_real : |
|
10362 { |
|
10363 symbol_c *last_type_symbol = NULL; |
|
10364 |
|
10365 { |
|
10366 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10367 symbol_c *IN_param_value = &this->default_variable_name; |
|
10368 |
|
10369 symbol_c *IN_type_symbol = param_data_type; |
|
10370 last_type_symbol = param_data_type; |
|
10371 |
|
10372 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10373 { |
|
10374 |
|
10375 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10376 s4o.print("("); |
|
10377 return_type_symbol->accept(*this); |
|
10378 s4o.print(")__time_to_real("); |
|
10379 IN_param_value->accept(*this); |
|
10380 s4o.print(")"); |
|
10381 return NULL; |
|
10382 |
|
10383 } |
|
10384 |
|
10385 ERROR; |
|
10386 } |
|
10387 |
|
10388 }/*function_date_to_real*/ |
|
10389 break; |
|
10390 |
|
10391 /**** |
|
10392 *DATE_TO_LREAL |
|
10393 */ |
|
10394 case function_date_to_lreal : |
|
10395 { |
|
10396 symbol_c *last_type_symbol = NULL; |
|
10397 |
|
10398 { |
|
10399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10400 symbol_c *IN_param_value = &this->default_variable_name; |
|
10401 |
|
10402 symbol_c *IN_type_symbol = param_data_type; |
|
10403 last_type_symbol = param_data_type; |
|
10404 |
|
10405 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10406 { |
|
10407 |
|
10408 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10409 s4o.print("("); |
|
10410 return_type_symbol->accept(*this); |
|
10411 s4o.print(")__time_to_real("); |
|
10412 IN_param_value->accept(*this); |
|
10413 s4o.print(")"); |
|
10414 return NULL; |
|
10415 |
|
10416 } |
|
10417 |
|
10418 ERROR; |
|
10419 } |
|
10420 |
|
10421 }/*function_date_to_lreal*/ |
|
10422 break; |
|
10423 |
|
10424 /**** |
|
10425 *DATE_TO_SINT |
|
10426 */ |
|
10427 case function_date_to_sint : |
|
10428 { |
|
10429 symbol_c *last_type_symbol = NULL; |
|
10430 |
|
10431 { |
|
10432 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10433 symbol_c *IN_param_value = &this->default_variable_name; |
|
10434 |
|
10435 symbol_c *IN_type_symbol = param_data_type; |
|
10436 last_type_symbol = param_data_type; |
|
10437 |
|
10438 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10439 { |
|
10440 |
|
10441 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10442 s4o.print("("); |
|
10443 return_type_symbol->accept(*this); |
|
10444 s4o.print(")__time_to_int("); |
|
10445 IN_param_value->accept(*this); |
|
10446 s4o.print(")"); |
|
10447 return NULL; |
|
10448 |
|
10449 } |
|
10450 |
|
10451 ERROR; |
|
10452 } |
|
10453 |
|
10454 }/*function_date_to_sint*/ |
|
10455 break; |
|
10456 |
|
10457 /**** |
|
10458 *DATE_TO_INT |
|
10459 */ |
|
10460 case function_date_to_int : |
|
10461 { |
|
10462 symbol_c *last_type_symbol = NULL; |
|
10463 |
|
10464 { |
|
10465 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10466 symbol_c *IN_param_value = &this->default_variable_name; |
|
10467 |
|
10468 symbol_c *IN_type_symbol = param_data_type; |
|
10469 last_type_symbol = param_data_type; |
|
10470 |
|
10471 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10472 { |
|
10473 |
|
10474 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10475 s4o.print("("); |
|
10476 return_type_symbol->accept(*this); |
|
10477 s4o.print(")__time_to_int("); |
|
10478 IN_param_value->accept(*this); |
|
10479 s4o.print(")"); |
|
10480 return NULL; |
|
10481 |
|
10482 } |
|
10483 |
|
10484 ERROR; |
|
10485 } |
|
10486 |
|
10487 }/*function_date_to_int*/ |
|
10488 break; |
|
10489 |
|
10490 /**** |
|
10491 *DATE_TO_DINT |
|
10492 */ |
|
10493 case function_date_to_dint : |
|
10494 { |
|
10495 symbol_c *last_type_symbol = NULL; |
|
10496 |
|
10497 { |
|
10498 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10499 symbol_c *IN_param_value = &this->default_variable_name; |
|
10500 |
|
10501 symbol_c *IN_type_symbol = param_data_type; |
|
10502 last_type_symbol = param_data_type; |
|
10503 |
|
10504 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10505 { |
|
10506 |
|
10507 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10508 s4o.print("("); |
|
10509 return_type_symbol->accept(*this); |
|
10510 s4o.print(")__time_to_int("); |
|
10511 IN_param_value->accept(*this); |
|
10512 s4o.print(")"); |
|
10513 return NULL; |
|
10514 |
|
10515 } |
|
10516 |
|
10517 ERROR; |
|
10518 } |
|
10519 |
|
10520 }/*function_date_to_dint*/ |
|
10521 break; |
|
10522 |
|
10523 /**** |
|
10524 *DATE_TO_LINT |
|
10525 */ |
|
10526 case function_date_to_lint : |
|
10527 { |
|
10528 symbol_c *last_type_symbol = NULL; |
|
10529 |
|
10530 { |
|
10531 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10532 symbol_c *IN_param_value = &this->default_variable_name; |
|
10533 |
|
10534 symbol_c *IN_type_symbol = param_data_type; |
|
10535 last_type_symbol = param_data_type; |
|
10536 |
|
10537 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10538 { |
|
10539 |
|
10540 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10541 s4o.print("("); |
|
10542 return_type_symbol->accept(*this); |
|
10543 s4o.print(")__time_to_int("); |
|
10544 IN_param_value->accept(*this); |
|
10545 s4o.print(")"); |
|
10546 return NULL; |
|
10547 |
|
10548 } |
|
10549 |
|
10550 ERROR; |
|
10551 } |
|
10552 |
|
10553 }/*function_date_to_lint*/ |
|
10554 break; |
|
10555 |
|
10556 /**** |
|
10557 *DATE_TO_USINT |
|
10558 */ |
|
10559 case function_date_to_usint : |
|
10560 { |
|
10561 symbol_c *last_type_symbol = NULL; |
|
10562 |
|
10563 { |
|
10564 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10565 symbol_c *IN_param_value = &this->default_variable_name; |
|
10566 |
|
10567 symbol_c *IN_type_symbol = param_data_type; |
|
10568 last_type_symbol = param_data_type; |
|
10569 |
|
10570 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10571 { |
|
10572 |
|
10573 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
10574 s4o.print("("); |
|
10575 return_type_symbol->accept(*this); |
|
10576 s4o.print(")__time_to_int("); |
|
10577 IN_param_value->accept(*this); |
|
10578 s4o.print(")"); |
|
10579 return NULL; |
|
10580 |
|
10581 } |
|
10582 |
|
10583 ERROR; |
|
10584 } |
|
10585 |
|
10586 }/*function_date_to_usint*/ |
|
10587 break; |
|
10588 |
|
10589 /**** |
|
10590 *DATE_TO_UINT |
|
10591 */ |
|
10592 case function_date_to_uint : |
|
10593 { |
|
10594 symbol_c *last_type_symbol = NULL; |
|
10595 |
|
10596 { |
|
10597 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10598 symbol_c *IN_param_value = &this->default_variable_name; |
|
10599 |
|
10600 symbol_c *IN_type_symbol = param_data_type; |
|
10601 last_type_symbol = param_data_type; |
|
10602 |
|
10603 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10604 { |
|
10605 |
|
10606 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10607 s4o.print("("); |
|
10608 return_type_symbol->accept(*this); |
|
10609 s4o.print(")__time_to_int("); |
|
10610 IN_param_value->accept(*this); |
|
10611 s4o.print(")"); |
|
10612 return NULL; |
|
10613 |
|
10614 } |
|
10615 |
|
10616 ERROR; |
|
10617 } |
|
10618 |
|
10619 }/*function_date_to_uint*/ |
|
10620 break; |
|
10621 |
|
10622 /**** |
|
10623 *DATE_TO_UDINT |
|
10624 */ |
|
10625 case function_date_to_udint : |
|
10626 { |
|
10627 symbol_c *last_type_symbol = NULL; |
|
10628 |
|
10629 { |
|
10630 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10631 symbol_c *IN_param_value = &this->default_variable_name; |
|
10632 |
|
10633 symbol_c *IN_type_symbol = param_data_type; |
|
10634 last_type_symbol = param_data_type; |
|
10635 |
|
10636 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10637 { |
|
10638 |
|
10639 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10640 s4o.print("("); |
|
10641 return_type_symbol->accept(*this); |
|
10642 s4o.print(")__time_to_int("); |
|
10643 IN_param_value->accept(*this); |
|
10644 s4o.print(")"); |
|
10645 return NULL; |
|
10646 |
|
10647 } |
|
10648 |
|
10649 ERROR; |
|
10650 } |
|
10651 |
|
10652 }/*function_date_to_udint*/ |
|
10653 break; |
|
10654 |
|
10655 /**** |
|
10656 *DATE_TO_ULINT |
|
10657 */ |
|
10658 case function_date_to_ulint : |
|
10659 { |
|
10660 symbol_c *last_type_symbol = NULL; |
|
10661 |
|
10662 { |
|
10663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10664 symbol_c *IN_param_value = &this->default_variable_name; |
|
10665 |
|
10666 symbol_c *IN_type_symbol = param_data_type; |
|
10667 last_type_symbol = param_data_type; |
|
10668 |
|
10669 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10670 { |
|
10671 |
|
10672 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10673 s4o.print("("); |
|
10674 return_type_symbol->accept(*this); |
|
10675 s4o.print(")__time_to_int("); |
|
10676 IN_param_value->accept(*this); |
|
10677 s4o.print(")"); |
|
10678 return NULL; |
|
10679 |
|
10680 } |
|
10681 |
|
10682 ERROR; |
|
10683 } |
|
10684 |
|
10685 }/*function_date_to_ulint*/ |
|
10686 break; |
|
10687 |
|
10688 /**** |
|
10689 *DATE_TO_BOOL |
|
10690 */ |
|
10691 case function_date_to_bool : |
|
10692 { |
|
10693 symbol_c *last_type_symbol = NULL; |
|
10694 |
|
10695 { |
|
10696 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10697 symbol_c *IN_param_value = &this->default_variable_name; |
|
10698 |
|
10699 symbol_c *IN_type_symbol = param_data_type; |
|
10700 last_type_symbol = param_data_type; |
|
10701 |
|
10702 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10703 { |
|
10704 |
|
10705 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10706 s4o.print("("); |
|
10707 return_type_symbol->accept(*this); |
|
10708 s4o.print(")__time_to_int("); |
|
10709 IN_param_value->accept(*this); |
|
10710 s4o.print(")"); |
|
10711 return NULL; |
|
10712 |
|
10713 } |
|
10714 |
|
10715 ERROR; |
|
10716 } |
|
10717 |
|
10718 }/*function_date_to_bool*/ |
|
10719 break; |
|
10720 |
|
10721 /**** |
|
10722 *DATE_TO_BYTE |
|
10723 */ |
|
10724 case function_date_to_byte : |
|
10725 { |
|
10726 symbol_c *last_type_symbol = NULL; |
|
10727 |
|
10728 { |
|
10729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10730 symbol_c *IN_param_value = &this->default_variable_name; |
|
10731 |
|
10732 symbol_c *IN_type_symbol = param_data_type; |
|
10733 last_type_symbol = param_data_type; |
|
10734 |
|
10735 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10736 { |
|
10737 |
|
10738 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10739 s4o.print("("); |
|
10740 return_type_symbol->accept(*this); |
|
10741 s4o.print(")__time_to_int("); |
|
10742 IN_param_value->accept(*this); |
|
10743 s4o.print(")"); |
|
10744 return NULL; |
|
10745 |
|
10746 } |
|
10747 |
|
10748 ERROR; |
|
10749 } |
|
10750 |
|
10751 }/*function_date_to_byte*/ |
|
10752 break; |
|
10753 |
|
10754 /**** |
|
10755 *DATE_TO_WORD |
|
10756 */ |
|
10757 case function_date_to_word : |
|
10758 { |
|
10759 symbol_c *last_type_symbol = NULL; |
|
10760 |
|
10761 { |
|
10762 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10763 symbol_c *IN_param_value = &this->default_variable_name; |
|
10764 |
|
10765 symbol_c *IN_type_symbol = param_data_type; |
|
10766 last_type_symbol = param_data_type; |
|
10767 |
|
10768 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10769 { |
|
10770 |
|
10771 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10772 s4o.print("("); |
|
10773 return_type_symbol->accept(*this); |
|
10774 s4o.print(")__time_to_int("); |
|
10775 IN_param_value->accept(*this); |
|
10776 s4o.print(")"); |
|
10777 return NULL; |
|
10778 |
|
10779 } |
|
10780 |
|
10781 ERROR; |
|
10782 } |
|
10783 |
|
10784 }/*function_date_to_word*/ |
|
10785 break; |
|
10786 |
|
10787 /**** |
|
10788 *DATE_TO_DWORD |
|
10789 */ |
|
10790 case function_date_to_dword : |
|
10791 { |
|
10792 symbol_c *last_type_symbol = NULL; |
|
10793 |
|
10794 { |
|
10795 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10796 symbol_c *IN_param_value = &this->default_variable_name; |
|
10797 |
|
10798 symbol_c *IN_type_symbol = param_data_type; |
|
10799 last_type_symbol = param_data_type; |
|
10800 |
|
10801 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10802 { |
|
10803 |
|
10804 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10805 s4o.print("("); |
|
10806 return_type_symbol->accept(*this); |
|
10807 s4o.print(")__time_to_int("); |
|
10808 IN_param_value->accept(*this); |
|
10809 s4o.print(")"); |
|
10810 return NULL; |
|
10811 |
|
10812 } |
|
10813 |
|
10814 ERROR; |
|
10815 } |
|
10816 |
|
10817 }/*function_date_to_dword*/ |
|
10818 break; |
|
10819 |
|
10820 /**** |
|
10821 *DATE_TO_LWORD |
|
10822 */ |
|
10823 case function_date_to_lword : |
|
10824 { |
|
10825 symbol_c *last_type_symbol = NULL; |
|
10826 |
|
10827 { |
|
10828 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10829 symbol_c *IN_param_value = &this->default_variable_name; |
|
10830 |
|
10831 symbol_c *IN_type_symbol = param_data_type; |
|
10832 last_type_symbol = param_data_type; |
|
10833 |
|
10834 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
10835 { |
|
10836 |
|
10837 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10838 s4o.print("("); |
|
10839 return_type_symbol->accept(*this); |
|
10840 s4o.print(")__time_to_int("); |
|
10841 IN_param_value->accept(*this); |
|
10842 s4o.print(")"); |
|
10843 return NULL; |
|
10844 |
|
10845 } |
|
10846 |
|
10847 ERROR; |
|
10848 } |
|
10849 |
|
10850 }/*function_date_to_lword*/ |
|
10851 break; |
|
10852 |
|
10853 /**** |
|
10854 *DATE_TO_STRING |
|
10855 */ |
|
10856 case function_date_to_string : |
|
10857 { |
|
10858 symbol_c *last_type_symbol = NULL; |
|
10859 |
|
10860 { |
|
10861 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10862 symbol_c *IN_param_value = &this->default_variable_name; |
|
10863 |
|
10864 symbol_c *IN_type_symbol = param_data_type; |
|
10865 last_type_symbol = param_data_type; |
|
10866 |
|
10867 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
1150 { |
10868 { |
1151 |
10869 |
1152 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
10870 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
1153 s4o.print("("); |
10871 s4o.print("("); |
1154 return_type_symbol->accept(*this); |
10872 return_type_symbol->accept(*this); |
1155 s4o.print(")int_to_string("); |
10873 s4o.print(")__date_to_string("); |
1156 IN_param_value->accept(*this); |
10874 IN_param_value->accept(*this); |
1157 s4o.print(", 10)"); |
10875 s4o.print(")"); |
1158 return NULL; |
10876 return NULL; |
1159 |
10877 |
1160 } |
10878 } |
1161 |
10879 |
1162 ERROR; |
10880 ERROR; |
1163 } |
10881 } |
1164 |
10882 |
1165 }/*function_lreal_to_string*/ |
10883 }/*function_date_to_string*/ |
1166 break; |
10884 break; |
1167 |
10885 |
1168 /**** |
10886 /**** |
1169 *LREAL_TO_WSTRING |
10887 *TOD_TO_REAL |
1170 */ |
10888 */ |
1171 case function_lreal_to_wstring : |
10889 case function_tod_to_real : |
1172 { |
10890 { |
1173 symbol_c *last_type_symbol = NULL; |
10891 symbol_c *last_type_symbol = NULL; |
1174 |
10892 |
1175 { |
10893 { |
1176 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10894 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1177 symbol_c *IN_param_value = &this->default_variable_name; |
10895 symbol_c *IN_param_value = &this->default_variable_name; |
1178 |
10896 |
1179 symbol_c *IN_type_symbol = param_data_type; |
10897 symbol_c *IN_type_symbol = param_data_type; |
1180 last_type_symbol = param_data_type; |
10898 last_type_symbol = param_data_type; |
1181 |
10899 |
1182 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
10900 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1183 { |
|
1184 |
|
1185 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
1186 s4o.print("("); |
|
1187 return_type_symbol->accept(*this); |
|
1188 s4o.print(")int_to_string("); |
|
1189 IN_param_value->accept(*this); |
|
1190 s4o.print(", 10)"); |
|
1191 return NULL; |
|
1192 |
|
1193 } |
|
1194 |
|
1195 ERROR; |
|
1196 } |
|
1197 |
|
1198 }/*function_lreal_to_wstring*/ |
|
1199 break; |
|
1200 |
|
1201 /**** |
|
1202 *LREAL_TO_DATE |
|
1203 */ |
|
1204 case function_lreal_to_date : |
|
1205 { |
|
1206 symbol_c *last_type_symbol = NULL; |
|
1207 |
|
1208 { |
|
1209 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1210 symbol_c *IN_param_value = &this->default_variable_name; |
|
1211 |
|
1212 symbol_c *IN_type_symbol = param_data_type; |
|
1213 last_type_symbol = param_data_type; |
|
1214 |
|
1215 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
|
1216 { |
|
1217 |
|
1218 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1219 s4o.print("("); |
|
1220 return_type_symbol->accept(*this); |
|
1221 s4o.print(")real_to_time("); |
|
1222 IN_param_value->accept(*this); |
|
1223 s4o.print(")"); |
|
1224 return NULL; |
|
1225 |
|
1226 } |
|
1227 |
|
1228 ERROR; |
|
1229 } |
|
1230 |
|
1231 }/*function_lreal_to_date*/ |
|
1232 break; |
|
1233 |
|
1234 /**** |
|
1235 *LREAL_TO_TOD |
|
1236 */ |
|
1237 case function_lreal_to_tod : |
|
1238 { |
|
1239 symbol_c *last_type_symbol = NULL; |
|
1240 |
|
1241 { |
|
1242 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1243 symbol_c *IN_param_value = &this->default_variable_name; |
|
1244 |
|
1245 symbol_c *IN_type_symbol = param_data_type; |
|
1246 last_type_symbol = param_data_type; |
|
1247 |
|
1248 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
|
1249 { |
|
1250 |
|
1251 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1252 s4o.print("("); |
|
1253 return_type_symbol->accept(*this); |
|
1254 s4o.print(")real_to_time("); |
|
1255 IN_param_value->accept(*this); |
|
1256 s4o.print(")"); |
|
1257 return NULL; |
|
1258 |
|
1259 } |
|
1260 |
|
1261 ERROR; |
|
1262 } |
|
1263 |
|
1264 }/*function_lreal_to_tod*/ |
|
1265 break; |
|
1266 |
|
1267 /**** |
|
1268 *LREAL_TO_DT |
|
1269 */ |
|
1270 case function_lreal_to_dt : |
|
1271 { |
|
1272 symbol_c *last_type_symbol = NULL; |
|
1273 |
|
1274 { |
|
1275 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1276 symbol_c *IN_param_value = &this->default_variable_name; |
|
1277 |
|
1278 symbol_c *IN_type_symbol = param_data_type; |
|
1279 last_type_symbol = param_data_type; |
|
1280 |
|
1281 if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) |
|
1282 { |
|
1283 |
|
1284 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1285 s4o.print("("); |
|
1286 return_type_symbol->accept(*this); |
|
1287 s4o.print(")real_to_time("); |
|
1288 IN_param_value->accept(*this); |
|
1289 s4o.print(")"); |
|
1290 return NULL; |
|
1291 |
|
1292 } |
|
1293 |
|
1294 ERROR; |
|
1295 } |
|
1296 |
|
1297 }/*function_lreal_to_dt*/ |
|
1298 break; |
|
1299 |
|
1300 /**** |
|
1301 *SINT_TO_REAL |
|
1302 */ |
|
1303 case function_sint_to_real : |
|
1304 { |
|
1305 symbol_c *last_type_symbol = NULL; |
|
1306 |
|
1307 { |
|
1308 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1309 symbol_c *IN_param_value = &this->default_variable_name; |
|
1310 |
|
1311 symbol_c *IN_type_symbol = param_data_type; |
|
1312 last_type_symbol = param_data_type; |
|
1313 |
|
1314 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
|
1315 { |
10901 { |
1316 |
10902 |
1317 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
10903 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
1318 s4o.print("("); |
10904 s4o.print("("); |
1319 return_type_symbol->accept(*this); |
10905 return_type_symbol->accept(*this); |
1320 s4o.print(")"); |
10906 s4o.print(")__time_to_real("); |
1321 IN_param_value->accept(*this); |
10907 IN_param_value->accept(*this); |
1322 return NULL; |
10908 s4o.print(")"); |
1323 |
10909 return NULL; |
1324 } |
10910 |
1325 |
10911 } |
1326 ERROR; |
10912 |
1327 } |
10913 ERROR; |
1328 |
10914 } |
1329 }/*function_sint_to_real*/ |
10915 |
1330 break; |
10916 }/*function_tod_to_real*/ |
1331 |
10917 break; |
1332 /**** |
10918 |
1333 *SINT_TO_LREAL |
10919 /**** |
1334 */ |
10920 *TOD_TO_LREAL |
1335 case function_sint_to_lreal : |
10921 */ |
1336 { |
10922 case function_tod_to_lreal : |
1337 symbol_c *last_type_symbol = NULL; |
10923 { |
1338 |
10924 symbol_c *last_type_symbol = NULL; |
1339 { |
10925 |
1340 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10926 { |
1341 symbol_c *IN_param_value = &this->default_variable_name; |
10927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1342 |
10928 symbol_c *IN_param_value = &this->default_variable_name; |
1343 symbol_c *IN_type_symbol = param_data_type; |
10929 |
1344 last_type_symbol = param_data_type; |
10930 symbol_c *IN_type_symbol = param_data_type; |
1345 |
10931 last_type_symbol = param_data_type; |
1346 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
10932 |
|
10933 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1347 { |
10934 { |
1348 |
10935 |
1349 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
10936 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
1350 s4o.print("("); |
10937 s4o.print("("); |
1351 return_type_symbol->accept(*this); |
10938 return_type_symbol->accept(*this); |
1352 s4o.print(")"); |
10939 s4o.print(")__time_to_real("); |
1353 IN_param_value->accept(*this); |
10940 IN_param_value->accept(*this); |
1354 return NULL; |
10941 s4o.print(")"); |
1355 |
10942 return NULL; |
1356 } |
10943 |
1357 |
10944 } |
1358 ERROR; |
10945 |
1359 } |
10946 ERROR; |
1360 |
10947 } |
1361 }/*function_sint_to_lreal*/ |
10948 |
1362 break; |
10949 }/*function_tod_to_lreal*/ |
1363 |
10950 break; |
1364 /**** |
10951 |
1365 *SINT_TO_INT |
10952 /**** |
1366 */ |
10953 *TOD_TO_SINT |
1367 case function_sint_to_int : |
10954 */ |
1368 { |
10955 case function_tod_to_sint : |
1369 symbol_c *last_type_symbol = NULL; |
10956 { |
1370 |
10957 symbol_c *last_type_symbol = NULL; |
1371 { |
10958 |
1372 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10959 { |
1373 symbol_c *IN_param_value = &this->default_variable_name; |
10960 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1374 |
10961 symbol_c *IN_param_value = &this->default_variable_name; |
1375 symbol_c *IN_type_symbol = param_data_type; |
10962 |
1376 last_type_symbol = param_data_type; |
10963 symbol_c *IN_type_symbol = param_data_type; |
1377 |
10964 last_type_symbol = param_data_type; |
1378 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
10965 |
|
10966 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
10967 { |
|
10968 |
|
10969 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10970 s4o.print("("); |
|
10971 return_type_symbol->accept(*this); |
|
10972 s4o.print(")__time_to_int("); |
|
10973 IN_param_value->accept(*this); |
|
10974 s4o.print(")"); |
|
10975 return NULL; |
|
10976 |
|
10977 } |
|
10978 |
|
10979 ERROR; |
|
10980 } |
|
10981 |
|
10982 }/*function_tod_to_sint*/ |
|
10983 break; |
|
10984 |
|
10985 /**** |
|
10986 *TOD_TO_INT |
|
10987 */ |
|
10988 case function_tod_to_int : |
|
10989 { |
|
10990 symbol_c *last_type_symbol = NULL; |
|
10991 |
|
10992 { |
|
10993 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10994 symbol_c *IN_param_value = &this->default_variable_name; |
|
10995 |
|
10996 symbol_c *IN_type_symbol = param_data_type; |
|
10997 last_type_symbol = param_data_type; |
|
10998 |
|
10999 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1379 { |
11000 { |
1380 |
11001 |
1381 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
11002 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
1382 s4o.print("("); |
11003 s4o.print("("); |
1383 return_type_symbol->accept(*this); |
11004 return_type_symbol->accept(*this); |
1384 s4o.print(")"); |
11005 s4o.print(")__time_to_int("); |
1385 IN_param_value->accept(*this); |
11006 IN_param_value->accept(*this); |
1386 return NULL; |
11007 s4o.print(")"); |
1387 |
11008 return NULL; |
1388 } |
11009 |
1389 |
11010 } |
1390 ERROR; |
11011 |
1391 } |
11012 ERROR; |
1392 |
11013 } |
1393 }/*function_sint_to_int*/ |
11014 |
1394 break; |
11015 }/*function_tod_to_int*/ |
1395 |
11016 break; |
1396 /**** |
11017 |
1397 *SINT_TO_DINT |
11018 /**** |
1398 */ |
11019 *TOD_TO_DINT |
1399 case function_sint_to_dint : |
11020 */ |
1400 { |
11021 case function_tod_to_dint : |
1401 symbol_c *last_type_symbol = NULL; |
11022 { |
1402 |
11023 symbol_c *last_type_symbol = NULL; |
1403 { |
11024 |
1404 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11025 { |
1405 symbol_c *IN_param_value = &this->default_variable_name; |
11026 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1406 |
11027 symbol_c *IN_param_value = &this->default_variable_name; |
1407 symbol_c *IN_type_symbol = param_data_type; |
11028 |
1408 last_type_symbol = param_data_type; |
11029 symbol_c *IN_type_symbol = param_data_type; |
1409 |
11030 last_type_symbol = param_data_type; |
1410 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11031 |
|
11032 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1411 { |
11033 { |
1412 |
11034 |
1413 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
11035 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
1414 s4o.print("("); |
11036 s4o.print("("); |
1415 return_type_symbol->accept(*this); |
11037 return_type_symbol->accept(*this); |
1416 s4o.print(")"); |
11038 s4o.print(")__time_to_int("); |
1417 IN_param_value->accept(*this); |
11039 IN_param_value->accept(*this); |
1418 return NULL; |
11040 s4o.print(")"); |
1419 |
11041 return NULL; |
1420 } |
11042 |
1421 |
11043 } |
1422 ERROR; |
11044 |
1423 } |
11045 ERROR; |
1424 |
11046 } |
1425 }/*function_sint_to_dint*/ |
11047 |
1426 break; |
11048 }/*function_tod_to_dint*/ |
1427 |
11049 break; |
1428 /**** |
11050 |
1429 *SINT_TO_LINT |
11051 /**** |
1430 */ |
11052 *TOD_TO_LINT |
1431 case function_sint_to_lint : |
11053 */ |
1432 { |
11054 case function_tod_to_lint : |
1433 symbol_c *last_type_symbol = NULL; |
11055 { |
1434 |
11056 symbol_c *last_type_symbol = NULL; |
1435 { |
11057 |
1436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11058 { |
1437 symbol_c *IN_param_value = &this->default_variable_name; |
11059 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1438 |
11060 symbol_c *IN_param_value = &this->default_variable_name; |
1439 symbol_c *IN_type_symbol = param_data_type; |
11061 |
1440 last_type_symbol = param_data_type; |
11062 symbol_c *IN_type_symbol = param_data_type; |
1441 |
11063 last_type_symbol = param_data_type; |
1442 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11064 |
|
11065 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1443 { |
11066 { |
1444 |
11067 |
1445 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
11068 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
1446 s4o.print("("); |
11069 s4o.print("("); |
1447 return_type_symbol->accept(*this); |
11070 return_type_symbol->accept(*this); |
1448 s4o.print(")"); |
11071 s4o.print(")__time_to_int("); |
1449 IN_param_value->accept(*this); |
11072 IN_param_value->accept(*this); |
1450 return NULL; |
11073 s4o.print(")"); |
1451 |
11074 return NULL; |
1452 } |
11075 |
1453 |
11076 } |
1454 ERROR; |
11077 |
1455 } |
11078 ERROR; |
1456 |
11079 } |
1457 }/*function_sint_to_lint*/ |
11080 |
1458 break; |
11081 }/*function_tod_to_lint*/ |
1459 |
11082 break; |
1460 /**** |
11083 |
1461 *SINT_TO_USINT |
11084 /**** |
1462 */ |
11085 *TOD_TO_USINT |
1463 case function_sint_to_usint : |
11086 */ |
1464 { |
11087 case function_tod_to_usint : |
1465 symbol_c *last_type_symbol = NULL; |
11088 { |
1466 |
11089 symbol_c *last_type_symbol = NULL; |
1467 { |
11090 |
1468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11091 { |
1469 symbol_c *IN_param_value = &this->default_variable_name; |
11092 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1470 |
11093 symbol_c *IN_param_value = &this->default_variable_name; |
1471 symbol_c *IN_type_symbol = param_data_type; |
11094 |
1472 last_type_symbol = param_data_type; |
11095 symbol_c *IN_type_symbol = param_data_type; |
1473 |
11096 last_type_symbol = param_data_type; |
1474 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11097 |
|
11098 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1475 { |
11099 { |
1476 |
11100 |
1477 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
11101 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
1478 s4o.print("("); |
11102 s4o.print("("); |
1479 return_type_symbol->accept(*this); |
11103 return_type_symbol->accept(*this); |
1480 s4o.print(")"); |
11104 s4o.print(")__time_to_int("); |
1481 IN_param_value->accept(*this); |
11105 IN_param_value->accept(*this); |
1482 return NULL; |
11106 s4o.print(")"); |
1483 |
11107 return NULL; |
1484 } |
11108 |
1485 |
11109 } |
1486 ERROR; |
11110 |
1487 } |
11111 ERROR; |
1488 |
11112 } |
1489 }/*function_sint_to_usint*/ |
11113 |
1490 break; |
11114 }/*function_tod_to_usint*/ |
1491 |
11115 break; |
1492 /**** |
11116 |
1493 *SINT_TO_UINT |
11117 /**** |
1494 */ |
11118 *TOD_TO_UINT |
1495 case function_sint_to_uint : |
11119 */ |
1496 { |
11120 case function_tod_to_uint : |
1497 symbol_c *last_type_symbol = NULL; |
11121 { |
1498 |
11122 symbol_c *last_type_symbol = NULL; |
1499 { |
11123 |
1500 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11124 { |
1501 symbol_c *IN_param_value = &this->default_variable_name; |
11125 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1502 |
11126 symbol_c *IN_param_value = &this->default_variable_name; |
1503 symbol_c *IN_type_symbol = param_data_type; |
11127 |
1504 last_type_symbol = param_data_type; |
11128 symbol_c *IN_type_symbol = param_data_type; |
1505 |
11129 last_type_symbol = param_data_type; |
1506 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11130 |
|
11131 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1507 { |
11132 { |
1508 |
11133 |
1509 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11134 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
1510 s4o.print("("); |
11135 s4o.print("("); |
1511 return_type_symbol->accept(*this); |
11136 return_type_symbol->accept(*this); |
1512 s4o.print(")"); |
11137 s4o.print(")__time_to_int("); |
1513 IN_param_value->accept(*this); |
11138 IN_param_value->accept(*this); |
1514 return NULL; |
11139 s4o.print(")"); |
1515 |
11140 return NULL; |
1516 } |
11141 |
1517 |
11142 } |
1518 ERROR; |
11143 |
1519 } |
11144 ERROR; |
1520 |
11145 } |
1521 }/*function_sint_to_uint*/ |
11146 |
1522 break; |
11147 }/*function_tod_to_uint*/ |
1523 |
11148 break; |
1524 /**** |
11149 |
1525 *SINT_TO_UDINT |
11150 /**** |
1526 */ |
11151 *TOD_TO_UDINT |
1527 case function_sint_to_udint : |
11152 */ |
1528 { |
11153 case function_tod_to_udint : |
1529 symbol_c *last_type_symbol = NULL; |
11154 { |
1530 |
11155 symbol_c *last_type_symbol = NULL; |
1531 { |
11156 |
1532 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11157 { |
1533 symbol_c *IN_param_value = &this->default_variable_name; |
11158 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1534 |
11159 symbol_c *IN_param_value = &this->default_variable_name; |
1535 symbol_c *IN_type_symbol = param_data_type; |
11160 |
1536 last_type_symbol = param_data_type; |
11161 symbol_c *IN_type_symbol = param_data_type; |
1537 |
11162 last_type_symbol = param_data_type; |
1538 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11163 |
|
11164 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1539 { |
11165 { |
1540 |
11166 |
1541 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
11167 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
1542 s4o.print("("); |
11168 s4o.print("("); |
1543 return_type_symbol->accept(*this); |
11169 return_type_symbol->accept(*this); |
1544 s4o.print(")"); |
11170 s4o.print(")__time_to_int("); |
1545 IN_param_value->accept(*this); |
11171 IN_param_value->accept(*this); |
1546 return NULL; |
11172 s4o.print(")"); |
1547 |
11173 return NULL; |
1548 } |
11174 |
1549 |
11175 } |
1550 ERROR; |
11176 |
1551 } |
11177 ERROR; |
1552 |
11178 } |
1553 }/*function_sint_to_udint*/ |
11179 |
1554 break; |
11180 }/*function_tod_to_udint*/ |
1555 |
11181 break; |
1556 /**** |
11182 |
1557 *SINT_TO_ULINT |
11183 /**** |
1558 */ |
11184 *TOD_TO_ULINT |
1559 case function_sint_to_ulint : |
11185 */ |
1560 { |
11186 case function_tod_to_ulint : |
1561 symbol_c *last_type_symbol = NULL; |
11187 { |
1562 |
11188 symbol_c *last_type_symbol = NULL; |
1563 { |
11189 |
1564 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11190 { |
1565 symbol_c *IN_param_value = &this->default_variable_name; |
11191 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1566 |
11192 symbol_c *IN_param_value = &this->default_variable_name; |
1567 symbol_c *IN_type_symbol = param_data_type; |
11193 |
1568 last_type_symbol = param_data_type; |
11194 symbol_c *IN_type_symbol = param_data_type; |
1569 |
11195 last_type_symbol = param_data_type; |
1570 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11196 |
|
11197 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1571 { |
11198 { |
1572 |
11199 |
1573 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11200 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
1574 s4o.print("("); |
11201 s4o.print("("); |
1575 return_type_symbol->accept(*this); |
11202 return_type_symbol->accept(*this); |
1576 s4o.print(")"); |
11203 s4o.print(")__time_to_int("); |
1577 IN_param_value->accept(*this); |
11204 IN_param_value->accept(*this); |
1578 return NULL; |
11205 s4o.print(")"); |
1579 |
11206 return NULL; |
1580 } |
11207 |
1581 |
11208 } |
1582 ERROR; |
11209 |
1583 } |
11210 ERROR; |
1584 |
11211 } |
1585 }/*function_sint_to_ulint*/ |
11212 |
1586 break; |
11213 }/*function_tod_to_ulint*/ |
1587 |
11214 break; |
1588 /**** |
11215 |
1589 *SINT_TO_TIME |
11216 /**** |
1590 */ |
11217 *TOD_TO_BOOL |
1591 case function_sint_to_time : |
11218 */ |
1592 { |
11219 case function_tod_to_bool : |
1593 symbol_c *last_type_symbol = NULL; |
11220 { |
1594 |
11221 symbol_c *last_type_symbol = NULL; |
1595 { |
11222 |
1596 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11223 { |
1597 symbol_c *IN_param_value = &this->default_variable_name; |
11224 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1598 |
11225 symbol_c *IN_param_value = &this->default_variable_name; |
1599 symbol_c *IN_type_symbol = param_data_type; |
11226 |
1600 last_type_symbol = param_data_type; |
11227 symbol_c *IN_type_symbol = param_data_type; |
1601 |
11228 last_type_symbol = param_data_type; |
1602 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11229 |
1603 { |
11230 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1604 |
|
1605 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1606 s4o.print("("); |
|
1607 return_type_symbol->accept(*this); |
|
1608 s4o.print(")real_to_time("); |
|
1609 IN_param_value->accept(*this); |
|
1610 s4o.print(")"); |
|
1611 return NULL; |
|
1612 |
|
1613 } |
|
1614 |
|
1615 ERROR; |
|
1616 } |
|
1617 |
|
1618 }/*function_sint_to_time*/ |
|
1619 break; |
|
1620 |
|
1621 /**** |
|
1622 *SINT_TO_BOOL |
|
1623 */ |
|
1624 case function_sint_to_bool : |
|
1625 { |
|
1626 symbol_c *last_type_symbol = NULL; |
|
1627 |
|
1628 { |
|
1629 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1630 symbol_c *IN_param_value = &this->default_variable_name; |
|
1631 |
|
1632 symbol_c *IN_type_symbol = param_data_type; |
|
1633 last_type_symbol = param_data_type; |
|
1634 |
|
1635 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
|
1636 { |
11231 { |
1637 |
11232 |
1638 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
11233 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
1639 s4o.print("("); |
11234 s4o.print("("); |
1640 return_type_symbol->accept(*this); |
11235 return_type_symbol->accept(*this); |
1641 s4o.print(")"); |
11236 s4o.print(")__time_to_int("); |
1642 IN_param_value->accept(*this); |
11237 IN_param_value->accept(*this); |
1643 return NULL; |
11238 s4o.print(")"); |
1644 |
11239 return NULL; |
1645 } |
11240 |
1646 |
11241 } |
1647 ERROR; |
11242 |
1648 } |
11243 ERROR; |
1649 |
11244 } |
1650 }/*function_sint_to_bool*/ |
11245 |
1651 break; |
11246 }/*function_tod_to_bool*/ |
1652 |
11247 break; |
1653 /**** |
11248 |
1654 *SINT_TO_BYTE |
11249 /**** |
1655 */ |
11250 *TOD_TO_BYTE |
1656 case function_sint_to_byte : |
11251 */ |
1657 { |
11252 case function_tod_to_byte : |
1658 symbol_c *last_type_symbol = NULL; |
11253 { |
1659 |
11254 symbol_c *last_type_symbol = NULL; |
1660 { |
11255 |
1661 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11256 { |
1662 symbol_c *IN_param_value = &this->default_variable_name; |
11257 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1663 |
11258 symbol_c *IN_param_value = &this->default_variable_name; |
1664 symbol_c *IN_type_symbol = param_data_type; |
11259 |
1665 last_type_symbol = param_data_type; |
11260 symbol_c *IN_type_symbol = param_data_type; |
1666 |
11261 last_type_symbol = param_data_type; |
1667 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11262 |
|
11263 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1668 { |
11264 { |
1669 |
11265 |
1670 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
11266 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
1671 s4o.print("("); |
11267 s4o.print("("); |
1672 return_type_symbol->accept(*this); |
11268 return_type_symbol->accept(*this); |
1673 s4o.print(")"); |
11269 s4o.print(")__time_to_int("); |
1674 IN_param_value->accept(*this); |
11270 IN_param_value->accept(*this); |
1675 return NULL; |
11271 s4o.print(")"); |
1676 |
11272 return NULL; |
1677 } |
11273 |
1678 |
11274 } |
1679 ERROR; |
11275 |
1680 } |
11276 ERROR; |
1681 |
11277 } |
1682 }/*function_sint_to_byte*/ |
11278 |
1683 break; |
11279 }/*function_tod_to_byte*/ |
1684 |
11280 break; |
1685 /**** |
11281 |
1686 *SINT_TO_WORD |
11282 /**** |
1687 */ |
11283 *TOD_TO_WORD |
1688 case function_sint_to_word : |
11284 */ |
1689 { |
11285 case function_tod_to_word : |
1690 symbol_c *last_type_symbol = NULL; |
11286 { |
1691 |
11287 symbol_c *last_type_symbol = NULL; |
1692 { |
11288 |
1693 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11289 { |
1694 symbol_c *IN_param_value = &this->default_variable_name; |
11290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1695 |
11291 symbol_c *IN_param_value = &this->default_variable_name; |
1696 symbol_c *IN_type_symbol = param_data_type; |
11292 |
1697 last_type_symbol = param_data_type; |
11293 symbol_c *IN_type_symbol = param_data_type; |
1698 |
11294 last_type_symbol = param_data_type; |
1699 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11295 |
|
11296 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1700 { |
11297 { |
1701 |
11298 |
1702 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
11299 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
1703 s4o.print("("); |
11300 s4o.print("("); |
1704 return_type_symbol->accept(*this); |
11301 return_type_symbol->accept(*this); |
1705 s4o.print(")"); |
11302 s4o.print(")__time_to_int("); |
1706 IN_param_value->accept(*this); |
11303 IN_param_value->accept(*this); |
1707 return NULL; |
11304 s4o.print(")"); |
1708 |
11305 return NULL; |
1709 } |
11306 |
1710 |
11307 } |
1711 ERROR; |
11308 |
1712 } |
11309 ERROR; |
1713 |
11310 } |
1714 }/*function_sint_to_word*/ |
11311 |
1715 break; |
11312 }/*function_tod_to_word*/ |
1716 |
11313 break; |
1717 /**** |
11314 |
1718 *SINT_TO_DWORD |
11315 /**** |
1719 */ |
11316 *TOD_TO_DWORD |
1720 case function_sint_to_dword : |
11317 */ |
1721 { |
11318 case function_tod_to_dword : |
1722 symbol_c *last_type_symbol = NULL; |
11319 { |
1723 |
11320 symbol_c *last_type_symbol = NULL; |
1724 { |
11321 |
1725 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11322 { |
1726 symbol_c *IN_param_value = &this->default_variable_name; |
11323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1727 |
11324 symbol_c *IN_param_value = &this->default_variable_name; |
1728 symbol_c *IN_type_symbol = param_data_type; |
11325 |
1729 last_type_symbol = param_data_type; |
11326 symbol_c *IN_type_symbol = param_data_type; |
1730 |
11327 last_type_symbol = param_data_type; |
1731 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11328 |
|
11329 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1732 { |
11330 { |
1733 |
11331 |
1734 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
11332 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
1735 s4o.print("("); |
11333 s4o.print("("); |
1736 return_type_symbol->accept(*this); |
11334 return_type_symbol->accept(*this); |
1737 s4o.print(")"); |
11335 s4o.print(")__time_to_int("); |
1738 IN_param_value->accept(*this); |
11336 IN_param_value->accept(*this); |
1739 return NULL; |
11337 s4o.print(")"); |
1740 |
11338 return NULL; |
1741 } |
11339 |
1742 |
11340 } |
1743 ERROR; |
11341 |
1744 } |
11342 ERROR; |
1745 |
11343 } |
1746 }/*function_sint_to_dword*/ |
11344 |
1747 break; |
11345 }/*function_tod_to_dword*/ |
1748 |
11346 break; |
1749 /**** |
11347 |
1750 *SINT_TO_LWORD |
11348 /**** |
1751 */ |
11349 *TOD_TO_LWORD |
1752 case function_sint_to_lword : |
11350 */ |
1753 { |
11351 case function_tod_to_lword : |
1754 symbol_c *last_type_symbol = NULL; |
11352 { |
1755 |
11353 symbol_c *last_type_symbol = NULL; |
1756 { |
11354 |
1757 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11355 { |
1758 symbol_c *IN_param_value = &this->default_variable_name; |
11356 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1759 |
11357 symbol_c *IN_param_value = &this->default_variable_name; |
1760 symbol_c *IN_type_symbol = param_data_type; |
11358 |
1761 last_type_symbol = param_data_type; |
11359 symbol_c *IN_type_symbol = param_data_type; |
1762 |
11360 last_type_symbol = param_data_type; |
1763 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11361 |
|
11362 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1764 { |
11363 { |
1765 |
11364 |
1766 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
11365 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
1767 s4o.print("("); |
11366 s4o.print("("); |
1768 return_type_symbol->accept(*this); |
11367 return_type_symbol->accept(*this); |
1769 s4o.print(")"); |
11368 s4o.print(")__time_to_int("); |
1770 IN_param_value->accept(*this); |
11369 IN_param_value->accept(*this); |
1771 return NULL; |
11370 s4o.print(")"); |
1772 |
11371 return NULL; |
1773 } |
11372 |
1774 |
11373 } |
1775 ERROR; |
11374 |
1776 } |
11375 ERROR; |
1777 |
11376 } |
1778 }/*function_sint_to_lword*/ |
11377 |
1779 break; |
11378 }/*function_tod_to_lword*/ |
1780 |
11379 break; |
1781 /**** |
11380 |
1782 *SINT_TO_STRING |
11381 /**** |
1783 */ |
11382 *TOD_TO_STRING |
1784 case function_sint_to_string : |
11383 */ |
1785 { |
11384 case function_tod_to_string : |
1786 symbol_c *last_type_symbol = NULL; |
11385 { |
1787 |
11386 symbol_c *last_type_symbol = NULL; |
1788 { |
11387 |
1789 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11388 { |
1790 symbol_c *IN_param_value = &this->default_variable_name; |
11389 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1791 |
11390 symbol_c *IN_param_value = &this->default_variable_name; |
1792 symbol_c *IN_type_symbol = param_data_type; |
11391 |
1793 last_type_symbol = param_data_type; |
11392 symbol_c *IN_type_symbol = param_data_type; |
1794 |
11393 last_type_symbol = param_data_type; |
1795 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11394 |
|
11395 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
1796 { |
11396 { |
1797 |
11397 |
1798 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11398 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
1799 s4o.print("("); |
11399 s4o.print("("); |
1800 return_type_symbol->accept(*this); |
11400 return_type_symbol->accept(*this); |
1801 s4o.print(")int_to_string("); |
11401 s4o.print(")__tod_to_string("); |
1802 IN_param_value->accept(*this); |
11402 IN_param_value->accept(*this); |
1803 s4o.print(", 10)"); |
11403 s4o.print(")"); |
1804 return NULL; |
11404 return NULL; |
1805 |
11405 |
1806 } |
11406 } |
1807 |
11407 |
1808 ERROR; |
11408 ERROR; |
1809 } |
11409 } |
1810 |
11410 |
1811 }/*function_sint_to_string*/ |
11411 }/*function_tod_to_string*/ |
1812 break; |
11412 break; |
1813 |
11413 |
1814 /**** |
11414 /**** |
1815 *SINT_TO_WSTRING |
11415 *DT_TO_REAL |
1816 */ |
11416 */ |
1817 case function_sint_to_wstring : |
11417 case function_dt_to_real : |
1818 { |
11418 { |
1819 symbol_c *last_type_symbol = NULL; |
11419 symbol_c *last_type_symbol = NULL; |
1820 |
11420 |
1821 { |
11421 { |
1822 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11422 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1823 symbol_c *IN_param_value = &this->default_variable_name; |
11423 symbol_c *IN_param_value = &this->default_variable_name; |
1824 |
11424 |
1825 symbol_c *IN_type_symbol = param_data_type; |
11425 symbol_c *IN_type_symbol = param_data_type; |
1826 last_type_symbol = param_data_type; |
11426 last_type_symbol = param_data_type; |
1827 |
11427 |
1828 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
11428 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
1829 { |
|
1830 |
|
1831 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
1832 s4o.print("("); |
|
1833 return_type_symbol->accept(*this); |
|
1834 s4o.print(")int_to_string("); |
|
1835 IN_param_value->accept(*this); |
|
1836 s4o.print(", 10)"); |
|
1837 return NULL; |
|
1838 |
|
1839 } |
|
1840 |
|
1841 ERROR; |
|
1842 } |
|
1843 |
|
1844 }/*function_sint_to_wstring*/ |
|
1845 break; |
|
1846 |
|
1847 /**** |
|
1848 *SINT_TO_DATE |
|
1849 */ |
|
1850 case function_sint_to_date : |
|
1851 { |
|
1852 symbol_c *last_type_symbol = NULL; |
|
1853 |
|
1854 { |
|
1855 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1856 symbol_c *IN_param_value = &this->default_variable_name; |
|
1857 |
|
1858 symbol_c *IN_type_symbol = param_data_type; |
|
1859 last_type_symbol = param_data_type; |
|
1860 |
|
1861 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
|
1862 { |
|
1863 |
|
1864 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1865 s4o.print("("); |
|
1866 return_type_symbol->accept(*this); |
|
1867 s4o.print(")real_to_time("); |
|
1868 IN_param_value->accept(*this); |
|
1869 s4o.print(")"); |
|
1870 return NULL; |
|
1871 |
|
1872 } |
|
1873 |
|
1874 ERROR; |
|
1875 } |
|
1876 |
|
1877 }/*function_sint_to_date*/ |
|
1878 break; |
|
1879 |
|
1880 /**** |
|
1881 *SINT_TO_TOD |
|
1882 */ |
|
1883 case function_sint_to_tod : |
|
1884 { |
|
1885 symbol_c *last_type_symbol = NULL; |
|
1886 |
|
1887 { |
|
1888 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1889 symbol_c *IN_param_value = &this->default_variable_name; |
|
1890 |
|
1891 symbol_c *IN_type_symbol = param_data_type; |
|
1892 last_type_symbol = param_data_type; |
|
1893 |
|
1894 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
|
1895 { |
|
1896 |
|
1897 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1898 s4o.print("("); |
|
1899 return_type_symbol->accept(*this); |
|
1900 s4o.print(")real_to_time("); |
|
1901 IN_param_value->accept(*this); |
|
1902 s4o.print(")"); |
|
1903 return NULL; |
|
1904 |
|
1905 } |
|
1906 |
|
1907 ERROR; |
|
1908 } |
|
1909 |
|
1910 }/*function_sint_to_tod*/ |
|
1911 break; |
|
1912 |
|
1913 /**** |
|
1914 *SINT_TO_DT |
|
1915 */ |
|
1916 case function_sint_to_dt : |
|
1917 { |
|
1918 symbol_c *last_type_symbol = NULL; |
|
1919 |
|
1920 { |
|
1921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1922 symbol_c *IN_param_value = &this->default_variable_name; |
|
1923 |
|
1924 symbol_c *IN_type_symbol = param_data_type; |
|
1925 last_type_symbol = param_data_type; |
|
1926 |
|
1927 if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) |
|
1928 { |
|
1929 |
|
1930 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1931 s4o.print("("); |
|
1932 return_type_symbol->accept(*this); |
|
1933 s4o.print(")real_to_time("); |
|
1934 IN_param_value->accept(*this); |
|
1935 s4o.print(")"); |
|
1936 return NULL; |
|
1937 |
|
1938 } |
|
1939 |
|
1940 ERROR; |
|
1941 } |
|
1942 |
|
1943 }/*function_sint_to_dt*/ |
|
1944 break; |
|
1945 |
|
1946 /**** |
|
1947 *INT_TO_REAL |
|
1948 */ |
|
1949 case function_int_to_real : |
|
1950 { |
|
1951 symbol_c *last_type_symbol = NULL; |
|
1952 |
|
1953 { |
|
1954 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1955 symbol_c *IN_param_value = &this->default_variable_name; |
|
1956 |
|
1957 symbol_c *IN_type_symbol = param_data_type; |
|
1958 last_type_symbol = param_data_type; |
|
1959 |
|
1960 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
1961 { |
11429 { |
1962 |
11430 |
1963 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
11431 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
1964 s4o.print("("); |
11432 s4o.print("("); |
1965 return_type_symbol->accept(*this); |
11433 return_type_symbol->accept(*this); |
1966 s4o.print(")"); |
11434 s4o.print(")__time_to_real("); |
1967 IN_param_value->accept(*this); |
11435 IN_param_value->accept(*this); |
1968 return NULL; |
11436 s4o.print(")"); |
1969 |
11437 return NULL; |
1970 } |
11438 |
1971 |
11439 } |
1972 ERROR; |
11440 |
1973 } |
11441 ERROR; |
1974 |
11442 } |
1975 }/*function_int_to_real*/ |
11443 |
1976 break; |
11444 }/*function_dt_to_real*/ |
1977 |
11445 break; |
1978 /**** |
11446 |
1979 *INT_TO_LREAL |
11447 /**** |
1980 */ |
11448 *DT_TO_LREAL |
1981 case function_int_to_lreal : |
11449 */ |
1982 { |
11450 case function_dt_to_lreal : |
1983 symbol_c *last_type_symbol = NULL; |
11451 { |
1984 |
11452 symbol_c *last_type_symbol = NULL; |
1985 { |
11453 |
1986 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11454 { |
1987 symbol_c *IN_param_value = &this->default_variable_name; |
11455 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1988 |
11456 symbol_c *IN_param_value = &this->default_variable_name; |
1989 symbol_c *IN_type_symbol = param_data_type; |
11457 |
1990 last_type_symbol = param_data_type; |
11458 symbol_c *IN_type_symbol = param_data_type; |
1991 |
11459 last_type_symbol = param_data_type; |
1992 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11460 |
|
11461 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
1993 { |
11462 { |
1994 |
11463 |
1995 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
11464 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
1996 s4o.print("("); |
11465 s4o.print("("); |
1997 return_type_symbol->accept(*this); |
11466 return_type_symbol->accept(*this); |
1998 s4o.print(")"); |
11467 s4o.print(")__time_to_real("); |
1999 IN_param_value->accept(*this); |
11468 IN_param_value->accept(*this); |
2000 return NULL; |
11469 s4o.print(")"); |
2001 |
11470 return NULL; |
2002 } |
11471 |
2003 |
11472 } |
2004 ERROR; |
11473 |
2005 } |
11474 ERROR; |
2006 |
11475 } |
2007 }/*function_int_to_lreal*/ |
11476 |
2008 break; |
11477 }/*function_dt_to_lreal*/ |
2009 |
11478 break; |
2010 /**** |
11479 |
2011 *INT_TO_SINT |
11480 /**** |
2012 */ |
11481 *DT_TO_SINT |
2013 case function_int_to_sint : |
11482 */ |
2014 { |
11483 case function_dt_to_sint : |
2015 symbol_c *last_type_symbol = NULL; |
11484 { |
2016 |
11485 symbol_c *last_type_symbol = NULL; |
2017 { |
11486 |
2018 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11487 { |
2019 symbol_c *IN_param_value = &this->default_variable_name; |
11488 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2020 |
11489 symbol_c *IN_param_value = &this->default_variable_name; |
2021 symbol_c *IN_type_symbol = param_data_type; |
11490 |
2022 last_type_symbol = param_data_type; |
11491 symbol_c *IN_type_symbol = param_data_type; |
2023 |
11492 last_type_symbol = param_data_type; |
2024 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11493 |
|
11494 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2025 { |
11495 { |
2026 |
11496 |
2027 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
11497 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
2028 s4o.print("("); |
11498 s4o.print("("); |
2029 return_type_symbol->accept(*this); |
11499 return_type_symbol->accept(*this); |
2030 s4o.print(")"); |
11500 s4o.print(")__time_to_int("); |
2031 IN_param_value->accept(*this); |
11501 IN_param_value->accept(*this); |
2032 return NULL; |
11502 s4o.print(")"); |
2033 |
11503 return NULL; |
2034 } |
11504 |
2035 |
11505 } |
2036 ERROR; |
11506 |
2037 } |
11507 ERROR; |
2038 |
11508 } |
2039 }/*function_int_to_sint*/ |
11509 |
2040 break; |
11510 }/*function_dt_to_sint*/ |
2041 |
11511 break; |
2042 /**** |
11512 |
2043 *INT_TO_DINT |
11513 /**** |
2044 */ |
11514 *DT_TO_INT |
2045 case function_int_to_dint : |
11515 */ |
2046 { |
11516 case function_dt_to_int : |
2047 symbol_c *last_type_symbol = NULL; |
11517 { |
2048 |
11518 symbol_c *last_type_symbol = NULL; |
2049 { |
11519 |
2050 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11520 { |
2051 symbol_c *IN_param_value = &this->default_variable_name; |
11521 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2052 |
11522 symbol_c *IN_param_value = &this->default_variable_name; |
2053 symbol_c *IN_type_symbol = param_data_type; |
11523 |
2054 last_type_symbol = param_data_type; |
11524 symbol_c *IN_type_symbol = param_data_type; |
2055 |
11525 last_type_symbol = param_data_type; |
2056 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11526 |
|
11527 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
11528 { |
|
11529 |
|
11530 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11531 s4o.print("("); |
|
11532 return_type_symbol->accept(*this); |
|
11533 s4o.print(")__time_to_int("); |
|
11534 IN_param_value->accept(*this); |
|
11535 s4o.print(")"); |
|
11536 return NULL; |
|
11537 |
|
11538 } |
|
11539 |
|
11540 ERROR; |
|
11541 } |
|
11542 |
|
11543 }/*function_dt_to_int*/ |
|
11544 break; |
|
11545 |
|
11546 /**** |
|
11547 *DT_TO_DINT |
|
11548 */ |
|
11549 case function_dt_to_dint : |
|
11550 { |
|
11551 symbol_c *last_type_symbol = NULL; |
|
11552 |
|
11553 { |
|
11554 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11555 symbol_c *IN_param_value = &this->default_variable_name; |
|
11556 |
|
11557 symbol_c *IN_type_symbol = param_data_type; |
|
11558 last_type_symbol = param_data_type; |
|
11559 |
|
11560 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2057 { |
11561 { |
2058 |
11562 |
2059 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
11563 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
2060 s4o.print("("); |
11564 s4o.print("("); |
2061 return_type_symbol->accept(*this); |
11565 return_type_symbol->accept(*this); |
2062 s4o.print(")"); |
11566 s4o.print(")__time_to_int("); |
2063 IN_param_value->accept(*this); |
11567 IN_param_value->accept(*this); |
2064 return NULL; |
11568 s4o.print(")"); |
2065 |
11569 return NULL; |
2066 } |
11570 |
2067 |
11571 } |
2068 ERROR; |
11572 |
2069 } |
11573 ERROR; |
2070 |
11574 } |
2071 }/*function_int_to_dint*/ |
11575 |
2072 break; |
11576 }/*function_dt_to_dint*/ |
2073 |
11577 break; |
2074 /**** |
11578 |
2075 *INT_TO_LINT |
11579 /**** |
2076 */ |
11580 *DT_TO_LINT |
2077 case function_int_to_lint : |
11581 */ |
2078 { |
11582 case function_dt_to_lint : |
2079 symbol_c *last_type_symbol = NULL; |
11583 { |
2080 |
11584 symbol_c *last_type_symbol = NULL; |
2081 { |
11585 |
2082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11586 { |
2083 symbol_c *IN_param_value = &this->default_variable_name; |
11587 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2084 |
11588 symbol_c *IN_param_value = &this->default_variable_name; |
2085 symbol_c *IN_type_symbol = param_data_type; |
11589 |
2086 last_type_symbol = param_data_type; |
11590 symbol_c *IN_type_symbol = param_data_type; |
2087 |
11591 last_type_symbol = param_data_type; |
2088 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11592 |
|
11593 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2089 { |
11594 { |
2090 |
11595 |
2091 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
11596 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
2092 s4o.print("("); |
11597 s4o.print("("); |
2093 return_type_symbol->accept(*this); |
11598 return_type_symbol->accept(*this); |
2094 s4o.print(")"); |
11599 s4o.print(")__time_to_int("); |
2095 IN_param_value->accept(*this); |
11600 IN_param_value->accept(*this); |
2096 return NULL; |
11601 s4o.print(")"); |
2097 |
11602 return NULL; |
2098 } |
11603 |
2099 |
11604 } |
2100 ERROR; |
11605 |
2101 } |
11606 ERROR; |
2102 |
11607 } |
2103 }/*function_int_to_lint*/ |
11608 |
2104 break; |
11609 }/*function_dt_to_lint*/ |
2105 |
11610 break; |
2106 /**** |
11611 |
2107 *INT_TO_USINT |
11612 /**** |
2108 */ |
11613 *DT_TO_USINT |
2109 case function_int_to_usint : |
11614 */ |
2110 { |
11615 case function_dt_to_usint : |
2111 symbol_c *last_type_symbol = NULL; |
11616 { |
2112 |
11617 symbol_c *last_type_symbol = NULL; |
2113 { |
11618 |
2114 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11619 { |
2115 symbol_c *IN_param_value = &this->default_variable_name; |
11620 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2116 |
11621 symbol_c *IN_param_value = &this->default_variable_name; |
2117 symbol_c *IN_type_symbol = param_data_type; |
11622 |
2118 last_type_symbol = param_data_type; |
11623 symbol_c *IN_type_symbol = param_data_type; |
2119 |
11624 last_type_symbol = param_data_type; |
2120 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11625 |
|
11626 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2121 { |
11627 { |
2122 |
11628 |
2123 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
11629 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
2124 s4o.print("("); |
11630 s4o.print("("); |
2125 return_type_symbol->accept(*this); |
11631 return_type_symbol->accept(*this); |
2126 s4o.print(")"); |
11632 s4o.print(")__time_to_int("); |
2127 IN_param_value->accept(*this); |
11633 IN_param_value->accept(*this); |
2128 return NULL; |
11634 s4o.print(")"); |
2129 |
11635 return NULL; |
2130 } |
11636 |
2131 |
11637 } |
2132 ERROR; |
11638 |
2133 } |
11639 ERROR; |
2134 |
11640 } |
2135 }/*function_int_to_usint*/ |
11641 |
2136 break; |
11642 }/*function_dt_to_usint*/ |
2137 |
11643 break; |
2138 /**** |
11644 |
2139 *INT_TO_UINT |
11645 /**** |
2140 */ |
11646 *DT_TO_UINT |
2141 case function_int_to_uint : |
11647 */ |
2142 { |
11648 case function_dt_to_uint : |
2143 symbol_c *last_type_symbol = NULL; |
11649 { |
2144 |
11650 symbol_c *last_type_symbol = NULL; |
2145 { |
11651 |
2146 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11652 { |
2147 symbol_c *IN_param_value = &this->default_variable_name; |
11653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2148 |
11654 symbol_c *IN_param_value = &this->default_variable_name; |
2149 symbol_c *IN_type_symbol = param_data_type; |
11655 |
2150 last_type_symbol = param_data_type; |
11656 symbol_c *IN_type_symbol = param_data_type; |
2151 |
11657 last_type_symbol = param_data_type; |
2152 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11658 |
|
11659 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2153 { |
11660 { |
2154 |
11661 |
2155 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11662 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
2156 s4o.print("("); |
11663 s4o.print("("); |
2157 return_type_symbol->accept(*this); |
11664 return_type_symbol->accept(*this); |
2158 s4o.print(")"); |
11665 s4o.print(")__time_to_int("); |
2159 IN_param_value->accept(*this); |
11666 IN_param_value->accept(*this); |
2160 return NULL; |
11667 s4o.print(")"); |
2161 |
11668 return NULL; |
2162 } |
11669 |
2163 |
11670 } |
2164 ERROR; |
11671 |
2165 } |
11672 ERROR; |
2166 |
11673 } |
2167 }/*function_int_to_uint*/ |
11674 |
2168 break; |
11675 }/*function_dt_to_uint*/ |
2169 |
11676 break; |
2170 /**** |
11677 |
2171 *INT_TO_UDINT |
11678 /**** |
2172 */ |
11679 *DT_TO_UDINT |
2173 case function_int_to_udint : |
11680 */ |
2174 { |
11681 case function_dt_to_udint : |
2175 symbol_c *last_type_symbol = NULL; |
11682 { |
2176 |
11683 symbol_c *last_type_symbol = NULL; |
2177 { |
11684 |
2178 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11685 { |
2179 symbol_c *IN_param_value = &this->default_variable_name; |
11686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2180 |
11687 symbol_c *IN_param_value = &this->default_variable_name; |
2181 symbol_c *IN_type_symbol = param_data_type; |
11688 |
2182 last_type_symbol = param_data_type; |
11689 symbol_c *IN_type_symbol = param_data_type; |
2183 |
11690 last_type_symbol = param_data_type; |
2184 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11691 |
|
11692 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2185 { |
11693 { |
2186 |
11694 |
2187 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
11695 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
2188 s4o.print("("); |
11696 s4o.print("("); |
2189 return_type_symbol->accept(*this); |
11697 return_type_symbol->accept(*this); |
2190 s4o.print(")"); |
11698 s4o.print(")__time_to_int("); |
2191 IN_param_value->accept(*this); |
11699 IN_param_value->accept(*this); |
2192 return NULL; |
11700 s4o.print(")"); |
2193 |
11701 return NULL; |
2194 } |
11702 |
2195 |
11703 } |
2196 ERROR; |
11704 |
2197 } |
11705 ERROR; |
2198 |
11706 } |
2199 }/*function_int_to_udint*/ |
11707 |
2200 break; |
11708 }/*function_dt_to_udint*/ |
2201 |
11709 break; |
2202 /**** |
11710 |
2203 *INT_TO_ULINT |
11711 /**** |
2204 */ |
11712 *DT_TO_ULINT |
2205 case function_int_to_ulint : |
11713 */ |
2206 { |
11714 case function_dt_to_ulint : |
2207 symbol_c *last_type_symbol = NULL; |
11715 { |
2208 |
11716 symbol_c *last_type_symbol = NULL; |
2209 { |
11717 |
2210 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11718 { |
2211 symbol_c *IN_param_value = &this->default_variable_name; |
11719 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2212 |
11720 symbol_c *IN_param_value = &this->default_variable_name; |
2213 symbol_c *IN_type_symbol = param_data_type; |
11721 |
2214 last_type_symbol = param_data_type; |
11722 symbol_c *IN_type_symbol = param_data_type; |
2215 |
11723 last_type_symbol = param_data_type; |
2216 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11724 |
|
11725 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2217 { |
11726 { |
2218 |
11727 |
2219 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11728 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
2220 s4o.print("("); |
11729 s4o.print("("); |
2221 return_type_symbol->accept(*this); |
11730 return_type_symbol->accept(*this); |
2222 s4o.print(")"); |
11731 s4o.print(")__time_to_int("); |
2223 IN_param_value->accept(*this); |
11732 IN_param_value->accept(*this); |
2224 return NULL; |
11733 s4o.print(")"); |
2225 |
11734 return NULL; |
2226 } |
11735 |
2227 |
11736 } |
2228 ERROR; |
11737 |
2229 } |
11738 ERROR; |
2230 |
11739 } |
2231 }/*function_int_to_ulint*/ |
11740 |
2232 break; |
11741 }/*function_dt_to_ulint*/ |
2233 |
11742 break; |
2234 /**** |
11743 |
2235 *INT_TO_TIME |
11744 /**** |
2236 */ |
11745 *DT_TO_BOOL |
2237 case function_int_to_time : |
11746 */ |
2238 { |
11747 case function_dt_to_bool : |
2239 symbol_c *last_type_symbol = NULL; |
11748 { |
2240 |
11749 symbol_c *last_type_symbol = NULL; |
2241 { |
11750 |
2242 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11751 { |
2243 symbol_c *IN_param_value = &this->default_variable_name; |
11752 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2244 |
11753 symbol_c *IN_param_value = &this->default_variable_name; |
2245 symbol_c *IN_type_symbol = param_data_type; |
11754 |
2246 last_type_symbol = param_data_type; |
11755 symbol_c *IN_type_symbol = param_data_type; |
2247 |
11756 last_type_symbol = param_data_type; |
2248 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11757 |
2249 { |
11758 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2250 |
|
2251 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2252 s4o.print("("); |
|
2253 return_type_symbol->accept(*this); |
|
2254 s4o.print(")real_to_time("); |
|
2255 IN_param_value->accept(*this); |
|
2256 s4o.print(")"); |
|
2257 return NULL; |
|
2258 |
|
2259 } |
|
2260 |
|
2261 ERROR; |
|
2262 } |
|
2263 |
|
2264 }/*function_int_to_time*/ |
|
2265 break; |
|
2266 |
|
2267 /**** |
|
2268 *INT_TO_BOOL |
|
2269 */ |
|
2270 case function_int_to_bool : |
|
2271 { |
|
2272 symbol_c *last_type_symbol = NULL; |
|
2273 |
|
2274 { |
|
2275 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2276 symbol_c *IN_param_value = &this->default_variable_name; |
|
2277 |
|
2278 symbol_c *IN_type_symbol = param_data_type; |
|
2279 last_type_symbol = param_data_type; |
|
2280 |
|
2281 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
2282 { |
11759 { |
2283 |
11760 |
2284 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
11761 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
2285 s4o.print("("); |
11762 s4o.print("("); |
2286 return_type_symbol->accept(*this); |
11763 return_type_symbol->accept(*this); |
2287 s4o.print(")"); |
11764 s4o.print(")__time_to_int("); |
2288 IN_param_value->accept(*this); |
11765 IN_param_value->accept(*this); |
2289 return NULL; |
11766 s4o.print(")"); |
2290 |
11767 return NULL; |
2291 } |
11768 |
2292 |
11769 } |
2293 ERROR; |
11770 |
2294 } |
11771 ERROR; |
2295 |
11772 } |
2296 }/*function_int_to_bool*/ |
11773 |
2297 break; |
11774 }/*function_dt_to_bool*/ |
2298 |
11775 break; |
2299 /**** |
11776 |
2300 *INT_TO_BYTE |
11777 /**** |
2301 */ |
11778 *DT_TO_BYTE |
2302 case function_int_to_byte : |
11779 */ |
2303 { |
11780 case function_dt_to_byte : |
2304 symbol_c *last_type_symbol = NULL; |
11781 { |
2305 |
11782 symbol_c *last_type_symbol = NULL; |
2306 { |
11783 |
2307 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11784 { |
2308 symbol_c *IN_param_value = &this->default_variable_name; |
11785 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2309 |
11786 symbol_c *IN_param_value = &this->default_variable_name; |
2310 symbol_c *IN_type_symbol = param_data_type; |
11787 |
2311 last_type_symbol = param_data_type; |
11788 symbol_c *IN_type_symbol = param_data_type; |
2312 |
11789 last_type_symbol = param_data_type; |
2313 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11790 |
|
11791 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2314 { |
11792 { |
2315 |
11793 |
2316 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
11794 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
2317 s4o.print("("); |
11795 s4o.print("("); |
2318 return_type_symbol->accept(*this); |
11796 return_type_symbol->accept(*this); |
2319 s4o.print(")"); |
11797 s4o.print(")__time_to_int("); |
2320 IN_param_value->accept(*this); |
11798 IN_param_value->accept(*this); |
2321 return NULL; |
11799 s4o.print(")"); |
2322 |
11800 return NULL; |
2323 } |
11801 |
2324 |
11802 } |
2325 ERROR; |
11803 |
2326 } |
11804 ERROR; |
2327 |
11805 } |
2328 }/*function_int_to_byte*/ |
11806 |
2329 break; |
11807 }/*function_dt_to_byte*/ |
2330 |
11808 break; |
2331 /**** |
11809 |
2332 *INT_TO_WORD |
11810 /**** |
2333 */ |
11811 *DT_TO_WORD |
2334 case function_int_to_word : |
11812 */ |
2335 { |
11813 case function_dt_to_word : |
2336 symbol_c *last_type_symbol = NULL; |
11814 { |
2337 |
11815 symbol_c *last_type_symbol = NULL; |
2338 { |
11816 |
2339 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11817 { |
2340 symbol_c *IN_param_value = &this->default_variable_name; |
11818 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2341 |
11819 symbol_c *IN_param_value = &this->default_variable_name; |
2342 symbol_c *IN_type_symbol = param_data_type; |
11820 |
2343 last_type_symbol = param_data_type; |
11821 symbol_c *IN_type_symbol = param_data_type; |
2344 |
11822 last_type_symbol = param_data_type; |
2345 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11823 |
|
11824 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2346 { |
11825 { |
2347 |
11826 |
2348 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
11827 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
2349 s4o.print("("); |
11828 s4o.print("("); |
2350 return_type_symbol->accept(*this); |
11829 return_type_symbol->accept(*this); |
2351 s4o.print(")"); |
11830 s4o.print(")__time_to_int("); |
2352 IN_param_value->accept(*this); |
11831 IN_param_value->accept(*this); |
2353 return NULL; |
11832 s4o.print(")"); |
2354 |
11833 return NULL; |
2355 } |
11834 |
2356 |
11835 } |
2357 ERROR; |
11836 |
2358 } |
11837 ERROR; |
2359 |
11838 } |
2360 }/*function_int_to_word*/ |
11839 |
2361 break; |
11840 }/*function_dt_to_word*/ |
2362 |
11841 break; |
2363 /**** |
11842 |
2364 *INT_TO_DWORD |
11843 /**** |
2365 */ |
11844 *DT_TO_DWORD |
2366 case function_int_to_dword : |
11845 */ |
2367 { |
11846 case function_dt_to_dword : |
2368 symbol_c *last_type_symbol = NULL; |
11847 { |
2369 |
11848 symbol_c *last_type_symbol = NULL; |
2370 { |
11849 |
2371 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11850 { |
2372 symbol_c *IN_param_value = &this->default_variable_name; |
11851 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2373 |
11852 symbol_c *IN_param_value = &this->default_variable_name; |
2374 symbol_c *IN_type_symbol = param_data_type; |
11853 |
2375 last_type_symbol = param_data_type; |
11854 symbol_c *IN_type_symbol = param_data_type; |
2376 |
11855 last_type_symbol = param_data_type; |
2377 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11856 |
|
11857 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2378 { |
11858 { |
2379 |
11859 |
2380 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
11860 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
2381 s4o.print("("); |
11861 s4o.print("("); |
2382 return_type_symbol->accept(*this); |
11862 return_type_symbol->accept(*this); |
2383 s4o.print(")"); |
11863 s4o.print(")__time_to_int("); |
2384 IN_param_value->accept(*this); |
11864 IN_param_value->accept(*this); |
2385 return NULL; |
11865 s4o.print(")"); |
2386 |
11866 return NULL; |
2387 } |
11867 |
2388 |
11868 } |
2389 ERROR; |
11869 |
2390 } |
11870 ERROR; |
2391 |
11871 } |
2392 }/*function_int_to_dword*/ |
11872 |
2393 break; |
11873 }/*function_dt_to_dword*/ |
2394 |
11874 break; |
2395 /**** |
11875 |
2396 *INT_TO_LWORD |
11876 /**** |
2397 */ |
11877 *DT_TO_LWORD |
2398 case function_int_to_lword : |
11878 */ |
2399 { |
11879 case function_dt_to_lword : |
2400 symbol_c *last_type_symbol = NULL; |
11880 { |
2401 |
11881 symbol_c *last_type_symbol = NULL; |
2402 { |
11882 |
2403 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11883 { |
2404 symbol_c *IN_param_value = &this->default_variable_name; |
11884 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2405 |
11885 symbol_c *IN_param_value = &this->default_variable_name; |
2406 symbol_c *IN_type_symbol = param_data_type; |
11886 |
2407 last_type_symbol = param_data_type; |
11887 symbol_c *IN_type_symbol = param_data_type; |
2408 |
11888 last_type_symbol = param_data_type; |
2409 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11889 |
|
11890 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2410 { |
11891 { |
2411 |
11892 |
2412 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
11893 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
2413 s4o.print("("); |
11894 s4o.print("("); |
2414 return_type_symbol->accept(*this); |
11895 return_type_symbol->accept(*this); |
2415 s4o.print(")"); |
11896 s4o.print(")__time_to_int("); |
2416 IN_param_value->accept(*this); |
11897 IN_param_value->accept(*this); |
2417 return NULL; |
11898 s4o.print(")"); |
2418 |
11899 return NULL; |
2419 } |
11900 |
2420 |
11901 } |
2421 ERROR; |
11902 |
2422 } |
11903 ERROR; |
2423 |
11904 } |
2424 }/*function_int_to_lword*/ |
11905 |
2425 break; |
11906 }/*function_dt_to_lword*/ |
2426 |
11907 break; |
2427 /**** |
11908 |
2428 *INT_TO_STRING |
11909 /**** |
2429 */ |
11910 *DT_TO_STRING |
2430 case function_int_to_string : |
11911 */ |
2431 { |
11912 case function_dt_to_string : |
2432 symbol_c *last_type_symbol = NULL; |
11913 { |
2433 |
11914 symbol_c *last_type_symbol = NULL; |
2434 { |
11915 |
2435 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11916 { |
2436 symbol_c *IN_param_value = &this->default_variable_name; |
11917 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2437 |
11918 symbol_c *IN_param_value = &this->default_variable_name; |
2438 symbol_c *IN_type_symbol = param_data_type; |
11919 |
2439 last_type_symbol = param_data_type; |
11920 symbol_c *IN_type_symbol = param_data_type; |
2440 |
11921 last_type_symbol = param_data_type; |
2441 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
11922 |
|
11923 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
2442 { |
11924 { |
2443 |
11925 |
2444 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11926 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
2445 s4o.print("("); |
11927 s4o.print("("); |
2446 return_type_symbol->accept(*this); |
11928 return_type_symbol->accept(*this); |
2447 s4o.print(")int_to_string("); |
11929 s4o.print(")__dt_to_string("); |
2448 IN_param_value->accept(*this); |
|
2449 s4o.print(", 10)"); |
|
2450 return NULL; |
|
2451 |
|
2452 } |
|
2453 |
|
2454 ERROR; |
|
2455 } |
|
2456 |
|
2457 }/*function_int_to_string*/ |
|
2458 break; |
|
2459 |
|
2460 /**** |
|
2461 *INT_TO_WSTRING |
|
2462 */ |
|
2463 case function_int_to_wstring : |
|
2464 { |
|
2465 symbol_c *last_type_symbol = NULL; |
|
2466 |
|
2467 { |
|
2468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2469 symbol_c *IN_param_value = &this->default_variable_name; |
|
2470 |
|
2471 symbol_c *IN_type_symbol = param_data_type; |
|
2472 last_type_symbol = param_data_type; |
|
2473 |
|
2474 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
2475 { |
|
2476 |
|
2477 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
2478 s4o.print("("); |
|
2479 return_type_symbol->accept(*this); |
|
2480 s4o.print(")int_to_string("); |
|
2481 IN_param_value->accept(*this); |
|
2482 s4o.print(", 10)"); |
|
2483 return NULL; |
|
2484 |
|
2485 } |
|
2486 |
|
2487 ERROR; |
|
2488 } |
|
2489 |
|
2490 }/*function_int_to_wstring*/ |
|
2491 break; |
|
2492 |
|
2493 /**** |
|
2494 *INT_TO_DATE |
|
2495 */ |
|
2496 case function_int_to_date : |
|
2497 { |
|
2498 symbol_c *last_type_symbol = NULL; |
|
2499 |
|
2500 { |
|
2501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2502 symbol_c *IN_param_value = &this->default_variable_name; |
|
2503 |
|
2504 symbol_c *IN_type_symbol = param_data_type; |
|
2505 last_type_symbol = param_data_type; |
|
2506 |
|
2507 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
2508 { |
|
2509 |
|
2510 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
2511 s4o.print("("); |
|
2512 return_type_symbol->accept(*this); |
|
2513 s4o.print(")real_to_time("); |
|
2514 IN_param_value->accept(*this); |
|
2515 s4o.print(")"); |
|
2516 return NULL; |
|
2517 |
|
2518 } |
|
2519 |
|
2520 ERROR; |
|
2521 } |
|
2522 |
|
2523 }/*function_int_to_date*/ |
|
2524 break; |
|
2525 |
|
2526 /**** |
|
2527 *INT_TO_TOD |
|
2528 */ |
|
2529 case function_int_to_tod : |
|
2530 { |
|
2531 symbol_c *last_type_symbol = NULL; |
|
2532 |
|
2533 { |
|
2534 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2535 symbol_c *IN_param_value = &this->default_variable_name; |
|
2536 |
|
2537 symbol_c *IN_type_symbol = param_data_type; |
|
2538 last_type_symbol = param_data_type; |
|
2539 |
|
2540 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
2541 { |
|
2542 |
|
2543 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2544 s4o.print("("); |
|
2545 return_type_symbol->accept(*this); |
|
2546 s4o.print(")real_to_time("); |
|
2547 IN_param_value->accept(*this); |
|
2548 s4o.print(")"); |
|
2549 return NULL; |
|
2550 |
|
2551 } |
|
2552 |
|
2553 ERROR; |
|
2554 } |
|
2555 |
|
2556 }/*function_int_to_tod*/ |
|
2557 break; |
|
2558 |
|
2559 /**** |
|
2560 *INT_TO_DT |
|
2561 */ |
|
2562 case function_int_to_dt : |
|
2563 { |
|
2564 symbol_c *last_type_symbol = NULL; |
|
2565 |
|
2566 { |
|
2567 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2568 symbol_c *IN_param_value = &this->default_variable_name; |
|
2569 |
|
2570 symbol_c *IN_type_symbol = param_data_type; |
|
2571 last_type_symbol = param_data_type; |
|
2572 |
|
2573 if (typeid(*last_type_symbol) == typeid(int_type_name_c)) |
|
2574 { |
|
2575 |
|
2576 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
2577 s4o.print("("); |
|
2578 return_type_symbol->accept(*this); |
|
2579 s4o.print(")real_to_time("); |
|
2580 IN_param_value->accept(*this); |
|
2581 s4o.print(")"); |
|
2582 return NULL; |
|
2583 |
|
2584 } |
|
2585 |
|
2586 ERROR; |
|
2587 } |
|
2588 |
|
2589 }/*function_int_to_dt*/ |
|
2590 break; |
|
2591 |
|
2592 /**** |
|
2593 *DINT_TO_REAL |
|
2594 */ |
|
2595 case function_dint_to_real : |
|
2596 { |
|
2597 symbol_c *last_type_symbol = NULL; |
|
2598 |
|
2599 { |
|
2600 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2601 symbol_c *IN_param_value = &this->default_variable_name; |
|
2602 |
|
2603 symbol_c *IN_type_symbol = param_data_type; |
|
2604 last_type_symbol = param_data_type; |
|
2605 |
|
2606 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2607 { |
|
2608 |
|
2609 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2610 s4o.print("("); |
|
2611 return_type_symbol->accept(*this); |
|
2612 s4o.print(")"); |
|
2613 IN_param_value->accept(*this); |
|
2614 return NULL; |
|
2615 |
|
2616 } |
|
2617 |
|
2618 ERROR; |
|
2619 } |
|
2620 |
|
2621 }/*function_dint_to_real*/ |
|
2622 break; |
|
2623 |
|
2624 /**** |
|
2625 *DINT_TO_LREAL |
|
2626 */ |
|
2627 case function_dint_to_lreal : |
|
2628 { |
|
2629 symbol_c *last_type_symbol = NULL; |
|
2630 |
|
2631 { |
|
2632 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2633 symbol_c *IN_param_value = &this->default_variable_name; |
|
2634 |
|
2635 symbol_c *IN_type_symbol = param_data_type; |
|
2636 last_type_symbol = param_data_type; |
|
2637 |
|
2638 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2639 { |
|
2640 |
|
2641 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2642 s4o.print("("); |
|
2643 return_type_symbol->accept(*this); |
|
2644 s4o.print(")"); |
|
2645 IN_param_value->accept(*this); |
|
2646 return NULL; |
|
2647 |
|
2648 } |
|
2649 |
|
2650 ERROR; |
|
2651 } |
|
2652 |
|
2653 }/*function_dint_to_lreal*/ |
|
2654 break; |
|
2655 |
|
2656 /**** |
|
2657 *DINT_TO_SINT |
|
2658 */ |
|
2659 case function_dint_to_sint : |
|
2660 { |
|
2661 symbol_c *last_type_symbol = NULL; |
|
2662 |
|
2663 { |
|
2664 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2665 symbol_c *IN_param_value = &this->default_variable_name; |
|
2666 |
|
2667 symbol_c *IN_type_symbol = param_data_type; |
|
2668 last_type_symbol = param_data_type; |
|
2669 |
|
2670 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2671 { |
|
2672 |
|
2673 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2674 s4o.print("("); |
|
2675 return_type_symbol->accept(*this); |
|
2676 s4o.print(")"); |
|
2677 IN_param_value->accept(*this); |
|
2678 return NULL; |
|
2679 |
|
2680 } |
|
2681 |
|
2682 ERROR; |
|
2683 } |
|
2684 |
|
2685 }/*function_dint_to_sint*/ |
|
2686 break; |
|
2687 |
|
2688 /**** |
|
2689 *DINT_TO_INT |
|
2690 */ |
|
2691 case function_dint_to_int : |
|
2692 { |
|
2693 symbol_c *last_type_symbol = NULL; |
|
2694 |
|
2695 { |
|
2696 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2697 symbol_c *IN_param_value = &this->default_variable_name; |
|
2698 |
|
2699 symbol_c *IN_type_symbol = param_data_type; |
|
2700 last_type_symbol = param_data_type; |
|
2701 |
|
2702 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2703 { |
|
2704 |
|
2705 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2706 s4o.print("("); |
|
2707 return_type_symbol->accept(*this); |
|
2708 s4o.print(")"); |
|
2709 IN_param_value->accept(*this); |
|
2710 return NULL; |
|
2711 |
|
2712 } |
|
2713 |
|
2714 ERROR; |
|
2715 } |
|
2716 |
|
2717 }/*function_dint_to_int*/ |
|
2718 break; |
|
2719 |
|
2720 /**** |
|
2721 *DINT_TO_LINT |
|
2722 */ |
|
2723 case function_dint_to_lint : |
|
2724 { |
|
2725 symbol_c *last_type_symbol = NULL; |
|
2726 |
|
2727 { |
|
2728 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2729 symbol_c *IN_param_value = &this->default_variable_name; |
|
2730 |
|
2731 symbol_c *IN_type_symbol = param_data_type; |
|
2732 last_type_symbol = param_data_type; |
|
2733 |
|
2734 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2735 { |
|
2736 |
|
2737 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2738 s4o.print("("); |
|
2739 return_type_symbol->accept(*this); |
|
2740 s4o.print(")"); |
|
2741 IN_param_value->accept(*this); |
|
2742 return NULL; |
|
2743 |
|
2744 } |
|
2745 |
|
2746 ERROR; |
|
2747 } |
|
2748 |
|
2749 }/*function_dint_to_lint*/ |
|
2750 break; |
|
2751 |
|
2752 /**** |
|
2753 *DINT_TO_USINT |
|
2754 */ |
|
2755 case function_dint_to_usint : |
|
2756 { |
|
2757 symbol_c *last_type_symbol = NULL; |
|
2758 |
|
2759 { |
|
2760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2761 symbol_c *IN_param_value = &this->default_variable_name; |
|
2762 |
|
2763 symbol_c *IN_type_symbol = param_data_type; |
|
2764 last_type_symbol = param_data_type; |
|
2765 |
|
2766 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2767 { |
|
2768 |
|
2769 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2770 s4o.print("("); |
|
2771 return_type_symbol->accept(*this); |
|
2772 s4o.print(")"); |
|
2773 IN_param_value->accept(*this); |
|
2774 return NULL; |
|
2775 |
|
2776 } |
|
2777 |
|
2778 ERROR; |
|
2779 } |
|
2780 |
|
2781 }/*function_dint_to_usint*/ |
|
2782 break; |
|
2783 |
|
2784 /**** |
|
2785 *DINT_TO_UINT |
|
2786 */ |
|
2787 case function_dint_to_uint : |
|
2788 { |
|
2789 symbol_c *last_type_symbol = NULL; |
|
2790 |
|
2791 { |
|
2792 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2793 symbol_c *IN_param_value = &this->default_variable_name; |
|
2794 |
|
2795 symbol_c *IN_type_symbol = param_data_type; |
|
2796 last_type_symbol = param_data_type; |
|
2797 |
|
2798 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2799 { |
|
2800 |
|
2801 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2802 s4o.print("("); |
|
2803 return_type_symbol->accept(*this); |
|
2804 s4o.print(")"); |
|
2805 IN_param_value->accept(*this); |
|
2806 return NULL; |
|
2807 |
|
2808 } |
|
2809 |
|
2810 ERROR; |
|
2811 } |
|
2812 |
|
2813 }/*function_dint_to_uint*/ |
|
2814 break; |
|
2815 |
|
2816 /**** |
|
2817 *DINT_TO_UDINT |
|
2818 */ |
|
2819 case function_dint_to_udint : |
|
2820 { |
|
2821 symbol_c *last_type_symbol = NULL; |
|
2822 |
|
2823 { |
|
2824 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2825 symbol_c *IN_param_value = &this->default_variable_name; |
|
2826 |
|
2827 symbol_c *IN_type_symbol = param_data_type; |
|
2828 last_type_symbol = param_data_type; |
|
2829 |
|
2830 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2831 { |
|
2832 |
|
2833 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2834 s4o.print("("); |
|
2835 return_type_symbol->accept(*this); |
|
2836 s4o.print(")"); |
|
2837 IN_param_value->accept(*this); |
|
2838 return NULL; |
|
2839 |
|
2840 } |
|
2841 |
|
2842 ERROR; |
|
2843 } |
|
2844 |
|
2845 }/*function_dint_to_udint*/ |
|
2846 break; |
|
2847 |
|
2848 /**** |
|
2849 *DINT_TO_ULINT |
|
2850 */ |
|
2851 case function_dint_to_ulint : |
|
2852 { |
|
2853 symbol_c *last_type_symbol = NULL; |
|
2854 |
|
2855 { |
|
2856 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2857 symbol_c *IN_param_value = &this->default_variable_name; |
|
2858 |
|
2859 symbol_c *IN_type_symbol = param_data_type; |
|
2860 last_type_symbol = param_data_type; |
|
2861 |
|
2862 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2863 { |
|
2864 |
|
2865 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2866 s4o.print("("); |
|
2867 return_type_symbol->accept(*this); |
|
2868 s4o.print(")"); |
|
2869 IN_param_value->accept(*this); |
|
2870 return NULL; |
|
2871 |
|
2872 } |
|
2873 |
|
2874 ERROR; |
|
2875 } |
|
2876 |
|
2877 }/*function_dint_to_ulint*/ |
|
2878 break; |
|
2879 |
|
2880 /**** |
|
2881 *DINT_TO_TIME |
|
2882 */ |
|
2883 case function_dint_to_time : |
|
2884 { |
|
2885 symbol_c *last_type_symbol = NULL; |
|
2886 |
|
2887 { |
|
2888 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2889 symbol_c *IN_param_value = &this->default_variable_name; |
|
2890 |
|
2891 symbol_c *IN_type_symbol = param_data_type; |
|
2892 last_type_symbol = param_data_type; |
|
2893 |
|
2894 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2895 { |
|
2896 |
|
2897 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2898 s4o.print("("); |
|
2899 return_type_symbol->accept(*this); |
|
2900 s4o.print(")real_to_time("); |
|
2901 IN_param_value->accept(*this); |
|
2902 s4o.print(")"); |
|
2903 return NULL; |
|
2904 |
|
2905 } |
|
2906 |
|
2907 ERROR; |
|
2908 } |
|
2909 |
|
2910 }/*function_dint_to_time*/ |
|
2911 break; |
|
2912 |
|
2913 /**** |
|
2914 *DINT_TO_BOOL |
|
2915 */ |
|
2916 case function_dint_to_bool : |
|
2917 { |
|
2918 symbol_c *last_type_symbol = NULL; |
|
2919 |
|
2920 { |
|
2921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2922 symbol_c *IN_param_value = &this->default_variable_name; |
|
2923 |
|
2924 symbol_c *IN_type_symbol = param_data_type; |
|
2925 last_type_symbol = param_data_type; |
|
2926 |
|
2927 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2928 { |
|
2929 |
|
2930 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2931 s4o.print("("); |
|
2932 return_type_symbol->accept(*this); |
|
2933 s4o.print(")"); |
|
2934 IN_param_value->accept(*this); |
|
2935 return NULL; |
|
2936 |
|
2937 } |
|
2938 |
|
2939 ERROR; |
|
2940 } |
|
2941 |
|
2942 }/*function_dint_to_bool*/ |
|
2943 break; |
|
2944 |
|
2945 /**** |
|
2946 *DINT_TO_BYTE |
|
2947 */ |
|
2948 case function_dint_to_byte : |
|
2949 { |
|
2950 symbol_c *last_type_symbol = NULL; |
|
2951 |
|
2952 { |
|
2953 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2954 symbol_c *IN_param_value = &this->default_variable_name; |
|
2955 |
|
2956 symbol_c *IN_type_symbol = param_data_type; |
|
2957 last_type_symbol = param_data_type; |
|
2958 |
|
2959 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2960 { |
|
2961 |
|
2962 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2963 s4o.print("("); |
|
2964 return_type_symbol->accept(*this); |
|
2965 s4o.print(")"); |
|
2966 IN_param_value->accept(*this); |
|
2967 return NULL; |
|
2968 |
|
2969 } |
|
2970 |
|
2971 ERROR; |
|
2972 } |
|
2973 |
|
2974 }/*function_dint_to_byte*/ |
|
2975 break; |
|
2976 |
|
2977 /**** |
|
2978 *DINT_TO_WORD |
|
2979 */ |
|
2980 case function_dint_to_word : |
|
2981 { |
|
2982 symbol_c *last_type_symbol = NULL; |
|
2983 |
|
2984 { |
|
2985 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2986 symbol_c *IN_param_value = &this->default_variable_name; |
|
2987 |
|
2988 symbol_c *IN_type_symbol = param_data_type; |
|
2989 last_type_symbol = param_data_type; |
|
2990 |
|
2991 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
2992 { |
|
2993 |
|
2994 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2995 s4o.print("("); |
|
2996 return_type_symbol->accept(*this); |
|
2997 s4o.print(")"); |
|
2998 IN_param_value->accept(*this); |
|
2999 return NULL; |
|
3000 |
|
3001 } |
|
3002 |
|
3003 ERROR; |
|
3004 } |
|
3005 |
|
3006 }/*function_dint_to_word*/ |
|
3007 break; |
|
3008 |
|
3009 /**** |
|
3010 *DINT_TO_DWORD |
|
3011 */ |
|
3012 case function_dint_to_dword : |
|
3013 { |
|
3014 symbol_c *last_type_symbol = NULL; |
|
3015 |
|
3016 { |
|
3017 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3018 symbol_c *IN_param_value = &this->default_variable_name; |
|
3019 |
|
3020 symbol_c *IN_type_symbol = param_data_type; |
|
3021 last_type_symbol = param_data_type; |
|
3022 |
|
3023 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3024 { |
|
3025 |
|
3026 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
3027 s4o.print("("); |
|
3028 return_type_symbol->accept(*this); |
|
3029 s4o.print(")"); |
|
3030 IN_param_value->accept(*this); |
|
3031 return NULL; |
|
3032 |
|
3033 } |
|
3034 |
|
3035 ERROR; |
|
3036 } |
|
3037 |
|
3038 }/*function_dint_to_dword*/ |
|
3039 break; |
|
3040 |
|
3041 /**** |
|
3042 *DINT_TO_LWORD |
|
3043 */ |
|
3044 case function_dint_to_lword : |
|
3045 { |
|
3046 symbol_c *last_type_symbol = NULL; |
|
3047 |
|
3048 { |
|
3049 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3050 symbol_c *IN_param_value = &this->default_variable_name; |
|
3051 |
|
3052 symbol_c *IN_type_symbol = param_data_type; |
|
3053 last_type_symbol = param_data_type; |
|
3054 |
|
3055 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3056 { |
|
3057 |
|
3058 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3059 s4o.print("("); |
|
3060 return_type_symbol->accept(*this); |
|
3061 s4o.print(")"); |
|
3062 IN_param_value->accept(*this); |
|
3063 return NULL; |
|
3064 |
|
3065 } |
|
3066 |
|
3067 ERROR; |
|
3068 } |
|
3069 |
|
3070 }/*function_dint_to_lword*/ |
|
3071 break; |
|
3072 |
|
3073 /**** |
|
3074 *DINT_TO_STRING |
|
3075 */ |
|
3076 case function_dint_to_string : |
|
3077 { |
|
3078 symbol_c *last_type_symbol = NULL; |
|
3079 |
|
3080 { |
|
3081 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3082 symbol_c *IN_param_value = &this->default_variable_name; |
|
3083 |
|
3084 symbol_c *IN_type_symbol = param_data_type; |
|
3085 last_type_symbol = param_data_type; |
|
3086 |
|
3087 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3088 { |
|
3089 |
|
3090 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3091 s4o.print("("); |
|
3092 return_type_symbol->accept(*this); |
|
3093 s4o.print(")int_to_string("); |
|
3094 IN_param_value->accept(*this); |
|
3095 s4o.print(", 10)"); |
|
3096 return NULL; |
|
3097 |
|
3098 } |
|
3099 |
|
3100 ERROR; |
|
3101 } |
|
3102 |
|
3103 }/*function_dint_to_string*/ |
|
3104 break; |
|
3105 |
|
3106 /**** |
|
3107 *DINT_TO_WSTRING |
|
3108 */ |
|
3109 case function_dint_to_wstring : |
|
3110 { |
|
3111 symbol_c *last_type_symbol = NULL; |
|
3112 |
|
3113 { |
|
3114 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3115 symbol_c *IN_param_value = &this->default_variable_name; |
|
3116 |
|
3117 symbol_c *IN_type_symbol = param_data_type; |
|
3118 last_type_symbol = param_data_type; |
|
3119 |
|
3120 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3121 { |
|
3122 |
|
3123 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
3124 s4o.print("("); |
|
3125 return_type_symbol->accept(*this); |
|
3126 s4o.print(")int_to_string("); |
|
3127 IN_param_value->accept(*this); |
|
3128 s4o.print(", 10)"); |
|
3129 return NULL; |
|
3130 |
|
3131 } |
|
3132 |
|
3133 ERROR; |
|
3134 } |
|
3135 |
|
3136 }/*function_dint_to_wstring*/ |
|
3137 break; |
|
3138 |
|
3139 /**** |
|
3140 *DINT_TO_DATE |
|
3141 */ |
|
3142 case function_dint_to_date : |
|
3143 { |
|
3144 symbol_c *last_type_symbol = NULL; |
|
3145 |
|
3146 { |
|
3147 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3148 symbol_c *IN_param_value = &this->default_variable_name; |
|
3149 |
|
3150 symbol_c *IN_type_symbol = param_data_type; |
|
3151 last_type_symbol = param_data_type; |
|
3152 |
|
3153 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3154 { |
|
3155 |
|
3156 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3157 s4o.print("("); |
|
3158 return_type_symbol->accept(*this); |
|
3159 s4o.print(")real_to_time("); |
|
3160 IN_param_value->accept(*this); |
|
3161 s4o.print(")"); |
|
3162 return NULL; |
|
3163 |
|
3164 } |
|
3165 |
|
3166 ERROR; |
|
3167 } |
|
3168 |
|
3169 }/*function_dint_to_date*/ |
|
3170 break; |
|
3171 |
|
3172 /**** |
|
3173 *DINT_TO_TOD |
|
3174 */ |
|
3175 case function_dint_to_tod : |
|
3176 { |
|
3177 symbol_c *last_type_symbol = NULL; |
|
3178 |
|
3179 { |
|
3180 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3181 symbol_c *IN_param_value = &this->default_variable_name; |
|
3182 |
|
3183 symbol_c *IN_type_symbol = param_data_type; |
|
3184 last_type_symbol = param_data_type; |
|
3185 |
|
3186 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3187 { |
|
3188 |
|
3189 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3190 s4o.print("("); |
|
3191 return_type_symbol->accept(*this); |
|
3192 s4o.print(")real_to_time("); |
|
3193 IN_param_value->accept(*this); |
|
3194 s4o.print(")"); |
|
3195 return NULL; |
|
3196 |
|
3197 } |
|
3198 |
|
3199 ERROR; |
|
3200 } |
|
3201 |
|
3202 }/*function_dint_to_tod*/ |
|
3203 break; |
|
3204 |
|
3205 /**** |
|
3206 *DINT_TO_DT |
|
3207 */ |
|
3208 case function_dint_to_dt : |
|
3209 { |
|
3210 symbol_c *last_type_symbol = NULL; |
|
3211 |
|
3212 { |
|
3213 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3214 symbol_c *IN_param_value = &this->default_variable_name; |
|
3215 |
|
3216 symbol_c *IN_type_symbol = param_data_type; |
|
3217 last_type_symbol = param_data_type; |
|
3218 |
|
3219 if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) |
|
3220 { |
|
3221 |
|
3222 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3223 s4o.print("("); |
|
3224 return_type_symbol->accept(*this); |
|
3225 s4o.print(")real_to_time("); |
|
3226 IN_param_value->accept(*this); |
|
3227 s4o.print(")"); |
|
3228 return NULL; |
|
3229 |
|
3230 } |
|
3231 |
|
3232 ERROR; |
|
3233 } |
|
3234 |
|
3235 }/*function_dint_to_dt*/ |
|
3236 break; |
|
3237 |
|
3238 /**** |
|
3239 *LINT_TO_REAL |
|
3240 */ |
|
3241 case function_lint_to_real : |
|
3242 { |
|
3243 symbol_c *last_type_symbol = NULL; |
|
3244 |
|
3245 { |
|
3246 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3247 symbol_c *IN_param_value = &this->default_variable_name; |
|
3248 |
|
3249 symbol_c *IN_type_symbol = param_data_type; |
|
3250 last_type_symbol = param_data_type; |
|
3251 |
|
3252 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3253 { |
|
3254 |
|
3255 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3256 s4o.print("("); |
|
3257 return_type_symbol->accept(*this); |
|
3258 s4o.print(")"); |
|
3259 IN_param_value->accept(*this); |
|
3260 return NULL; |
|
3261 |
|
3262 } |
|
3263 |
|
3264 ERROR; |
|
3265 } |
|
3266 |
|
3267 }/*function_lint_to_real*/ |
|
3268 break; |
|
3269 |
|
3270 /**** |
|
3271 *LINT_TO_LREAL |
|
3272 */ |
|
3273 case function_lint_to_lreal : |
|
3274 { |
|
3275 symbol_c *last_type_symbol = NULL; |
|
3276 |
|
3277 { |
|
3278 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3279 symbol_c *IN_param_value = &this->default_variable_name; |
|
3280 |
|
3281 symbol_c *IN_type_symbol = param_data_type; |
|
3282 last_type_symbol = param_data_type; |
|
3283 |
|
3284 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3285 { |
|
3286 |
|
3287 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3288 s4o.print("("); |
|
3289 return_type_symbol->accept(*this); |
|
3290 s4o.print(")"); |
|
3291 IN_param_value->accept(*this); |
|
3292 return NULL; |
|
3293 |
|
3294 } |
|
3295 |
|
3296 ERROR; |
|
3297 } |
|
3298 |
|
3299 }/*function_lint_to_lreal*/ |
|
3300 break; |
|
3301 |
|
3302 /**** |
|
3303 *LINT_TO_SINT |
|
3304 */ |
|
3305 case function_lint_to_sint : |
|
3306 { |
|
3307 symbol_c *last_type_symbol = NULL; |
|
3308 |
|
3309 { |
|
3310 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3311 symbol_c *IN_param_value = &this->default_variable_name; |
|
3312 |
|
3313 symbol_c *IN_type_symbol = param_data_type; |
|
3314 last_type_symbol = param_data_type; |
|
3315 |
|
3316 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3317 { |
|
3318 |
|
3319 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3320 s4o.print("("); |
|
3321 return_type_symbol->accept(*this); |
|
3322 s4o.print(")"); |
|
3323 IN_param_value->accept(*this); |
|
3324 return NULL; |
|
3325 |
|
3326 } |
|
3327 |
|
3328 ERROR; |
|
3329 } |
|
3330 |
|
3331 }/*function_lint_to_sint*/ |
|
3332 break; |
|
3333 |
|
3334 /**** |
|
3335 *LINT_TO_INT |
|
3336 */ |
|
3337 case function_lint_to_int : |
|
3338 { |
|
3339 symbol_c *last_type_symbol = NULL; |
|
3340 |
|
3341 { |
|
3342 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3343 symbol_c *IN_param_value = &this->default_variable_name; |
|
3344 |
|
3345 symbol_c *IN_type_symbol = param_data_type; |
|
3346 last_type_symbol = param_data_type; |
|
3347 |
|
3348 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3349 { |
|
3350 |
|
3351 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3352 s4o.print("("); |
|
3353 return_type_symbol->accept(*this); |
|
3354 s4o.print(")"); |
|
3355 IN_param_value->accept(*this); |
|
3356 return NULL; |
|
3357 |
|
3358 } |
|
3359 |
|
3360 ERROR; |
|
3361 } |
|
3362 |
|
3363 }/*function_lint_to_int*/ |
|
3364 break; |
|
3365 |
|
3366 /**** |
|
3367 *LINT_TO_DINT |
|
3368 */ |
|
3369 case function_lint_to_dint : |
|
3370 { |
|
3371 symbol_c *last_type_symbol = NULL; |
|
3372 |
|
3373 { |
|
3374 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3375 symbol_c *IN_param_value = &this->default_variable_name; |
|
3376 |
|
3377 symbol_c *IN_type_symbol = param_data_type; |
|
3378 last_type_symbol = param_data_type; |
|
3379 |
|
3380 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3381 { |
|
3382 |
|
3383 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3384 s4o.print("("); |
|
3385 return_type_symbol->accept(*this); |
|
3386 s4o.print(")"); |
|
3387 IN_param_value->accept(*this); |
|
3388 return NULL; |
|
3389 |
|
3390 } |
|
3391 |
|
3392 ERROR; |
|
3393 } |
|
3394 |
|
3395 }/*function_lint_to_dint*/ |
|
3396 break; |
|
3397 |
|
3398 /**** |
|
3399 *LINT_TO_USINT |
|
3400 */ |
|
3401 case function_lint_to_usint : |
|
3402 { |
|
3403 symbol_c *last_type_symbol = NULL; |
|
3404 |
|
3405 { |
|
3406 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3407 symbol_c *IN_param_value = &this->default_variable_name; |
|
3408 |
|
3409 symbol_c *IN_type_symbol = param_data_type; |
|
3410 last_type_symbol = param_data_type; |
|
3411 |
|
3412 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3413 { |
|
3414 |
|
3415 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3416 s4o.print("("); |
|
3417 return_type_symbol->accept(*this); |
|
3418 s4o.print(")"); |
|
3419 IN_param_value->accept(*this); |
|
3420 return NULL; |
|
3421 |
|
3422 } |
|
3423 |
|
3424 ERROR; |
|
3425 } |
|
3426 |
|
3427 }/*function_lint_to_usint*/ |
|
3428 break; |
|
3429 |
|
3430 /**** |
|
3431 *LINT_TO_UINT |
|
3432 */ |
|
3433 case function_lint_to_uint : |
|
3434 { |
|
3435 symbol_c *last_type_symbol = NULL; |
|
3436 |
|
3437 { |
|
3438 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3439 symbol_c *IN_param_value = &this->default_variable_name; |
|
3440 |
|
3441 symbol_c *IN_type_symbol = param_data_type; |
|
3442 last_type_symbol = param_data_type; |
|
3443 |
|
3444 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3445 { |
|
3446 |
|
3447 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3448 s4o.print("("); |
|
3449 return_type_symbol->accept(*this); |
|
3450 s4o.print(")"); |
|
3451 IN_param_value->accept(*this); |
|
3452 return NULL; |
|
3453 |
|
3454 } |
|
3455 |
|
3456 ERROR; |
|
3457 } |
|
3458 |
|
3459 }/*function_lint_to_uint*/ |
|
3460 break; |
|
3461 |
|
3462 /**** |
|
3463 *LINT_TO_UDINT |
|
3464 */ |
|
3465 case function_lint_to_udint : |
|
3466 { |
|
3467 symbol_c *last_type_symbol = NULL; |
|
3468 |
|
3469 { |
|
3470 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3471 symbol_c *IN_param_value = &this->default_variable_name; |
|
3472 |
|
3473 symbol_c *IN_type_symbol = param_data_type; |
|
3474 last_type_symbol = param_data_type; |
|
3475 |
|
3476 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3477 { |
|
3478 |
|
3479 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3480 s4o.print("("); |
|
3481 return_type_symbol->accept(*this); |
|
3482 s4o.print(")"); |
|
3483 IN_param_value->accept(*this); |
|
3484 return NULL; |
|
3485 |
|
3486 } |
|
3487 |
|
3488 ERROR; |
|
3489 } |
|
3490 |
|
3491 }/*function_lint_to_udint*/ |
|
3492 break; |
|
3493 |
|
3494 /**** |
|
3495 *LINT_TO_ULINT |
|
3496 */ |
|
3497 case function_lint_to_ulint : |
|
3498 { |
|
3499 symbol_c *last_type_symbol = NULL; |
|
3500 |
|
3501 { |
|
3502 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3503 symbol_c *IN_param_value = &this->default_variable_name; |
|
3504 |
|
3505 symbol_c *IN_type_symbol = param_data_type; |
|
3506 last_type_symbol = param_data_type; |
|
3507 |
|
3508 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3509 { |
|
3510 |
|
3511 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3512 s4o.print("("); |
|
3513 return_type_symbol->accept(*this); |
|
3514 s4o.print(")"); |
|
3515 IN_param_value->accept(*this); |
|
3516 return NULL; |
|
3517 |
|
3518 } |
|
3519 |
|
3520 ERROR; |
|
3521 } |
|
3522 |
|
3523 }/*function_lint_to_ulint*/ |
|
3524 break; |
|
3525 |
|
3526 /**** |
|
3527 *LINT_TO_TIME |
|
3528 */ |
|
3529 case function_lint_to_time : |
|
3530 { |
|
3531 symbol_c *last_type_symbol = NULL; |
|
3532 |
|
3533 { |
|
3534 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3535 symbol_c *IN_param_value = &this->default_variable_name; |
|
3536 |
|
3537 symbol_c *IN_type_symbol = param_data_type; |
|
3538 last_type_symbol = param_data_type; |
|
3539 |
|
3540 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3541 { |
|
3542 |
|
3543 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
3544 s4o.print("("); |
|
3545 return_type_symbol->accept(*this); |
|
3546 s4o.print(")real_to_time("); |
|
3547 IN_param_value->accept(*this); |
|
3548 s4o.print(")"); |
|
3549 return NULL; |
|
3550 |
|
3551 } |
|
3552 |
|
3553 ERROR; |
|
3554 } |
|
3555 |
|
3556 }/*function_lint_to_time*/ |
|
3557 break; |
|
3558 |
|
3559 /**** |
|
3560 *LINT_TO_BOOL |
|
3561 */ |
|
3562 case function_lint_to_bool : |
|
3563 { |
|
3564 symbol_c *last_type_symbol = NULL; |
|
3565 |
|
3566 { |
|
3567 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3568 symbol_c *IN_param_value = &this->default_variable_name; |
|
3569 |
|
3570 symbol_c *IN_type_symbol = param_data_type; |
|
3571 last_type_symbol = param_data_type; |
|
3572 |
|
3573 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3574 { |
|
3575 |
|
3576 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3577 s4o.print("("); |
|
3578 return_type_symbol->accept(*this); |
|
3579 s4o.print(")"); |
|
3580 IN_param_value->accept(*this); |
|
3581 return NULL; |
|
3582 |
|
3583 } |
|
3584 |
|
3585 ERROR; |
|
3586 } |
|
3587 |
|
3588 }/*function_lint_to_bool*/ |
|
3589 break; |
|
3590 |
|
3591 /**** |
|
3592 *LINT_TO_BYTE |
|
3593 */ |
|
3594 case function_lint_to_byte : |
|
3595 { |
|
3596 symbol_c *last_type_symbol = NULL; |
|
3597 |
|
3598 { |
|
3599 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3600 symbol_c *IN_param_value = &this->default_variable_name; |
|
3601 |
|
3602 symbol_c *IN_type_symbol = param_data_type; |
|
3603 last_type_symbol = param_data_type; |
|
3604 |
|
3605 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3606 { |
|
3607 |
|
3608 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3609 s4o.print("("); |
|
3610 return_type_symbol->accept(*this); |
|
3611 s4o.print(")"); |
|
3612 IN_param_value->accept(*this); |
|
3613 return NULL; |
|
3614 |
|
3615 } |
|
3616 |
|
3617 ERROR; |
|
3618 } |
|
3619 |
|
3620 }/*function_lint_to_byte*/ |
|
3621 break; |
|
3622 |
|
3623 /**** |
|
3624 *LINT_TO_WORD |
|
3625 */ |
|
3626 case function_lint_to_word : |
|
3627 { |
|
3628 symbol_c *last_type_symbol = NULL; |
|
3629 |
|
3630 { |
|
3631 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3632 symbol_c *IN_param_value = &this->default_variable_name; |
|
3633 |
|
3634 symbol_c *IN_type_symbol = param_data_type; |
|
3635 last_type_symbol = param_data_type; |
|
3636 |
|
3637 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3638 { |
|
3639 |
|
3640 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3641 s4o.print("("); |
|
3642 return_type_symbol->accept(*this); |
|
3643 s4o.print(")"); |
|
3644 IN_param_value->accept(*this); |
|
3645 return NULL; |
|
3646 |
|
3647 } |
|
3648 |
|
3649 ERROR; |
|
3650 } |
|
3651 |
|
3652 }/*function_lint_to_word*/ |
|
3653 break; |
|
3654 |
|
3655 /**** |
|
3656 *LINT_TO_DWORD |
|
3657 */ |
|
3658 case function_lint_to_dword : |
|
3659 { |
|
3660 symbol_c *last_type_symbol = NULL; |
|
3661 |
|
3662 { |
|
3663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3664 symbol_c *IN_param_value = &this->default_variable_name; |
|
3665 |
|
3666 symbol_c *IN_type_symbol = param_data_type; |
|
3667 last_type_symbol = param_data_type; |
|
3668 |
|
3669 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3670 { |
|
3671 |
|
3672 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
3673 s4o.print("("); |
|
3674 return_type_symbol->accept(*this); |
|
3675 s4o.print(")"); |
|
3676 IN_param_value->accept(*this); |
|
3677 return NULL; |
|
3678 |
|
3679 } |
|
3680 |
|
3681 ERROR; |
|
3682 } |
|
3683 |
|
3684 }/*function_lint_to_dword*/ |
|
3685 break; |
|
3686 |
|
3687 /**** |
|
3688 *LINT_TO_LWORD |
|
3689 */ |
|
3690 case function_lint_to_lword : |
|
3691 { |
|
3692 symbol_c *last_type_symbol = NULL; |
|
3693 |
|
3694 { |
|
3695 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3696 symbol_c *IN_param_value = &this->default_variable_name; |
|
3697 |
|
3698 symbol_c *IN_type_symbol = param_data_type; |
|
3699 last_type_symbol = param_data_type; |
|
3700 |
|
3701 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3702 { |
|
3703 |
|
3704 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3705 s4o.print("("); |
|
3706 return_type_symbol->accept(*this); |
|
3707 s4o.print(")"); |
|
3708 IN_param_value->accept(*this); |
|
3709 return NULL; |
|
3710 |
|
3711 } |
|
3712 |
|
3713 ERROR; |
|
3714 } |
|
3715 |
|
3716 }/*function_lint_to_lword*/ |
|
3717 break; |
|
3718 |
|
3719 /**** |
|
3720 *LINT_TO_STRING |
|
3721 */ |
|
3722 case function_lint_to_string : |
|
3723 { |
|
3724 symbol_c *last_type_symbol = NULL; |
|
3725 |
|
3726 { |
|
3727 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3728 symbol_c *IN_param_value = &this->default_variable_name; |
|
3729 |
|
3730 symbol_c *IN_type_symbol = param_data_type; |
|
3731 last_type_symbol = param_data_type; |
|
3732 |
|
3733 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3734 { |
|
3735 |
|
3736 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3737 s4o.print("("); |
|
3738 return_type_symbol->accept(*this); |
|
3739 s4o.print(")int_to_string("); |
|
3740 IN_param_value->accept(*this); |
|
3741 s4o.print(", 10)"); |
|
3742 return NULL; |
|
3743 |
|
3744 } |
|
3745 |
|
3746 ERROR; |
|
3747 } |
|
3748 |
|
3749 }/*function_lint_to_string*/ |
|
3750 break; |
|
3751 |
|
3752 /**** |
|
3753 *LINT_TO_WSTRING |
|
3754 */ |
|
3755 case function_lint_to_wstring : |
|
3756 { |
|
3757 symbol_c *last_type_symbol = NULL; |
|
3758 |
|
3759 { |
|
3760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3761 symbol_c *IN_param_value = &this->default_variable_name; |
|
3762 |
|
3763 symbol_c *IN_type_symbol = param_data_type; |
|
3764 last_type_symbol = param_data_type; |
|
3765 |
|
3766 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3767 { |
|
3768 |
|
3769 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
3770 s4o.print("("); |
|
3771 return_type_symbol->accept(*this); |
|
3772 s4o.print(")int_to_string("); |
|
3773 IN_param_value->accept(*this); |
|
3774 s4o.print(", 10)"); |
|
3775 return NULL; |
|
3776 |
|
3777 } |
|
3778 |
|
3779 ERROR; |
|
3780 } |
|
3781 |
|
3782 }/*function_lint_to_wstring*/ |
|
3783 break; |
|
3784 |
|
3785 /**** |
|
3786 *LINT_TO_DATE |
|
3787 */ |
|
3788 case function_lint_to_date : |
|
3789 { |
|
3790 symbol_c *last_type_symbol = NULL; |
|
3791 |
|
3792 { |
|
3793 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3794 symbol_c *IN_param_value = &this->default_variable_name; |
|
3795 |
|
3796 symbol_c *IN_type_symbol = param_data_type; |
|
3797 last_type_symbol = param_data_type; |
|
3798 |
|
3799 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3800 { |
|
3801 |
|
3802 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3803 s4o.print("("); |
|
3804 return_type_symbol->accept(*this); |
|
3805 s4o.print(")real_to_time("); |
|
3806 IN_param_value->accept(*this); |
|
3807 s4o.print(")"); |
|
3808 return NULL; |
|
3809 |
|
3810 } |
|
3811 |
|
3812 ERROR; |
|
3813 } |
|
3814 |
|
3815 }/*function_lint_to_date*/ |
|
3816 break; |
|
3817 |
|
3818 /**** |
|
3819 *LINT_TO_TOD |
|
3820 */ |
|
3821 case function_lint_to_tod : |
|
3822 { |
|
3823 symbol_c *last_type_symbol = NULL; |
|
3824 |
|
3825 { |
|
3826 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3827 symbol_c *IN_param_value = &this->default_variable_name; |
|
3828 |
|
3829 symbol_c *IN_type_symbol = param_data_type; |
|
3830 last_type_symbol = param_data_type; |
|
3831 |
|
3832 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3833 { |
|
3834 |
|
3835 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3836 s4o.print("("); |
|
3837 return_type_symbol->accept(*this); |
|
3838 s4o.print(")real_to_time("); |
|
3839 IN_param_value->accept(*this); |
|
3840 s4o.print(")"); |
|
3841 return NULL; |
|
3842 |
|
3843 } |
|
3844 |
|
3845 ERROR; |
|
3846 } |
|
3847 |
|
3848 }/*function_lint_to_tod*/ |
|
3849 break; |
|
3850 |
|
3851 /**** |
|
3852 *LINT_TO_DT |
|
3853 */ |
|
3854 case function_lint_to_dt : |
|
3855 { |
|
3856 symbol_c *last_type_symbol = NULL; |
|
3857 |
|
3858 { |
|
3859 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3860 symbol_c *IN_param_value = &this->default_variable_name; |
|
3861 |
|
3862 symbol_c *IN_type_symbol = param_data_type; |
|
3863 last_type_symbol = param_data_type; |
|
3864 |
|
3865 if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) |
|
3866 { |
|
3867 |
|
3868 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3869 s4o.print("("); |
|
3870 return_type_symbol->accept(*this); |
|
3871 s4o.print(")real_to_time("); |
|
3872 IN_param_value->accept(*this); |
|
3873 s4o.print(")"); |
|
3874 return NULL; |
|
3875 |
|
3876 } |
|
3877 |
|
3878 ERROR; |
|
3879 } |
|
3880 |
|
3881 }/*function_lint_to_dt*/ |
|
3882 break; |
|
3883 |
|
3884 /**** |
|
3885 *USINT_TO_REAL |
|
3886 */ |
|
3887 case function_usint_to_real : |
|
3888 { |
|
3889 symbol_c *last_type_symbol = NULL; |
|
3890 |
|
3891 { |
|
3892 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3893 symbol_c *IN_param_value = &this->default_variable_name; |
|
3894 |
|
3895 symbol_c *IN_type_symbol = param_data_type; |
|
3896 last_type_symbol = param_data_type; |
|
3897 |
|
3898 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
3899 { |
|
3900 |
|
3901 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3902 s4o.print("("); |
|
3903 return_type_symbol->accept(*this); |
|
3904 s4o.print(")"); |
|
3905 IN_param_value->accept(*this); |
|
3906 return NULL; |
|
3907 |
|
3908 } |
|
3909 |
|
3910 ERROR; |
|
3911 } |
|
3912 |
|
3913 }/*function_usint_to_real*/ |
|
3914 break; |
|
3915 |
|
3916 /**** |
|
3917 *USINT_TO_LREAL |
|
3918 */ |
|
3919 case function_usint_to_lreal : |
|
3920 { |
|
3921 symbol_c *last_type_symbol = NULL; |
|
3922 |
|
3923 { |
|
3924 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3925 symbol_c *IN_param_value = &this->default_variable_name; |
|
3926 |
|
3927 symbol_c *IN_type_symbol = param_data_type; |
|
3928 last_type_symbol = param_data_type; |
|
3929 |
|
3930 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
3931 { |
|
3932 |
|
3933 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3934 s4o.print("("); |
|
3935 return_type_symbol->accept(*this); |
|
3936 s4o.print(")"); |
|
3937 IN_param_value->accept(*this); |
|
3938 return NULL; |
|
3939 |
|
3940 } |
|
3941 |
|
3942 ERROR; |
|
3943 } |
|
3944 |
|
3945 }/*function_usint_to_lreal*/ |
|
3946 break; |
|
3947 |
|
3948 /**** |
|
3949 *USINT_TO_SINT |
|
3950 */ |
|
3951 case function_usint_to_sint : |
|
3952 { |
|
3953 symbol_c *last_type_symbol = NULL; |
|
3954 |
|
3955 { |
|
3956 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3957 symbol_c *IN_param_value = &this->default_variable_name; |
|
3958 |
|
3959 symbol_c *IN_type_symbol = param_data_type; |
|
3960 last_type_symbol = param_data_type; |
|
3961 |
|
3962 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
3963 { |
|
3964 |
|
3965 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3966 s4o.print("("); |
|
3967 return_type_symbol->accept(*this); |
|
3968 s4o.print(")"); |
|
3969 IN_param_value->accept(*this); |
|
3970 return NULL; |
|
3971 |
|
3972 } |
|
3973 |
|
3974 ERROR; |
|
3975 } |
|
3976 |
|
3977 }/*function_usint_to_sint*/ |
|
3978 break; |
|
3979 |
|
3980 /**** |
|
3981 *USINT_TO_INT |
|
3982 */ |
|
3983 case function_usint_to_int : |
|
3984 { |
|
3985 symbol_c *last_type_symbol = NULL; |
|
3986 |
|
3987 { |
|
3988 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3989 symbol_c *IN_param_value = &this->default_variable_name; |
|
3990 |
|
3991 symbol_c *IN_type_symbol = param_data_type; |
|
3992 last_type_symbol = param_data_type; |
|
3993 |
|
3994 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
3995 { |
|
3996 |
|
3997 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3998 s4o.print("("); |
|
3999 return_type_symbol->accept(*this); |
|
4000 s4o.print(")"); |
|
4001 IN_param_value->accept(*this); |
|
4002 return NULL; |
|
4003 |
|
4004 } |
|
4005 |
|
4006 ERROR; |
|
4007 } |
|
4008 |
|
4009 }/*function_usint_to_int*/ |
|
4010 break; |
|
4011 |
|
4012 /**** |
|
4013 *USINT_TO_DINT |
|
4014 */ |
|
4015 case function_usint_to_dint : |
|
4016 { |
|
4017 symbol_c *last_type_symbol = NULL; |
|
4018 |
|
4019 { |
|
4020 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4021 symbol_c *IN_param_value = &this->default_variable_name; |
|
4022 |
|
4023 symbol_c *IN_type_symbol = param_data_type; |
|
4024 last_type_symbol = param_data_type; |
|
4025 |
|
4026 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4027 { |
|
4028 |
|
4029 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4030 s4o.print("("); |
|
4031 return_type_symbol->accept(*this); |
|
4032 s4o.print(")"); |
|
4033 IN_param_value->accept(*this); |
|
4034 return NULL; |
|
4035 |
|
4036 } |
|
4037 |
|
4038 ERROR; |
|
4039 } |
|
4040 |
|
4041 }/*function_usint_to_dint*/ |
|
4042 break; |
|
4043 |
|
4044 /**** |
|
4045 *USINT_TO_LINT |
|
4046 */ |
|
4047 case function_usint_to_lint : |
|
4048 { |
|
4049 symbol_c *last_type_symbol = NULL; |
|
4050 |
|
4051 { |
|
4052 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4053 symbol_c *IN_param_value = &this->default_variable_name; |
|
4054 |
|
4055 symbol_c *IN_type_symbol = param_data_type; |
|
4056 last_type_symbol = param_data_type; |
|
4057 |
|
4058 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4059 { |
|
4060 |
|
4061 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4062 s4o.print("("); |
|
4063 return_type_symbol->accept(*this); |
|
4064 s4o.print(")"); |
|
4065 IN_param_value->accept(*this); |
|
4066 return NULL; |
|
4067 |
|
4068 } |
|
4069 |
|
4070 ERROR; |
|
4071 } |
|
4072 |
|
4073 }/*function_usint_to_lint*/ |
|
4074 break; |
|
4075 |
|
4076 /**** |
|
4077 *USINT_TO_UINT |
|
4078 */ |
|
4079 case function_usint_to_uint : |
|
4080 { |
|
4081 symbol_c *last_type_symbol = NULL; |
|
4082 |
|
4083 { |
|
4084 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4085 symbol_c *IN_param_value = &this->default_variable_name; |
|
4086 |
|
4087 symbol_c *IN_type_symbol = param_data_type; |
|
4088 last_type_symbol = param_data_type; |
|
4089 |
|
4090 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4091 { |
|
4092 |
|
4093 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4094 s4o.print("("); |
|
4095 return_type_symbol->accept(*this); |
|
4096 s4o.print(")"); |
|
4097 IN_param_value->accept(*this); |
|
4098 return NULL; |
|
4099 |
|
4100 } |
|
4101 |
|
4102 ERROR; |
|
4103 } |
|
4104 |
|
4105 }/*function_usint_to_uint*/ |
|
4106 break; |
|
4107 |
|
4108 /**** |
|
4109 *USINT_TO_UDINT |
|
4110 */ |
|
4111 case function_usint_to_udint : |
|
4112 { |
|
4113 symbol_c *last_type_symbol = NULL; |
|
4114 |
|
4115 { |
|
4116 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4117 symbol_c *IN_param_value = &this->default_variable_name; |
|
4118 |
|
4119 symbol_c *IN_type_symbol = param_data_type; |
|
4120 last_type_symbol = param_data_type; |
|
4121 |
|
4122 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4123 { |
|
4124 |
|
4125 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4126 s4o.print("("); |
|
4127 return_type_symbol->accept(*this); |
|
4128 s4o.print(")"); |
|
4129 IN_param_value->accept(*this); |
|
4130 return NULL; |
|
4131 |
|
4132 } |
|
4133 |
|
4134 ERROR; |
|
4135 } |
|
4136 |
|
4137 }/*function_usint_to_udint*/ |
|
4138 break; |
|
4139 |
|
4140 /**** |
|
4141 *USINT_TO_ULINT |
|
4142 */ |
|
4143 case function_usint_to_ulint : |
|
4144 { |
|
4145 symbol_c *last_type_symbol = NULL; |
|
4146 |
|
4147 { |
|
4148 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4149 symbol_c *IN_param_value = &this->default_variable_name; |
|
4150 |
|
4151 symbol_c *IN_type_symbol = param_data_type; |
|
4152 last_type_symbol = param_data_type; |
|
4153 |
|
4154 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4155 { |
|
4156 |
|
4157 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4158 s4o.print("("); |
|
4159 return_type_symbol->accept(*this); |
|
4160 s4o.print(")"); |
|
4161 IN_param_value->accept(*this); |
|
4162 return NULL; |
|
4163 |
|
4164 } |
|
4165 |
|
4166 ERROR; |
|
4167 } |
|
4168 |
|
4169 }/*function_usint_to_ulint*/ |
|
4170 break; |
|
4171 |
|
4172 /**** |
|
4173 *USINT_TO_TIME |
|
4174 */ |
|
4175 case function_usint_to_time : |
|
4176 { |
|
4177 symbol_c *last_type_symbol = NULL; |
|
4178 |
|
4179 { |
|
4180 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4181 symbol_c *IN_param_value = &this->default_variable_name; |
|
4182 |
|
4183 symbol_c *IN_type_symbol = param_data_type; |
|
4184 last_type_symbol = param_data_type; |
|
4185 |
|
4186 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4187 { |
|
4188 |
|
4189 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
4190 s4o.print("("); |
|
4191 return_type_symbol->accept(*this); |
|
4192 s4o.print(")real_to_time("); |
|
4193 IN_param_value->accept(*this); |
|
4194 s4o.print(")"); |
|
4195 return NULL; |
|
4196 |
|
4197 } |
|
4198 |
|
4199 ERROR; |
|
4200 } |
|
4201 |
|
4202 }/*function_usint_to_time*/ |
|
4203 break; |
|
4204 |
|
4205 /**** |
|
4206 *USINT_TO_BOOL |
|
4207 */ |
|
4208 case function_usint_to_bool : |
|
4209 { |
|
4210 symbol_c *last_type_symbol = NULL; |
|
4211 |
|
4212 { |
|
4213 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4214 symbol_c *IN_param_value = &this->default_variable_name; |
|
4215 |
|
4216 symbol_c *IN_type_symbol = param_data_type; |
|
4217 last_type_symbol = param_data_type; |
|
4218 |
|
4219 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4220 { |
|
4221 |
|
4222 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
4223 s4o.print("("); |
|
4224 return_type_symbol->accept(*this); |
|
4225 s4o.print(")"); |
|
4226 IN_param_value->accept(*this); |
|
4227 return NULL; |
|
4228 |
|
4229 } |
|
4230 |
|
4231 ERROR; |
|
4232 } |
|
4233 |
|
4234 }/*function_usint_to_bool*/ |
|
4235 break; |
|
4236 |
|
4237 /**** |
|
4238 *USINT_TO_BYTE |
|
4239 */ |
|
4240 case function_usint_to_byte : |
|
4241 { |
|
4242 symbol_c *last_type_symbol = NULL; |
|
4243 |
|
4244 { |
|
4245 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4246 symbol_c *IN_param_value = &this->default_variable_name; |
|
4247 |
|
4248 symbol_c *IN_type_symbol = param_data_type; |
|
4249 last_type_symbol = param_data_type; |
|
4250 |
|
4251 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4252 { |
|
4253 |
|
4254 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4255 s4o.print("("); |
|
4256 return_type_symbol->accept(*this); |
|
4257 s4o.print(")"); |
|
4258 IN_param_value->accept(*this); |
|
4259 return NULL; |
|
4260 |
|
4261 } |
|
4262 |
|
4263 ERROR; |
|
4264 } |
|
4265 |
|
4266 }/*function_usint_to_byte*/ |
|
4267 break; |
|
4268 |
|
4269 /**** |
|
4270 *USINT_TO_WORD |
|
4271 */ |
|
4272 case function_usint_to_word : |
|
4273 { |
|
4274 symbol_c *last_type_symbol = NULL; |
|
4275 |
|
4276 { |
|
4277 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4278 symbol_c *IN_param_value = &this->default_variable_name; |
|
4279 |
|
4280 symbol_c *IN_type_symbol = param_data_type; |
|
4281 last_type_symbol = param_data_type; |
|
4282 |
|
4283 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4284 { |
|
4285 |
|
4286 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4287 s4o.print("("); |
|
4288 return_type_symbol->accept(*this); |
|
4289 s4o.print(")"); |
|
4290 IN_param_value->accept(*this); |
|
4291 return NULL; |
|
4292 |
|
4293 } |
|
4294 |
|
4295 ERROR; |
|
4296 } |
|
4297 |
|
4298 }/*function_usint_to_word*/ |
|
4299 break; |
|
4300 |
|
4301 /**** |
|
4302 *USINT_TO_DWORD |
|
4303 */ |
|
4304 case function_usint_to_dword : |
|
4305 { |
|
4306 symbol_c *last_type_symbol = NULL; |
|
4307 |
|
4308 { |
|
4309 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4310 symbol_c *IN_param_value = &this->default_variable_name; |
|
4311 |
|
4312 symbol_c *IN_type_symbol = param_data_type; |
|
4313 last_type_symbol = param_data_type; |
|
4314 |
|
4315 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4316 { |
|
4317 |
|
4318 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4319 s4o.print("("); |
|
4320 return_type_symbol->accept(*this); |
|
4321 s4o.print(")"); |
|
4322 IN_param_value->accept(*this); |
|
4323 return NULL; |
|
4324 |
|
4325 } |
|
4326 |
|
4327 ERROR; |
|
4328 } |
|
4329 |
|
4330 }/*function_usint_to_dword*/ |
|
4331 break; |
|
4332 |
|
4333 /**** |
|
4334 *USINT_TO_LWORD |
|
4335 */ |
|
4336 case function_usint_to_lword : |
|
4337 { |
|
4338 symbol_c *last_type_symbol = NULL; |
|
4339 |
|
4340 { |
|
4341 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4342 symbol_c *IN_param_value = &this->default_variable_name; |
|
4343 |
|
4344 symbol_c *IN_type_symbol = param_data_type; |
|
4345 last_type_symbol = param_data_type; |
|
4346 |
|
4347 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4348 { |
|
4349 |
|
4350 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4351 s4o.print("("); |
|
4352 return_type_symbol->accept(*this); |
|
4353 s4o.print(")"); |
|
4354 IN_param_value->accept(*this); |
|
4355 return NULL; |
|
4356 |
|
4357 } |
|
4358 |
|
4359 ERROR; |
|
4360 } |
|
4361 |
|
4362 }/*function_usint_to_lword*/ |
|
4363 break; |
|
4364 |
|
4365 /**** |
|
4366 *USINT_TO_STRING |
|
4367 */ |
|
4368 case function_usint_to_string : |
|
4369 { |
|
4370 symbol_c *last_type_symbol = NULL; |
|
4371 |
|
4372 { |
|
4373 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4374 symbol_c *IN_param_value = &this->default_variable_name; |
|
4375 |
|
4376 symbol_c *IN_type_symbol = param_data_type; |
|
4377 last_type_symbol = param_data_type; |
|
4378 |
|
4379 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4380 { |
|
4381 |
|
4382 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4383 s4o.print("("); |
|
4384 return_type_symbol->accept(*this); |
|
4385 s4o.print(")int_to_string("); |
|
4386 IN_param_value->accept(*this); |
|
4387 s4o.print(", 10)"); |
|
4388 return NULL; |
|
4389 |
|
4390 } |
|
4391 |
|
4392 ERROR; |
|
4393 } |
|
4394 |
|
4395 }/*function_usint_to_string*/ |
|
4396 break; |
|
4397 |
|
4398 /**** |
|
4399 *USINT_TO_WSTRING |
|
4400 */ |
|
4401 case function_usint_to_wstring : |
|
4402 { |
|
4403 symbol_c *last_type_symbol = NULL; |
|
4404 |
|
4405 { |
|
4406 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4407 symbol_c *IN_param_value = &this->default_variable_name; |
|
4408 |
|
4409 symbol_c *IN_type_symbol = param_data_type; |
|
4410 last_type_symbol = param_data_type; |
|
4411 |
|
4412 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4413 { |
|
4414 |
|
4415 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
4416 s4o.print("("); |
|
4417 return_type_symbol->accept(*this); |
|
4418 s4o.print(")int_to_string("); |
|
4419 IN_param_value->accept(*this); |
|
4420 s4o.print(", 10)"); |
|
4421 return NULL; |
|
4422 |
|
4423 } |
|
4424 |
|
4425 ERROR; |
|
4426 } |
|
4427 |
|
4428 }/*function_usint_to_wstring*/ |
|
4429 break; |
|
4430 |
|
4431 /**** |
|
4432 *USINT_TO_DATE |
|
4433 */ |
|
4434 case function_usint_to_date : |
|
4435 { |
|
4436 symbol_c *last_type_symbol = NULL; |
|
4437 |
|
4438 { |
|
4439 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4440 symbol_c *IN_param_value = &this->default_variable_name; |
|
4441 |
|
4442 symbol_c *IN_type_symbol = param_data_type; |
|
4443 last_type_symbol = param_data_type; |
|
4444 |
|
4445 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4446 { |
|
4447 |
|
4448 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
4449 s4o.print("("); |
|
4450 return_type_symbol->accept(*this); |
|
4451 s4o.print(")real_to_time("); |
|
4452 IN_param_value->accept(*this); |
|
4453 s4o.print(")"); |
|
4454 return NULL; |
|
4455 |
|
4456 } |
|
4457 |
|
4458 ERROR; |
|
4459 } |
|
4460 |
|
4461 }/*function_usint_to_date*/ |
|
4462 break; |
|
4463 |
|
4464 /**** |
|
4465 *USINT_TO_TOD |
|
4466 */ |
|
4467 case function_usint_to_tod : |
|
4468 { |
|
4469 symbol_c *last_type_symbol = NULL; |
|
4470 |
|
4471 { |
|
4472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4473 symbol_c *IN_param_value = &this->default_variable_name; |
|
4474 |
|
4475 symbol_c *IN_type_symbol = param_data_type; |
|
4476 last_type_symbol = param_data_type; |
|
4477 |
|
4478 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4479 { |
|
4480 |
|
4481 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
4482 s4o.print("("); |
|
4483 return_type_symbol->accept(*this); |
|
4484 s4o.print(")real_to_time("); |
|
4485 IN_param_value->accept(*this); |
|
4486 s4o.print(")"); |
|
4487 return NULL; |
|
4488 |
|
4489 } |
|
4490 |
|
4491 ERROR; |
|
4492 } |
|
4493 |
|
4494 }/*function_usint_to_tod*/ |
|
4495 break; |
|
4496 |
|
4497 /**** |
|
4498 *USINT_TO_DT |
|
4499 */ |
|
4500 case function_usint_to_dt : |
|
4501 { |
|
4502 symbol_c *last_type_symbol = NULL; |
|
4503 |
|
4504 { |
|
4505 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4506 symbol_c *IN_param_value = &this->default_variable_name; |
|
4507 |
|
4508 symbol_c *IN_type_symbol = param_data_type; |
|
4509 last_type_symbol = param_data_type; |
|
4510 |
|
4511 if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) |
|
4512 { |
|
4513 |
|
4514 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
4515 s4o.print("("); |
|
4516 return_type_symbol->accept(*this); |
|
4517 s4o.print(")real_to_time("); |
|
4518 IN_param_value->accept(*this); |
|
4519 s4o.print(")"); |
|
4520 return NULL; |
|
4521 |
|
4522 } |
|
4523 |
|
4524 ERROR; |
|
4525 } |
|
4526 |
|
4527 }/*function_usint_to_dt*/ |
|
4528 break; |
|
4529 |
|
4530 /**** |
|
4531 *UINT_TO_REAL |
|
4532 */ |
|
4533 case function_uint_to_real : |
|
4534 { |
|
4535 symbol_c *last_type_symbol = NULL; |
|
4536 |
|
4537 { |
|
4538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4539 symbol_c *IN_param_value = &this->default_variable_name; |
|
4540 |
|
4541 symbol_c *IN_type_symbol = param_data_type; |
|
4542 last_type_symbol = param_data_type; |
|
4543 |
|
4544 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4545 { |
|
4546 |
|
4547 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4548 s4o.print("("); |
|
4549 return_type_symbol->accept(*this); |
|
4550 s4o.print(")"); |
|
4551 IN_param_value->accept(*this); |
|
4552 return NULL; |
|
4553 |
|
4554 } |
|
4555 |
|
4556 ERROR; |
|
4557 } |
|
4558 |
|
4559 }/*function_uint_to_real*/ |
|
4560 break; |
|
4561 |
|
4562 /**** |
|
4563 *UINT_TO_LREAL |
|
4564 */ |
|
4565 case function_uint_to_lreal : |
|
4566 { |
|
4567 symbol_c *last_type_symbol = NULL; |
|
4568 |
|
4569 { |
|
4570 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4571 symbol_c *IN_param_value = &this->default_variable_name; |
|
4572 |
|
4573 symbol_c *IN_type_symbol = param_data_type; |
|
4574 last_type_symbol = param_data_type; |
|
4575 |
|
4576 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4577 { |
|
4578 |
|
4579 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4580 s4o.print("("); |
|
4581 return_type_symbol->accept(*this); |
|
4582 s4o.print(")"); |
|
4583 IN_param_value->accept(*this); |
|
4584 return NULL; |
|
4585 |
|
4586 } |
|
4587 |
|
4588 ERROR; |
|
4589 } |
|
4590 |
|
4591 }/*function_uint_to_lreal*/ |
|
4592 break; |
|
4593 |
|
4594 /**** |
|
4595 *UINT_TO_SINT |
|
4596 */ |
|
4597 case function_uint_to_sint : |
|
4598 { |
|
4599 symbol_c *last_type_symbol = NULL; |
|
4600 |
|
4601 { |
|
4602 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4603 symbol_c *IN_param_value = &this->default_variable_name; |
|
4604 |
|
4605 symbol_c *IN_type_symbol = param_data_type; |
|
4606 last_type_symbol = param_data_type; |
|
4607 |
|
4608 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4609 { |
|
4610 |
|
4611 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4612 s4o.print("("); |
|
4613 return_type_symbol->accept(*this); |
|
4614 s4o.print(")"); |
|
4615 IN_param_value->accept(*this); |
|
4616 return NULL; |
|
4617 |
|
4618 } |
|
4619 |
|
4620 ERROR; |
|
4621 } |
|
4622 |
|
4623 }/*function_uint_to_sint*/ |
|
4624 break; |
|
4625 |
|
4626 /**** |
|
4627 *UINT_TO_INT |
|
4628 */ |
|
4629 case function_uint_to_int : |
|
4630 { |
|
4631 symbol_c *last_type_symbol = NULL; |
|
4632 |
|
4633 { |
|
4634 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4635 symbol_c *IN_param_value = &this->default_variable_name; |
|
4636 |
|
4637 symbol_c *IN_type_symbol = param_data_type; |
|
4638 last_type_symbol = param_data_type; |
|
4639 |
|
4640 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4641 { |
|
4642 |
|
4643 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4644 s4o.print("("); |
|
4645 return_type_symbol->accept(*this); |
|
4646 s4o.print(")"); |
|
4647 IN_param_value->accept(*this); |
|
4648 return NULL; |
|
4649 |
|
4650 } |
|
4651 |
|
4652 ERROR; |
|
4653 } |
|
4654 |
|
4655 }/*function_uint_to_int*/ |
|
4656 break; |
|
4657 |
|
4658 /**** |
|
4659 *UINT_TO_DINT |
|
4660 */ |
|
4661 case function_uint_to_dint : |
|
4662 { |
|
4663 symbol_c *last_type_symbol = NULL; |
|
4664 |
|
4665 { |
|
4666 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4667 symbol_c *IN_param_value = &this->default_variable_name; |
|
4668 |
|
4669 symbol_c *IN_type_symbol = param_data_type; |
|
4670 last_type_symbol = param_data_type; |
|
4671 |
|
4672 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4673 { |
|
4674 |
|
4675 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4676 s4o.print("("); |
|
4677 return_type_symbol->accept(*this); |
|
4678 s4o.print(")"); |
|
4679 IN_param_value->accept(*this); |
|
4680 return NULL; |
|
4681 |
|
4682 } |
|
4683 |
|
4684 ERROR; |
|
4685 } |
|
4686 |
|
4687 }/*function_uint_to_dint*/ |
|
4688 break; |
|
4689 |
|
4690 /**** |
|
4691 *UINT_TO_LINT |
|
4692 */ |
|
4693 case function_uint_to_lint : |
|
4694 { |
|
4695 symbol_c *last_type_symbol = NULL; |
|
4696 |
|
4697 { |
|
4698 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4699 symbol_c *IN_param_value = &this->default_variable_name; |
|
4700 |
|
4701 symbol_c *IN_type_symbol = param_data_type; |
|
4702 last_type_symbol = param_data_type; |
|
4703 |
|
4704 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4705 { |
|
4706 |
|
4707 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4708 s4o.print("("); |
|
4709 return_type_symbol->accept(*this); |
|
4710 s4o.print(")"); |
|
4711 IN_param_value->accept(*this); |
|
4712 return NULL; |
|
4713 |
|
4714 } |
|
4715 |
|
4716 ERROR; |
|
4717 } |
|
4718 |
|
4719 }/*function_uint_to_lint*/ |
|
4720 break; |
|
4721 |
|
4722 /**** |
|
4723 *UINT_TO_USINT |
|
4724 */ |
|
4725 case function_uint_to_usint : |
|
4726 { |
|
4727 symbol_c *last_type_symbol = NULL; |
|
4728 |
|
4729 { |
|
4730 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4731 symbol_c *IN_param_value = &this->default_variable_name; |
|
4732 |
|
4733 symbol_c *IN_type_symbol = param_data_type; |
|
4734 last_type_symbol = param_data_type; |
|
4735 |
|
4736 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4737 { |
|
4738 |
|
4739 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4740 s4o.print("("); |
|
4741 return_type_symbol->accept(*this); |
|
4742 s4o.print(")"); |
|
4743 IN_param_value->accept(*this); |
|
4744 return NULL; |
|
4745 |
|
4746 } |
|
4747 |
|
4748 ERROR; |
|
4749 } |
|
4750 |
|
4751 }/*function_uint_to_usint*/ |
|
4752 break; |
|
4753 |
|
4754 /**** |
|
4755 *UINT_TO_UDINT |
|
4756 */ |
|
4757 case function_uint_to_udint : |
|
4758 { |
|
4759 symbol_c *last_type_symbol = NULL; |
|
4760 |
|
4761 { |
|
4762 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4763 symbol_c *IN_param_value = &this->default_variable_name; |
|
4764 |
|
4765 symbol_c *IN_type_symbol = param_data_type; |
|
4766 last_type_symbol = param_data_type; |
|
4767 |
|
4768 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4769 { |
|
4770 |
|
4771 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4772 s4o.print("("); |
|
4773 return_type_symbol->accept(*this); |
|
4774 s4o.print(")"); |
|
4775 IN_param_value->accept(*this); |
|
4776 return NULL; |
|
4777 |
|
4778 } |
|
4779 |
|
4780 ERROR; |
|
4781 } |
|
4782 |
|
4783 }/*function_uint_to_udint*/ |
|
4784 break; |
|
4785 |
|
4786 /**** |
|
4787 *UINT_TO_ULINT |
|
4788 */ |
|
4789 case function_uint_to_ulint : |
|
4790 { |
|
4791 symbol_c *last_type_symbol = NULL; |
|
4792 |
|
4793 { |
|
4794 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4795 symbol_c *IN_param_value = &this->default_variable_name; |
|
4796 |
|
4797 symbol_c *IN_type_symbol = param_data_type; |
|
4798 last_type_symbol = param_data_type; |
|
4799 |
|
4800 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4801 { |
|
4802 |
|
4803 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4804 s4o.print("("); |
|
4805 return_type_symbol->accept(*this); |
|
4806 s4o.print(")"); |
|
4807 IN_param_value->accept(*this); |
|
4808 return NULL; |
|
4809 |
|
4810 } |
|
4811 |
|
4812 ERROR; |
|
4813 } |
|
4814 |
|
4815 }/*function_uint_to_ulint*/ |
|
4816 break; |
|
4817 |
|
4818 /**** |
|
4819 *UINT_TO_TIME |
|
4820 */ |
|
4821 case function_uint_to_time : |
|
4822 { |
|
4823 symbol_c *last_type_symbol = NULL; |
|
4824 |
|
4825 { |
|
4826 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4827 symbol_c *IN_param_value = &this->default_variable_name; |
|
4828 |
|
4829 symbol_c *IN_type_symbol = param_data_type; |
|
4830 last_type_symbol = param_data_type; |
|
4831 |
|
4832 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4833 { |
|
4834 |
|
4835 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
4836 s4o.print("("); |
|
4837 return_type_symbol->accept(*this); |
|
4838 s4o.print(")real_to_time("); |
|
4839 IN_param_value->accept(*this); |
|
4840 s4o.print(")"); |
|
4841 return NULL; |
|
4842 |
|
4843 } |
|
4844 |
|
4845 ERROR; |
|
4846 } |
|
4847 |
|
4848 }/*function_uint_to_time*/ |
|
4849 break; |
|
4850 |
|
4851 /**** |
|
4852 *UINT_TO_BOOL |
|
4853 */ |
|
4854 case function_uint_to_bool : |
|
4855 { |
|
4856 symbol_c *last_type_symbol = NULL; |
|
4857 |
|
4858 { |
|
4859 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4860 symbol_c *IN_param_value = &this->default_variable_name; |
|
4861 |
|
4862 symbol_c *IN_type_symbol = param_data_type; |
|
4863 last_type_symbol = param_data_type; |
|
4864 |
|
4865 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4866 { |
|
4867 |
|
4868 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
4869 s4o.print("("); |
|
4870 return_type_symbol->accept(*this); |
|
4871 s4o.print(")"); |
|
4872 IN_param_value->accept(*this); |
|
4873 return NULL; |
|
4874 |
|
4875 } |
|
4876 |
|
4877 ERROR; |
|
4878 } |
|
4879 |
|
4880 }/*function_uint_to_bool*/ |
|
4881 break; |
|
4882 |
|
4883 /**** |
|
4884 *UINT_TO_BYTE |
|
4885 */ |
|
4886 case function_uint_to_byte : |
|
4887 { |
|
4888 symbol_c *last_type_symbol = NULL; |
|
4889 |
|
4890 { |
|
4891 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4892 symbol_c *IN_param_value = &this->default_variable_name; |
|
4893 |
|
4894 symbol_c *IN_type_symbol = param_data_type; |
|
4895 last_type_symbol = param_data_type; |
|
4896 |
|
4897 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4898 { |
|
4899 |
|
4900 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4901 s4o.print("("); |
|
4902 return_type_symbol->accept(*this); |
|
4903 s4o.print(")"); |
|
4904 IN_param_value->accept(*this); |
|
4905 return NULL; |
|
4906 |
|
4907 } |
|
4908 |
|
4909 ERROR; |
|
4910 } |
|
4911 |
|
4912 }/*function_uint_to_byte*/ |
|
4913 break; |
|
4914 |
|
4915 /**** |
|
4916 *UINT_TO_WORD |
|
4917 */ |
|
4918 case function_uint_to_word : |
|
4919 { |
|
4920 symbol_c *last_type_symbol = NULL; |
|
4921 |
|
4922 { |
|
4923 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4924 symbol_c *IN_param_value = &this->default_variable_name; |
|
4925 |
|
4926 symbol_c *IN_type_symbol = param_data_type; |
|
4927 last_type_symbol = param_data_type; |
|
4928 |
|
4929 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4930 { |
|
4931 |
|
4932 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4933 s4o.print("("); |
|
4934 return_type_symbol->accept(*this); |
|
4935 s4o.print(")"); |
|
4936 IN_param_value->accept(*this); |
|
4937 return NULL; |
|
4938 |
|
4939 } |
|
4940 |
|
4941 ERROR; |
|
4942 } |
|
4943 |
|
4944 }/*function_uint_to_word*/ |
|
4945 break; |
|
4946 |
|
4947 /**** |
|
4948 *UINT_TO_DWORD |
|
4949 */ |
|
4950 case function_uint_to_dword : |
|
4951 { |
|
4952 symbol_c *last_type_symbol = NULL; |
|
4953 |
|
4954 { |
|
4955 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4956 symbol_c *IN_param_value = &this->default_variable_name; |
|
4957 |
|
4958 symbol_c *IN_type_symbol = param_data_type; |
|
4959 last_type_symbol = param_data_type; |
|
4960 |
|
4961 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4962 { |
|
4963 |
|
4964 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4965 s4o.print("("); |
|
4966 return_type_symbol->accept(*this); |
|
4967 s4o.print(")"); |
|
4968 IN_param_value->accept(*this); |
|
4969 return NULL; |
|
4970 |
|
4971 } |
|
4972 |
|
4973 ERROR; |
|
4974 } |
|
4975 |
|
4976 }/*function_uint_to_dword*/ |
|
4977 break; |
|
4978 |
|
4979 /**** |
|
4980 *UINT_TO_LWORD |
|
4981 */ |
|
4982 case function_uint_to_lword : |
|
4983 { |
|
4984 symbol_c *last_type_symbol = NULL; |
|
4985 |
|
4986 { |
|
4987 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4988 symbol_c *IN_param_value = &this->default_variable_name; |
|
4989 |
|
4990 symbol_c *IN_type_symbol = param_data_type; |
|
4991 last_type_symbol = param_data_type; |
|
4992 |
|
4993 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
4994 { |
|
4995 |
|
4996 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4997 s4o.print("("); |
|
4998 return_type_symbol->accept(*this); |
|
4999 s4o.print(")"); |
|
5000 IN_param_value->accept(*this); |
|
5001 return NULL; |
|
5002 |
|
5003 } |
|
5004 |
|
5005 ERROR; |
|
5006 } |
|
5007 |
|
5008 }/*function_uint_to_lword*/ |
|
5009 break; |
|
5010 |
|
5011 /**** |
|
5012 *UINT_TO_STRING |
|
5013 */ |
|
5014 case function_uint_to_string : |
|
5015 { |
|
5016 symbol_c *last_type_symbol = NULL; |
|
5017 |
|
5018 { |
|
5019 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5020 symbol_c *IN_param_value = &this->default_variable_name; |
|
5021 |
|
5022 symbol_c *IN_type_symbol = param_data_type; |
|
5023 last_type_symbol = param_data_type; |
|
5024 |
|
5025 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
5026 { |
|
5027 |
|
5028 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5029 s4o.print("("); |
|
5030 return_type_symbol->accept(*this); |
|
5031 s4o.print(")int_to_string("); |
|
5032 IN_param_value->accept(*this); |
|
5033 s4o.print(", 10)"); |
|
5034 return NULL; |
|
5035 |
|
5036 } |
|
5037 |
|
5038 ERROR; |
|
5039 } |
|
5040 |
|
5041 }/*function_uint_to_string*/ |
|
5042 break; |
|
5043 |
|
5044 /**** |
|
5045 *UINT_TO_WSTRING |
|
5046 */ |
|
5047 case function_uint_to_wstring : |
|
5048 { |
|
5049 symbol_c *last_type_symbol = NULL; |
|
5050 |
|
5051 { |
|
5052 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5053 symbol_c *IN_param_value = &this->default_variable_name; |
|
5054 |
|
5055 symbol_c *IN_type_symbol = param_data_type; |
|
5056 last_type_symbol = param_data_type; |
|
5057 |
|
5058 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
5059 { |
|
5060 |
|
5061 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
5062 s4o.print("("); |
|
5063 return_type_symbol->accept(*this); |
|
5064 s4o.print(")int_to_string("); |
|
5065 IN_param_value->accept(*this); |
|
5066 s4o.print(", 10)"); |
|
5067 return NULL; |
|
5068 |
|
5069 } |
|
5070 |
|
5071 ERROR; |
|
5072 } |
|
5073 |
|
5074 }/*function_uint_to_wstring*/ |
|
5075 break; |
|
5076 |
|
5077 /**** |
|
5078 *UINT_TO_DATE |
|
5079 */ |
|
5080 case function_uint_to_date : |
|
5081 { |
|
5082 symbol_c *last_type_symbol = NULL; |
|
5083 |
|
5084 { |
|
5085 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5086 symbol_c *IN_param_value = &this->default_variable_name; |
|
5087 |
|
5088 symbol_c *IN_type_symbol = param_data_type; |
|
5089 last_type_symbol = param_data_type; |
|
5090 |
|
5091 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
5092 { |
|
5093 |
|
5094 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5095 s4o.print("("); |
|
5096 return_type_symbol->accept(*this); |
|
5097 s4o.print(")real_to_time("); |
|
5098 IN_param_value->accept(*this); |
|
5099 s4o.print(")"); |
|
5100 return NULL; |
|
5101 |
|
5102 } |
|
5103 |
|
5104 ERROR; |
|
5105 } |
|
5106 |
|
5107 }/*function_uint_to_date*/ |
|
5108 break; |
|
5109 |
|
5110 /**** |
|
5111 *UINT_TO_TOD |
|
5112 */ |
|
5113 case function_uint_to_tod : |
|
5114 { |
|
5115 symbol_c *last_type_symbol = NULL; |
|
5116 |
|
5117 { |
|
5118 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5119 symbol_c *IN_param_value = &this->default_variable_name; |
|
5120 |
|
5121 symbol_c *IN_type_symbol = param_data_type; |
|
5122 last_type_symbol = param_data_type; |
|
5123 |
|
5124 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
5125 { |
|
5126 |
|
5127 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5128 s4o.print("("); |
|
5129 return_type_symbol->accept(*this); |
|
5130 s4o.print(")real_to_time("); |
|
5131 IN_param_value->accept(*this); |
|
5132 s4o.print(")"); |
|
5133 return NULL; |
|
5134 |
|
5135 } |
|
5136 |
|
5137 ERROR; |
|
5138 } |
|
5139 |
|
5140 }/*function_uint_to_tod*/ |
|
5141 break; |
|
5142 |
|
5143 /**** |
|
5144 *UINT_TO_DT |
|
5145 */ |
|
5146 case function_uint_to_dt : |
|
5147 { |
|
5148 symbol_c *last_type_symbol = NULL; |
|
5149 |
|
5150 { |
|
5151 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5152 symbol_c *IN_param_value = &this->default_variable_name; |
|
5153 |
|
5154 symbol_c *IN_type_symbol = param_data_type; |
|
5155 last_type_symbol = param_data_type; |
|
5156 |
|
5157 if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) |
|
5158 { |
|
5159 |
|
5160 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5161 s4o.print("("); |
|
5162 return_type_symbol->accept(*this); |
|
5163 s4o.print(")real_to_time("); |
|
5164 IN_param_value->accept(*this); |
|
5165 s4o.print(")"); |
|
5166 return NULL; |
|
5167 |
|
5168 } |
|
5169 |
|
5170 ERROR; |
|
5171 } |
|
5172 |
|
5173 }/*function_uint_to_dt*/ |
|
5174 break; |
|
5175 |
|
5176 /**** |
|
5177 *UDINT_TO_REAL |
|
5178 */ |
|
5179 case function_udint_to_real : |
|
5180 { |
|
5181 symbol_c *last_type_symbol = NULL; |
|
5182 |
|
5183 { |
|
5184 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5185 symbol_c *IN_param_value = &this->default_variable_name; |
|
5186 |
|
5187 symbol_c *IN_type_symbol = param_data_type; |
|
5188 last_type_symbol = param_data_type; |
|
5189 |
|
5190 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5191 { |
|
5192 |
|
5193 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5194 s4o.print("("); |
|
5195 return_type_symbol->accept(*this); |
|
5196 s4o.print(")"); |
|
5197 IN_param_value->accept(*this); |
|
5198 return NULL; |
|
5199 |
|
5200 } |
|
5201 |
|
5202 ERROR; |
|
5203 } |
|
5204 |
|
5205 }/*function_udint_to_real*/ |
|
5206 break; |
|
5207 |
|
5208 /**** |
|
5209 *UDINT_TO_LREAL |
|
5210 */ |
|
5211 case function_udint_to_lreal : |
|
5212 { |
|
5213 symbol_c *last_type_symbol = NULL; |
|
5214 |
|
5215 { |
|
5216 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5217 symbol_c *IN_param_value = &this->default_variable_name; |
|
5218 |
|
5219 symbol_c *IN_type_symbol = param_data_type; |
|
5220 last_type_symbol = param_data_type; |
|
5221 |
|
5222 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5223 { |
|
5224 |
|
5225 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5226 s4o.print("("); |
|
5227 return_type_symbol->accept(*this); |
|
5228 s4o.print(")"); |
|
5229 IN_param_value->accept(*this); |
|
5230 return NULL; |
|
5231 |
|
5232 } |
|
5233 |
|
5234 ERROR; |
|
5235 } |
|
5236 |
|
5237 }/*function_udint_to_lreal*/ |
|
5238 break; |
|
5239 |
|
5240 /**** |
|
5241 *UDINT_TO_SINT |
|
5242 */ |
|
5243 case function_udint_to_sint : |
|
5244 { |
|
5245 symbol_c *last_type_symbol = NULL; |
|
5246 |
|
5247 { |
|
5248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5249 symbol_c *IN_param_value = &this->default_variable_name; |
|
5250 |
|
5251 symbol_c *IN_type_symbol = param_data_type; |
|
5252 last_type_symbol = param_data_type; |
|
5253 |
|
5254 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5255 { |
|
5256 |
|
5257 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5258 s4o.print("("); |
|
5259 return_type_symbol->accept(*this); |
|
5260 s4o.print(")"); |
|
5261 IN_param_value->accept(*this); |
|
5262 return NULL; |
|
5263 |
|
5264 } |
|
5265 |
|
5266 ERROR; |
|
5267 } |
|
5268 |
|
5269 }/*function_udint_to_sint*/ |
|
5270 break; |
|
5271 |
|
5272 /**** |
|
5273 *UDINT_TO_INT |
|
5274 */ |
|
5275 case function_udint_to_int : |
|
5276 { |
|
5277 symbol_c *last_type_symbol = NULL; |
|
5278 |
|
5279 { |
|
5280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5281 symbol_c *IN_param_value = &this->default_variable_name; |
|
5282 |
|
5283 symbol_c *IN_type_symbol = param_data_type; |
|
5284 last_type_symbol = param_data_type; |
|
5285 |
|
5286 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5287 { |
|
5288 |
|
5289 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5290 s4o.print("("); |
|
5291 return_type_symbol->accept(*this); |
|
5292 s4o.print(")"); |
|
5293 IN_param_value->accept(*this); |
|
5294 return NULL; |
|
5295 |
|
5296 } |
|
5297 |
|
5298 ERROR; |
|
5299 } |
|
5300 |
|
5301 }/*function_udint_to_int*/ |
|
5302 break; |
|
5303 |
|
5304 /**** |
|
5305 *UDINT_TO_DINT |
|
5306 */ |
|
5307 case function_udint_to_dint : |
|
5308 { |
|
5309 symbol_c *last_type_symbol = NULL; |
|
5310 |
|
5311 { |
|
5312 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5313 symbol_c *IN_param_value = &this->default_variable_name; |
|
5314 |
|
5315 symbol_c *IN_type_symbol = param_data_type; |
|
5316 last_type_symbol = param_data_type; |
|
5317 |
|
5318 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5319 { |
|
5320 |
|
5321 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5322 s4o.print("("); |
|
5323 return_type_symbol->accept(*this); |
|
5324 s4o.print(")"); |
|
5325 IN_param_value->accept(*this); |
|
5326 return NULL; |
|
5327 |
|
5328 } |
|
5329 |
|
5330 ERROR; |
|
5331 } |
|
5332 |
|
5333 }/*function_udint_to_dint*/ |
|
5334 break; |
|
5335 |
|
5336 /**** |
|
5337 *UDINT_TO_LINT |
|
5338 */ |
|
5339 case function_udint_to_lint : |
|
5340 { |
|
5341 symbol_c *last_type_symbol = NULL; |
|
5342 |
|
5343 { |
|
5344 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5345 symbol_c *IN_param_value = &this->default_variable_name; |
|
5346 |
|
5347 symbol_c *IN_type_symbol = param_data_type; |
|
5348 last_type_symbol = param_data_type; |
|
5349 |
|
5350 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5351 { |
|
5352 |
|
5353 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5354 s4o.print("("); |
|
5355 return_type_symbol->accept(*this); |
|
5356 s4o.print(")"); |
|
5357 IN_param_value->accept(*this); |
|
5358 return NULL; |
|
5359 |
|
5360 } |
|
5361 |
|
5362 ERROR; |
|
5363 } |
|
5364 |
|
5365 }/*function_udint_to_lint*/ |
|
5366 break; |
|
5367 |
|
5368 /**** |
|
5369 *UDINT_TO_USINT |
|
5370 */ |
|
5371 case function_udint_to_usint : |
|
5372 { |
|
5373 symbol_c *last_type_symbol = NULL; |
|
5374 |
|
5375 { |
|
5376 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5377 symbol_c *IN_param_value = &this->default_variable_name; |
|
5378 |
|
5379 symbol_c *IN_type_symbol = param_data_type; |
|
5380 last_type_symbol = param_data_type; |
|
5381 |
|
5382 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5383 { |
|
5384 |
|
5385 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5386 s4o.print("("); |
|
5387 return_type_symbol->accept(*this); |
|
5388 s4o.print(")"); |
|
5389 IN_param_value->accept(*this); |
|
5390 return NULL; |
|
5391 |
|
5392 } |
|
5393 |
|
5394 ERROR; |
|
5395 } |
|
5396 |
|
5397 }/*function_udint_to_usint*/ |
|
5398 break; |
|
5399 |
|
5400 /**** |
|
5401 *UDINT_TO_UINT |
|
5402 */ |
|
5403 case function_udint_to_uint : |
|
5404 { |
|
5405 symbol_c *last_type_symbol = NULL; |
|
5406 |
|
5407 { |
|
5408 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5409 symbol_c *IN_param_value = &this->default_variable_name; |
|
5410 |
|
5411 symbol_c *IN_type_symbol = param_data_type; |
|
5412 last_type_symbol = param_data_type; |
|
5413 |
|
5414 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5415 { |
|
5416 |
|
5417 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5418 s4o.print("("); |
|
5419 return_type_symbol->accept(*this); |
|
5420 s4o.print(")"); |
|
5421 IN_param_value->accept(*this); |
|
5422 return NULL; |
|
5423 |
|
5424 } |
|
5425 |
|
5426 ERROR; |
|
5427 } |
|
5428 |
|
5429 }/*function_udint_to_uint*/ |
|
5430 break; |
|
5431 |
|
5432 /**** |
|
5433 *UDINT_TO_ULINT |
|
5434 */ |
|
5435 case function_udint_to_ulint : |
|
5436 { |
|
5437 symbol_c *last_type_symbol = NULL; |
|
5438 |
|
5439 { |
|
5440 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5441 symbol_c *IN_param_value = &this->default_variable_name; |
|
5442 |
|
5443 symbol_c *IN_type_symbol = param_data_type; |
|
5444 last_type_symbol = param_data_type; |
|
5445 |
|
5446 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5447 { |
|
5448 |
|
5449 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5450 s4o.print("("); |
|
5451 return_type_symbol->accept(*this); |
|
5452 s4o.print(")"); |
|
5453 IN_param_value->accept(*this); |
|
5454 return NULL; |
|
5455 |
|
5456 } |
|
5457 |
|
5458 ERROR; |
|
5459 } |
|
5460 |
|
5461 }/*function_udint_to_ulint*/ |
|
5462 break; |
|
5463 |
|
5464 /**** |
|
5465 *UDINT_TO_TIME |
|
5466 */ |
|
5467 case function_udint_to_time : |
|
5468 { |
|
5469 symbol_c *last_type_symbol = NULL; |
|
5470 |
|
5471 { |
|
5472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5473 symbol_c *IN_param_value = &this->default_variable_name; |
|
5474 |
|
5475 symbol_c *IN_type_symbol = param_data_type; |
|
5476 last_type_symbol = param_data_type; |
|
5477 |
|
5478 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5479 { |
|
5480 |
|
5481 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5482 s4o.print("("); |
|
5483 return_type_symbol->accept(*this); |
|
5484 s4o.print(")real_to_time("); |
|
5485 IN_param_value->accept(*this); |
|
5486 s4o.print(")"); |
|
5487 return NULL; |
|
5488 |
|
5489 } |
|
5490 |
|
5491 ERROR; |
|
5492 } |
|
5493 |
|
5494 }/*function_udint_to_time*/ |
|
5495 break; |
|
5496 |
|
5497 /**** |
|
5498 *UDINT_TO_BOOL |
|
5499 */ |
|
5500 case function_udint_to_bool : |
|
5501 { |
|
5502 symbol_c *last_type_symbol = NULL; |
|
5503 |
|
5504 { |
|
5505 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5506 symbol_c *IN_param_value = &this->default_variable_name; |
|
5507 |
|
5508 symbol_c *IN_type_symbol = param_data_type; |
|
5509 last_type_symbol = param_data_type; |
|
5510 |
|
5511 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5512 { |
|
5513 |
|
5514 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
5515 s4o.print("("); |
|
5516 return_type_symbol->accept(*this); |
|
5517 s4o.print(")"); |
|
5518 IN_param_value->accept(*this); |
|
5519 return NULL; |
|
5520 |
|
5521 } |
|
5522 |
|
5523 ERROR; |
|
5524 } |
|
5525 |
|
5526 }/*function_udint_to_bool*/ |
|
5527 break; |
|
5528 |
|
5529 /**** |
|
5530 *UDINT_TO_BYTE |
|
5531 */ |
|
5532 case function_udint_to_byte : |
|
5533 { |
|
5534 symbol_c *last_type_symbol = NULL; |
|
5535 |
|
5536 { |
|
5537 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5538 symbol_c *IN_param_value = &this->default_variable_name; |
|
5539 |
|
5540 symbol_c *IN_type_symbol = param_data_type; |
|
5541 last_type_symbol = param_data_type; |
|
5542 |
|
5543 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5544 { |
|
5545 |
|
5546 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5547 s4o.print("("); |
|
5548 return_type_symbol->accept(*this); |
|
5549 s4o.print(")"); |
|
5550 IN_param_value->accept(*this); |
|
5551 return NULL; |
|
5552 |
|
5553 } |
|
5554 |
|
5555 ERROR; |
|
5556 } |
|
5557 |
|
5558 }/*function_udint_to_byte*/ |
|
5559 break; |
|
5560 |
|
5561 /**** |
|
5562 *UDINT_TO_WORD |
|
5563 */ |
|
5564 case function_udint_to_word : |
|
5565 { |
|
5566 symbol_c *last_type_symbol = NULL; |
|
5567 |
|
5568 { |
|
5569 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5570 symbol_c *IN_param_value = &this->default_variable_name; |
|
5571 |
|
5572 symbol_c *IN_type_symbol = param_data_type; |
|
5573 last_type_symbol = param_data_type; |
|
5574 |
|
5575 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5576 { |
|
5577 |
|
5578 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
5579 s4o.print("("); |
|
5580 return_type_symbol->accept(*this); |
|
5581 s4o.print(")"); |
|
5582 IN_param_value->accept(*this); |
|
5583 return NULL; |
|
5584 |
|
5585 } |
|
5586 |
|
5587 ERROR; |
|
5588 } |
|
5589 |
|
5590 }/*function_udint_to_word*/ |
|
5591 break; |
|
5592 |
|
5593 /**** |
|
5594 *UDINT_TO_DWORD |
|
5595 */ |
|
5596 case function_udint_to_dword : |
|
5597 { |
|
5598 symbol_c *last_type_symbol = NULL; |
|
5599 |
|
5600 { |
|
5601 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5602 symbol_c *IN_param_value = &this->default_variable_name; |
|
5603 |
|
5604 symbol_c *IN_type_symbol = param_data_type; |
|
5605 last_type_symbol = param_data_type; |
|
5606 |
|
5607 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5608 { |
|
5609 |
|
5610 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5611 s4o.print("("); |
|
5612 return_type_symbol->accept(*this); |
|
5613 s4o.print(")"); |
|
5614 IN_param_value->accept(*this); |
|
5615 return NULL; |
|
5616 |
|
5617 } |
|
5618 |
|
5619 ERROR; |
|
5620 } |
|
5621 |
|
5622 }/*function_udint_to_dword*/ |
|
5623 break; |
|
5624 |
|
5625 /**** |
|
5626 *UDINT_TO_LWORD |
|
5627 */ |
|
5628 case function_udint_to_lword : |
|
5629 { |
|
5630 symbol_c *last_type_symbol = NULL; |
|
5631 |
|
5632 { |
|
5633 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5634 symbol_c *IN_param_value = &this->default_variable_name; |
|
5635 |
|
5636 symbol_c *IN_type_symbol = param_data_type; |
|
5637 last_type_symbol = param_data_type; |
|
5638 |
|
5639 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5640 { |
|
5641 |
|
5642 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5643 s4o.print("("); |
|
5644 return_type_symbol->accept(*this); |
|
5645 s4o.print(")"); |
|
5646 IN_param_value->accept(*this); |
|
5647 return NULL; |
|
5648 |
|
5649 } |
|
5650 |
|
5651 ERROR; |
|
5652 } |
|
5653 |
|
5654 }/*function_udint_to_lword*/ |
|
5655 break; |
|
5656 |
|
5657 /**** |
|
5658 *UDINT_TO_STRING |
|
5659 */ |
|
5660 case function_udint_to_string : |
|
5661 { |
|
5662 symbol_c *last_type_symbol = NULL; |
|
5663 |
|
5664 { |
|
5665 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5666 symbol_c *IN_param_value = &this->default_variable_name; |
|
5667 |
|
5668 symbol_c *IN_type_symbol = param_data_type; |
|
5669 last_type_symbol = param_data_type; |
|
5670 |
|
5671 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5672 { |
|
5673 |
|
5674 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5675 s4o.print("("); |
|
5676 return_type_symbol->accept(*this); |
|
5677 s4o.print(")int_to_string("); |
|
5678 IN_param_value->accept(*this); |
|
5679 s4o.print(", 10)"); |
|
5680 return NULL; |
|
5681 |
|
5682 } |
|
5683 |
|
5684 ERROR; |
|
5685 } |
|
5686 |
|
5687 }/*function_udint_to_string*/ |
|
5688 break; |
|
5689 |
|
5690 /**** |
|
5691 *UDINT_TO_WSTRING |
|
5692 */ |
|
5693 case function_udint_to_wstring : |
|
5694 { |
|
5695 symbol_c *last_type_symbol = NULL; |
|
5696 |
|
5697 { |
|
5698 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5699 symbol_c *IN_param_value = &this->default_variable_name; |
|
5700 |
|
5701 symbol_c *IN_type_symbol = param_data_type; |
|
5702 last_type_symbol = param_data_type; |
|
5703 |
|
5704 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5705 { |
|
5706 |
|
5707 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
5708 s4o.print("("); |
|
5709 return_type_symbol->accept(*this); |
|
5710 s4o.print(")int_to_string("); |
|
5711 IN_param_value->accept(*this); |
|
5712 s4o.print(", 10)"); |
|
5713 return NULL; |
|
5714 |
|
5715 } |
|
5716 |
|
5717 ERROR; |
|
5718 } |
|
5719 |
|
5720 }/*function_udint_to_wstring*/ |
|
5721 break; |
|
5722 |
|
5723 /**** |
|
5724 *UDINT_TO_DATE |
|
5725 */ |
|
5726 case function_udint_to_date : |
|
5727 { |
|
5728 symbol_c *last_type_symbol = NULL; |
|
5729 |
|
5730 { |
|
5731 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5732 symbol_c *IN_param_value = &this->default_variable_name; |
|
5733 |
|
5734 symbol_c *IN_type_symbol = param_data_type; |
|
5735 last_type_symbol = param_data_type; |
|
5736 |
|
5737 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5738 { |
|
5739 |
|
5740 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5741 s4o.print("("); |
|
5742 return_type_symbol->accept(*this); |
|
5743 s4o.print(")real_to_time("); |
|
5744 IN_param_value->accept(*this); |
|
5745 s4o.print(")"); |
|
5746 return NULL; |
|
5747 |
|
5748 } |
|
5749 |
|
5750 ERROR; |
|
5751 } |
|
5752 |
|
5753 }/*function_udint_to_date*/ |
|
5754 break; |
|
5755 |
|
5756 /**** |
|
5757 *UDINT_TO_TOD |
|
5758 */ |
|
5759 case function_udint_to_tod : |
|
5760 { |
|
5761 symbol_c *last_type_symbol = NULL; |
|
5762 |
|
5763 { |
|
5764 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5765 symbol_c *IN_param_value = &this->default_variable_name; |
|
5766 |
|
5767 symbol_c *IN_type_symbol = param_data_type; |
|
5768 last_type_symbol = param_data_type; |
|
5769 |
|
5770 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5771 { |
|
5772 |
|
5773 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5774 s4o.print("("); |
|
5775 return_type_symbol->accept(*this); |
|
5776 s4o.print(")real_to_time("); |
|
5777 IN_param_value->accept(*this); |
|
5778 s4o.print(")"); |
|
5779 return NULL; |
|
5780 |
|
5781 } |
|
5782 |
|
5783 ERROR; |
|
5784 } |
|
5785 |
|
5786 }/*function_udint_to_tod*/ |
|
5787 break; |
|
5788 |
|
5789 /**** |
|
5790 *UDINT_TO_DT |
|
5791 */ |
|
5792 case function_udint_to_dt : |
|
5793 { |
|
5794 symbol_c *last_type_symbol = NULL; |
|
5795 |
|
5796 { |
|
5797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5798 symbol_c *IN_param_value = &this->default_variable_name; |
|
5799 |
|
5800 symbol_c *IN_type_symbol = param_data_type; |
|
5801 last_type_symbol = param_data_type; |
|
5802 |
|
5803 if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) |
|
5804 { |
|
5805 |
|
5806 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5807 s4o.print("("); |
|
5808 return_type_symbol->accept(*this); |
|
5809 s4o.print(")real_to_time("); |
|
5810 IN_param_value->accept(*this); |
|
5811 s4o.print(")"); |
|
5812 return NULL; |
|
5813 |
|
5814 } |
|
5815 |
|
5816 ERROR; |
|
5817 } |
|
5818 |
|
5819 }/*function_udint_to_dt*/ |
|
5820 break; |
|
5821 |
|
5822 /**** |
|
5823 *ULINT_TO_REAL |
|
5824 */ |
|
5825 case function_ulint_to_real : |
|
5826 { |
|
5827 symbol_c *last_type_symbol = NULL; |
|
5828 |
|
5829 { |
|
5830 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5831 symbol_c *IN_param_value = &this->default_variable_name; |
|
5832 |
|
5833 symbol_c *IN_type_symbol = param_data_type; |
|
5834 last_type_symbol = param_data_type; |
|
5835 |
|
5836 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5837 { |
|
5838 |
|
5839 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5840 s4o.print("("); |
|
5841 return_type_symbol->accept(*this); |
|
5842 s4o.print(")"); |
|
5843 IN_param_value->accept(*this); |
|
5844 return NULL; |
|
5845 |
|
5846 } |
|
5847 |
|
5848 ERROR; |
|
5849 } |
|
5850 |
|
5851 }/*function_ulint_to_real*/ |
|
5852 break; |
|
5853 |
|
5854 /**** |
|
5855 *ULINT_TO_LREAL |
|
5856 */ |
|
5857 case function_ulint_to_lreal : |
|
5858 { |
|
5859 symbol_c *last_type_symbol = NULL; |
|
5860 |
|
5861 { |
|
5862 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5863 symbol_c *IN_param_value = &this->default_variable_name; |
|
5864 |
|
5865 symbol_c *IN_type_symbol = param_data_type; |
|
5866 last_type_symbol = param_data_type; |
|
5867 |
|
5868 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5869 { |
|
5870 |
|
5871 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5872 s4o.print("("); |
|
5873 return_type_symbol->accept(*this); |
|
5874 s4o.print(")"); |
|
5875 IN_param_value->accept(*this); |
|
5876 return NULL; |
|
5877 |
|
5878 } |
|
5879 |
|
5880 ERROR; |
|
5881 } |
|
5882 |
|
5883 }/*function_ulint_to_lreal*/ |
|
5884 break; |
|
5885 |
|
5886 /**** |
|
5887 *ULINT_TO_SINT |
|
5888 */ |
|
5889 case function_ulint_to_sint : |
|
5890 { |
|
5891 symbol_c *last_type_symbol = NULL; |
|
5892 |
|
5893 { |
|
5894 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5895 symbol_c *IN_param_value = &this->default_variable_name; |
|
5896 |
|
5897 symbol_c *IN_type_symbol = param_data_type; |
|
5898 last_type_symbol = param_data_type; |
|
5899 |
|
5900 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5901 { |
|
5902 |
|
5903 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5904 s4o.print("("); |
|
5905 return_type_symbol->accept(*this); |
|
5906 s4o.print(")"); |
|
5907 IN_param_value->accept(*this); |
|
5908 return NULL; |
|
5909 |
|
5910 } |
|
5911 |
|
5912 ERROR; |
|
5913 } |
|
5914 |
|
5915 }/*function_ulint_to_sint*/ |
|
5916 break; |
|
5917 |
|
5918 /**** |
|
5919 *ULINT_TO_INT |
|
5920 */ |
|
5921 case function_ulint_to_int : |
|
5922 { |
|
5923 symbol_c *last_type_symbol = NULL; |
|
5924 |
|
5925 { |
|
5926 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5927 symbol_c *IN_param_value = &this->default_variable_name; |
|
5928 |
|
5929 symbol_c *IN_type_symbol = param_data_type; |
|
5930 last_type_symbol = param_data_type; |
|
5931 |
|
5932 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5933 { |
|
5934 |
|
5935 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5936 s4o.print("("); |
|
5937 return_type_symbol->accept(*this); |
|
5938 s4o.print(")"); |
|
5939 IN_param_value->accept(*this); |
|
5940 return NULL; |
|
5941 |
|
5942 } |
|
5943 |
|
5944 ERROR; |
|
5945 } |
|
5946 |
|
5947 }/*function_ulint_to_int*/ |
|
5948 break; |
|
5949 |
|
5950 /**** |
|
5951 *ULINT_TO_DINT |
|
5952 */ |
|
5953 case function_ulint_to_dint : |
|
5954 { |
|
5955 symbol_c *last_type_symbol = NULL; |
|
5956 |
|
5957 { |
|
5958 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5959 symbol_c *IN_param_value = &this->default_variable_name; |
|
5960 |
|
5961 symbol_c *IN_type_symbol = param_data_type; |
|
5962 last_type_symbol = param_data_type; |
|
5963 |
|
5964 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5965 { |
|
5966 |
|
5967 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5968 s4o.print("("); |
|
5969 return_type_symbol->accept(*this); |
|
5970 s4o.print(")"); |
|
5971 IN_param_value->accept(*this); |
|
5972 return NULL; |
|
5973 |
|
5974 } |
|
5975 |
|
5976 ERROR; |
|
5977 } |
|
5978 |
|
5979 }/*function_ulint_to_dint*/ |
|
5980 break; |
|
5981 |
|
5982 /**** |
|
5983 *ULINT_TO_LINT |
|
5984 */ |
|
5985 case function_ulint_to_lint : |
|
5986 { |
|
5987 symbol_c *last_type_symbol = NULL; |
|
5988 |
|
5989 { |
|
5990 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5991 symbol_c *IN_param_value = &this->default_variable_name; |
|
5992 |
|
5993 symbol_c *IN_type_symbol = param_data_type; |
|
5994 last_type_symbol = param_data_type; |
|
5995 |
|
5996 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
5997 { |
|
5998 |
|
5999 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6000 s4o.print("("); |
|
6001 return_type_symbol->accept(*this); |
|
6002 s4o.print(")"); |
|
6003 IN_param_value->accept(*this); |
|
6004 return NULL; |
|
6005 |
|
6006 } |
|
6007 |
|
6008 ERROR; |
|
6009 } |
|
6010 |
|
6011 }/*function_ulint_to_lint*/ |
|
6012 break; |
|
6013 |
|
6014 /**** |
|
6015 *ULINT_TO_USINT |
|
6016 */ |
|
6017 case function_ulint_to_usint : |
|
6018 { |
|
6019 symbol_c *last_type_symbol = NULL; |
|
6020 |
|
6021 { |
|
6022 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6023 symbol_c *IN_param_value = &this->default_variable_name; |
|
6024 |
|
6025 symbol_c *IN_type_symbol = param_data_type; |
|
6026 last_type_symbol = param_data_type; |
|
6027 |
|
6028 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6029 { |
|
6030 |
|
6031 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6032 s4o.print("("); |
|
6033 return_type_symbol->accept(*this); |
|
6034 s4o.print(")"); |
|
6035 IN_param_value->accept(*this); |
|
6036 return NULL; |
|
6037 |
|
6038 } |
|
6039 |
|
6040 ERROR; |
|
6041 } |
|
6042 |
|
6043 }/*function_ulint_to_usint*/ |
|
6044 break; |
|
6045 |
|
6046 /**** |
|
6047 *ULINT_TO_UINT |
|
6048 */ |
|
6049 case function_ulint_to_uint : |
|
6050 { |
|
6051 symbol_c *last_type_symbol = NULL; |
|
6052 |
|
6053 { |
|
6054 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6055 symbol_c *IN_param_value = &this->default_variable_name; |
|
6056 |
|
6057 symbol_c *IN_type_symbol = param_data_type; |
|
6058 last_type_symbol = param_data_type; |
|
6059 |
|
6060 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6061 { |
|
6062 |
|
6063 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6064 s4o.print("("); |
|
6065 return_type_symbol->accept(*this); |
|
6066 s4o.print(")"); |
|
6067 IN_param_value->accept(*this); |
|
6068 return NULL; |
|
6069 |
|
6070 } |
|
6071 |
|
6072 ERROR; |
|
6073 } |
|
6074 |
|
6075 }/*function_ulint_to_uint*/ |
|
6076 break; |
|
6077 |
|
6078 /**** |
|
6079 *ULINT_TO_UDINT |
|
6080 */ |
|
6081 case function_ulint_to_udint : |
|
6082 { |
|
6083 symbol_c *last_type_symbol = NULL; |
|
6084 |
|
6085 { |
|
6086 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6087 symbol_c *IN_param_value = &this->default_variable_name; |
|
6088 |
|
6089 symbol_c *IN_type_symbol = param_data_type; |
|
6090 last_type_symbol = param_data_type; |
|
6091 |
|
6092 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6093 { |
|
6094 |
|
6095 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6096 s4o.print("("); |
|
6097 return_type_symbol->accept(*this); |
|
6098 s4o.print(")"); |
|
6099 IN_param_value->accept(*this); |
|
6100 return NULL; |
|
6101 |
|
6102 } |
|
6103 |
|
6104 ERROR; |
|
6105 } |
|
6106 |
|
6107 }/*function_ulint_to_udint*/ |
|
6108 break; |
|
6109 |
|
6110 /**** |
|
6111 *ULINT_TO_TIME |
|
6112 */ |
|
6113 case function_ulint_to_time : |
|
6114 { |
|
6115 symbol_c *last_type_symbol = NULL; |
|
6116 |
|
6117 { |
|
6118 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6119 symbol_c *IN_param_value = &this->default_variable_name; |
|
6120 |
|
6121 symbol_c *IN_type_symbol = param_data_type; |
|
6122 last_type_symbol = param_data_type; |
|
6123 |
|
6124 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6125 { |
|
6126 |
|
6127 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6128 s4o.print("("); |
|
6129 return_type_symbol->accept(*this); |
|
6130 s4o.print(")real_to_time("); |
|
6131 IN_param_value->accept(*this); |
|
6132 s4o.print(")"); |
|
6133 return NULL; |
|
6134 |
|
6135 } |
|
6136 |
|
6137 ERROR; |
|
6138 } |
|
6139 |
|
6140 }/*function_ulint_to_time*/ |
|
6141 break; |
|
6142 |
|
6143 /**** |
|
6144 *ULINT_TO_BOOL |
|
6145 */ |
|
6146 case function_ulint_to_bool : |
|
6147 { |
|
6148 symbol_c *last_type_symbol = NULL; |
|
6149 |
|
6150 { |
|
6151 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6152 symbol_c *IN_param_value = &this->default_variable_name; |
|
6153 |
|
6154 symbol_c *IN_type_symbol = param_data_type; |
|
6155 last_type_symbol = param_data_type; |
|
6156 |
|
6157 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6158 { |
|
6159 |
|
6160 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6161 s4o.print("("); |
|
6162 return_type_symbol->accept(*this); |
|
6163 s4o.print(")"); |
|
6164 IN_param_value->accept(*this); |
|
6165 return NULL; |
|
6166 |
|
6167 } |
|
6168 |
|
6169 ERROR; |
|
6170 } |
|
6171 |
|
6172 }/*function_ulint_to_bool*/ |
|
6173 break; |
|
6174 |
|
6175 /**** |
|
6176 *ULINT_TO_BYTE |
|
6177 */ |
|
6178 case function_ulint_to_byte : |
|
6179 { |
|
6180 symbol_c *last_type_symbol = NULL; |
|
6181 |
|
6182 { |
|
6183 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6184 symbol_c *IN_param_value = &this->default_variable_name; |
|
6185 |
|
6186 symbol_c *IN_type_symbol = param_data_type; |
|
6187 last_type_symbol = param_data_type; |
|
6188 |
|
6189 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6190 { |
|
6191 |
|
6192 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6193 s4o.print("("); |
|
6194 return_type_symbol->accept(*this); |
|
6195 s4o.print(")"); |
|
6196 IN_param_value->accept(*this); |
|
6197 return NULL; |
|
6198 |
|
6199 } |
|
6200 |
|
6201 ERROR; |
|
6202 } |
|
6203 |
|
6204 }/*function_ulint_to_byte*/ |
|
6205 break; |
|
6206 |
|
6207 /**** |
|
6208 *ULINT_TO_WORD |
|
6209 */ |
|
6210 case function_ulint_to_word : |
|
6211 { |
|
6212 symbol_c *last_type_symbol = NULL; |
|
6213 |
|
6214 { |
|
6215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6216 symbol_c *IN_param_value = &this->default_variable_name; |
|
6217 |
|
6218 symbol_c *IN_type_symbol = param_data_type; |
|
6219 last_type_symbol = param_data_type; |
|
6220 |
|
6221 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6222 { |
|
6223 |
|
6224 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6225 s4o.print("("); |
|
6226 return_type_symbol->accept(*this); |
|
6227 s4o.print(")"); |
|
6228 IN_param_value->accept(*this); |
|
6229 return NULL; |
|
6230 |
|
6231 } |
|
6232 |
|
6233 ERROR; |
|
6234 } |
|
6235 |
|
6236 }/*function_ulint_to_word*/ |
|
6237 break; |
|
6238 |
|
6239 /**** |
|
6240 *ULINT_TO_DWORD |
|
6241 */ |
|
6242 case function_ulint_to_dword : |
|
6243 { |
|
6244 symbol_c *last_type_symbol = NULL; |
|
6245 |
|
6246 { |
|
6247 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6248 symbol_c *IN_param_value = &this->default_variable_name; |
|
6249 |
|
6250 symbol_c *IN_type_symbol = param_data_type; |
|
6251 last_type_symbol = param_data_type; |
|
6252 |
|
6253 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6254 { |
|
6255 |
|
6256 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6257 s4o.print("("); |
|
6258 return_type_symbol->accept(*this); |
|
6259 s4o.print(")"); |
|
6260 IN_param_value->accept(*this); |
|
6261 return NULL; |
|
6262 |
|
6263 } |
|
6264 |
|
6265 ERROR; |
|
6266 } |
|
6267 |
|
6268 }/*function_ulint_to_dword*/ |
|
6269 break; |
|
6270 |
|
6271 /**** |
|
6272 *ULINT_TO_LWORD |
|
6273 */ |
|
6274 case function_ulint_to_lword : |
|
6275 { |
|
6276 symbol_c *last_type_symbol = NULL; |
|
6277 |
|
6278 { |
|
6279 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6280 symbol_c *IN_param_value = &this->default_variable_name; |
|
6281 |
|
6282 symbol_c *IN_type_symbol = param_data_type; |
|
6283 last_type_symbol = param_data_type; |
|
6284 |
|
6285 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6286 { |
|
6287 |
|
6288 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6289 s4o.print("("); |
|
6290 return_type_symbol->accept(*this); |
|
6291 s4o.print(")"); |
|
6292 IN_param_value->accept(*this); |
|
6293 return NULL; |
|
6294 |
|
6295 } |
|
6296 |
|
6297 ERROR; |
|
6298 } |
|
6299 |
|
6300 }/*function_ulint_to_lword*/ |
|
6301 break; |
|
6302 |
|
6303 /**** |
|
6304 *ULINT_TO_STRING |
|
6305 */ |
|
6306 case function_ulint_to_string : |
|
6307 { |
|
6308 symbol_c *last_type_symbol = NULL; |
|
6309 |
|
6310 { |
|
6311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6312 symbol_c *IN_param_value = &this->default_variable_name; |
|
6313 |
|
6314 symbol_c *IN_type_symbol = param_data_type; |
|
6315 last_type_symbol = param_data_type; |
|
6316 |
|
6317 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6318 { |
|
6319 |
|
6320 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6321 s4o.print("("); |
|
6322 return_type_symbol->accept(*this); |
|
6323 s4o.print(")int_to_string("); |
|
6324 IN_param_value->accept(*this); |
|
6325 s4o.print(", 10)"); |
|
6326 return NULL; |
|
6327 |
|
6328 } |
|
6329 |
|
6330 ERROR; |
|
6331 } |
|
6332 |
|
6333 }/*function_ulint_to_string*/ |
|
6334 break; |
|
6335 |
|
6336 /**** |
|
6337 *ULINT_TO_WSTRING |
|
6338 */ |
|
6339 case function_ulint_to_wstring : |
|
6340 { |
|
6341 symbol_c *last_type_symbol = NULL; |
|
6342 |
|
6343 { |
|
6344 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6345 symbol_c *IN_param_value = &this->default_variable_name; |
|
6346 |
|
6347 symbol_c *IN_type_symbol = param_data_type; |
|
6348 last_type_symbol = param_data_type; |
|
6349 |
|
6350 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6351 { |
|
6352 |
|
6353 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
6354 s4o.print("("); |
|
6355 return_type_symbol->accept(*this); |
|
6356 s4o.print(")int_to_string("); |
|
6357 IN_param_value->accept(*this); |
|
6358 s4o.print(", 10)"); |
|
6359 return NULL; |
|
6360 |
|
6361 } |
|
6362 |
|
6363 ERROR; |
|
6364 } |
|
6365 |
|
6366 }/*function_ulint_to_wstring*/ |
|
6367 break; |
|
6368 |
|
6369 /**** |
|
6370 *ULINT_TO_DATE |
|
6371 */ |
|
6372 case function_ulint_to_date : |
|
6373 { |
|
6374 symbol_c *last_type_symbol = NULL; |
|
6375 |
|
6376 { |
|
6377 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6378 symbol_c *IN_param_value = &this->default_variable_name; |
|
6379 |
|
6380 symbol_c *IN_type_symbol = param_data_type; |
|
6381 last_type_symbol = param_data_type; |
|
6382 |
|
6383 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6384 { |
|
6385 |
|
6386 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6387 s4o.print("("); |
|
6388 return_type_symbol->accept(*this); |
|
6389 s4o.print(")real_to_time("); |
|
6390 IN_param_value->accept(*this); |
|
6391 s4o.print(")"); |
|
6392 return NULL; |
|
6393 |
|
6394 } |
|
6395 |
|
6396 ERROR; |
|
6397 } |
|
6398 |
|
6399 }/*function_ulint_to_date*/ |
|
6400 break; |
|
6401 |
|
6402 /**** |
|
6403 *ULINT_TO_TOD |
|
6404 */ |
|
6405 case function_ulint_to_tod : |
|
6406 { |
|
6407 symbol_c *last_type_symbol = NULL; |
|
6408 |
|
6409 { |
|
6410 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6411 symbol_c *IN_param_value = &this->default_variable_name; |
|
6412 |
|
6413 symbol_c *IN_type_symbol = param_data_type; |
|
6414 last_type_symbol = param_data_type; |
|
6415 |
|
6416 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6417 { |
|
6418 |
|
6419 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6420 s4o.print("("); |
|
6421 return_type_symbol->accept(*this); |
|
6422 s4o.print(")real_to_time("); |
|
6423 IN_param_value->accept(*this); |
|
6424 s4o.print(")"); |
|
6425 return NULL; |
|
6426 |
|
6427 } |
|
6428 |
|
6429 ERROR; |
|
6430 } |
|
6431 |
|
6432 }/*function_ulint_to_tod*/ |
|
6433 break; |
|
6434 |
|
6435 /**** |
|
6436 *ULINT_TO_DT |
|
6437 */ |
|
6438 case function_ulint_to_dt : |
|
6439 { |
|
6440 symbol_c *last_type_symbol = NULL; |
|
6441 |
|
6442 { |
|
6443 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6444 symbol_c *IN_param_value = &this->default_variable_name; |
|
6445 |
|
6446 symbol_c *IN_type_symbol = param_data_type; |
|
6447 last_type_symbol = param_data_type; |
|
6448 |
|
6449 if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) |
|
6450 { |
|
6451 |
|
6452 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6453 s4o.print("("); |
|
6454 return_type_symbol->accept(*this); |
|
6455 s4o.print(")real_to_time("); |
|
6456 IN_param_value->accept(*this); |
|
6457 s4o.print(")"); |
|
6458 return NULL; |
|
6459 |
|
6460 } |
|
6461 |
|
6462 ERROR; |
|
6463 } |
|
6464 |
|
6465 }/*function_ulint_to_dt*/ |
|
6466 break; |
|
6467 |
|
6468 /**** |
|
6469 *TIME_TO_REAL |
|
6470 */ |
|
6471 case function_time_to_real : |
|
6472 { |
|
6473 symbol_c *last_type_symbol = NULL; |
|
6474 |
|
6475 { |
|
6476 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6477 symbol_c *IN_param_value = &this->default_variable_name; |
|
6478 |
|
6479 symbol_c *IN_type_symbol = param_data_type; |
|
6480 last_type_symbol = param_data_type; |
|
6481 |
|
6482 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6483 { |
|
6484 |
|
6485 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6486 s4o.print("("); |
|
6487 return_type_symbol->accept(*this); |
|
6488 s4o.print(")time_to_real("); |
|
6489 IN_param_value->accept(*this); |
|
6490 s4o.print(")"); |
|
6491 return NULL; |
|
6492 |
|
6493 } |
|
6494 |
|
6495 ERROR; |
|
6496 } |
|
6497 |
|
6498 }/*function_time_to_real*/ |
|
6499 break; |
|
6500 |
|
6501 /**** |
|
6502 *TIME_TO_LREAL |
|
6503 */ |
|
6504 case function_time_to_lreal : |
|
6505 { |
|
6506 symbol_c *last_type_symbol = NULL; |
|
6507 |
|
6508 { |
|
6509 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6510 symbol_c *IN_param_value = &this->default_variable_name; |
|
6511 |
|
6512 symbol_c *IN_type_symbol = param_data_type; |
|
6513 last_type_symbol = param_data_type; |
|
6514 |
|
6515 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6516 { |
|
6517 |
|
6518 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6519 s4o.print("("); |
|
6520 return_type_symbol->accept(*this); |
|
6521 s4o.print(")time_to_real("); |
|
6522 IN_param_value->accept(*this); |
|
6523 s4o.print(")"); |
|
6524 return NULL; |
|
6525 |
|
6526 } |
|
6527 |
|
6528 ERROR; |
|
6529 } |
|
6530 |
|
6531 }/*function_time_to_lreal*/ |
|
6532 break; |
|
6533 |
|
6534 /**** |
|
6535 *TIME_TO_SINT |
|
6536 */ |
|
6537 case function_time_to_sint : |
|
6538 { |
|
6539 symbol_c *last_type_symbol = NULL; |
|
6540 |
|
6541 { |
|
6542 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6543 symbol_c *IN_param_value = &this->default_variable_name; |
|
6544 |
|
6545 symbol_c *IN_type_symbol = param_data_type; |
|
6546 last_type_symbol = param_data_type; |
|
6547 |
|
6548 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6549 { |
|
6550 |
|
6551 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6552 s4o.print("("); |
|
6553 return_type_symbol->accept(*this); |
|
6554 s4o.print(")time_to_real("); |
|
6555 IN_param_value->accept(*this); |
|
6556 s4o.print(")"); |
|
6557 return NULL; |
|
6558 |
|
6559 } |
|
6560 |
|
6561 ERROR; |
|
6562 } |
|
6563 |
|
6564 }/*function_time_to_sint*/ |
|
6565 break; |
|
6566 |
|
6567 /**** |
|
6568 *TIME_TO_INT |
|
6569 */ |
|
6570 case function_time_to_int : |
|
6571 { |
|
6572 symbol_c *last_type_symbol = NULL; |
|
6573 |
|
6574 { |
|
6575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6576 symbol_c *IN_param_value = &this->default_variable_name; |
|
6577 |
|
6578 symbol_c *IN_type_symbol = param_data_type; |
|
6579 last_type_symbol = param_data_type; |
|
6580 |
|
6581 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6582 { |
|
6583 |
|
6584 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6585 s4o.print("("); |
|
6586 return_type_symbol->accept(*this); |
|
6587 s4o.print(")time_to_real("); |
|
6588 IN_param_value->accept(*this); |
|
6589 s4o.print(")"); |
|
6590 return NULL; |
|
6591 |
|
6592 } |
|
6593 |
|
6594 ERROR; |
|
6595 } |
|
6596 |
|
6597 }/*function_time_to_int*/ |
|
6598 break; |
|
6599 |
|
6600 /**** |
|
6601 *TIME_TO_DINT |
|
6602 */ |
|
6603 case function_time_to_dint : |
|
6604 { |
|
6605 symbol_c *last_type_symbol = NULL; |
|
6606 |
|
6607 { |
|
6608 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6609 symbol_c *IN_param_value = &this->default_variable_name; |
|
6610 |
|
6611 symbol_c *IN_type_symbol = param_data_type; |
|
6612 last_type_symbol = param_data_type; |
|
6613 |
|
6614 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6615 { |
|
6616 |
|
6617 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6618 s4o.print("("); |
|
6619 return_type_symbol->accept(*this); |
|
6620 s4o.print(")time_to_real("); |
|
6621 IN_param_value->accept(*this); |
|
6622 s4o.print(")"); |
|
6623 return NULL; |
|
6624 |
|
6625 } |
|
6626 |
|
6627 ERROR; |
|
6628 } |
|
6629 |
|
6630 }/*function_time_to_dint*/ |
|
6631 break; |
|
6632 |
|
6633 /**** |
|
6634 *TIME_TO_LINT |
|
6635 */ |
|
6636 case function_time_to_lint : |
|
6637 { |
|
6638 symbol_c *last_type_symbol = NULL; |
|
6639 |
|
6640 { |
|
6641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6642 symbol_c *IN_param_value = &this->default_variable_name; |
|
6643 |
|
6644 symbol_c *IN_type_symbol = param_data_type; |
|
6645 last_type_symbol = param_data_type; |
|
6646 |
|
6647 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6648 { |
|
6649 |
|
6650 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6651 s4o.print("("); |
|
6652 return_type_symbol->accept(*this); |
|
6653 s4o.print(")time_to_real("); |
|
6654 IN_param_value->accept(*this); |
|
6655 s4o.print(")"); |
|
6656 return NULL; |
|
6657 |
|
6658 } |
|
6659 |
|
6660 ERROR; |
|
6661 } |
|
6662 |
|
6663 }/*function_time_to_lint*/ |
|
6664 break; |
|
6665 |
|
6666 /**** |
|
6667 *TIME_TO_USINT |
|
6668 */ |
|
6669 case function_time_to_usint : |
|
6670 { |
|
6671 symbol_c *last_type_symbol = NULL; |
|
6672 |
|
6673 { |
|
6674 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6675 symbol_c *IN_param_value = &this->default_variable_name; |
|
6676 |
|
6677 symbol_c *IN_type_symbol = param_data_type; |
|
6678 last_type_symbol = param_data_type; |
|
6679 |
|
6680 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6681 { |
|
6682 |
|
6683 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6684 s4o.print("("); |
|
6685 return_type_symbol->accept(*this); |
|
6686 s4o.print(")time_to_real("); |
|
6687 IN_param_value->accept(*this); |
|
6688 s4o.print(")"); |
|
6689 return NULL; |
|
6690 |
|
6691 } |
|
6692 |
|
6693 ERROR; |
|
6694 } |
|
6695 |
|
6696 }/*function_time_to_usint*/ |
|
6697 break; |
|
6698 |
|
6699 /**** |
|
6700 *TIME_TO_UINT |
|
6701 */ |
|
6702 case function_time_to_uint : |
|
6703 { |
|
6704 symbol_c *last_type_symbol = NULL; |
|
6705 |
|
6706 { |
|
6707 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6708 symbol_c *IN_param_value = &this->default_variable_name; |
|
6709 |
|
6710 symbol_c *IN_type_symbol = param_data_type; |
|
6711 last_type_symbol = param_data_type; |
|
6712 |
|
6713 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6714 { |
|
6715 |
|
6716 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6717 s4o.print("("); |
|
6718 return_type_symbol->accept(*this); |
|
6719 s4o.print(")time_to_real("); |
|
6720 IN_param_value->accept(*this); |
|
6721 s4o.print(")"); |
|
6722 return NULL; |
|
6723 |
|
6724 } |
|
6725 |
|
6726 ERROR; |
|
6727 } |
|
6728 |
|
6729 }/*function_time_to_uint*/ |
|
6730 break; |
|
6731 |
|
6732 /**** |
|
6733 *TIME_TO_UDINT |
|
6734 */ |
|
6735 case function_time_to_udint : |
|
6736 { |
|
6737 symbol_c *last_type_symbol = NULL; |
|
6738 |
|
6739 { |
|
6740 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6741 symbol_c *IN_param_value = &this->default_variable_name; |
|
6742 |
|
6743 symbol_c *IN_type_symbol = param_data_type; |
|
6744 last_type_symbol = param_data_type; |
|
6745 |
|
6746 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6747 { |
|
6748 |
|
6749 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6750 s4o.print("("); |
|
6751 return_type_symbol->accept(*this); |
|
6752 s4o.print(")time_to_real("); |
|
6753 IN_param_value->accept(*this); |
|
6754 s4o.print(")"); |
|
6755 return NULL; |
|
6756 |
|
6757 } |
|
6758 |
|
6759 ERROR; |
|
6760 } |
|
6761 |
|
6762 }/*function_time_to_udint*/ |
|
6763 break; |
|
6764 |
|
6765 /**** |
|
6766 *TIME_TO_ULINT |
|
6767 */ |
|
6768 case function_time_to_ulint : |
|
6769 { |
|
6770 symbol_c *last_type_symbol = NULL; |
|
6771 |
|
6772 { |
|
6773 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6774 symbol_c *IN_param_value = &this->default_variable_name; |
|
6775 |
|
6776 symbol_c *IN_type_symbol = param_data_type; |
|
6777 last_type_symbol = param_data_type; |
|
6778 |
|
6779 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6780 { |
|
6781 |
|
6782 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6783 s4o.print("("); |
|
6784 return_type_symbol->accept(*this); |
|
6785 s4o.print(")time_to_real("); |
|
6786 IN_param_value->accept(*this); |
|
6787 s4o.print(")"); |
|
6788 return NULL; |
|
6789 |
|
6790 } |
|
6791 |
|
6792 ERROR; |
|
6793 } |
|
6794 |
|
6795 }/*function_time_to_ulint*/ |
|
6796 break; |
|
6797 |
|
6798 /**** |
|
6799 *TIME_TO_BOOL |
|
6800 */ |
|
6801 case function_time_to_bool : |
|
6802 { |
|
6803 symbol_c *last_type_symbol = NULL; |
|
6804 |
|
6805 { |
|
6806 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6807 symbol_c *IN_param_value = &this->default_variable_name; |
|
6808 |
|
6809 symbol_c *IN_type_symbol = param_data_type; |
|
6810 last_type_symbol = param_data_type; |
|
6811 |
|
6812 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6813 { |
|
6814 |
|
6815 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6816 s4o.print("("); |
|
6817 return_type_symbol->accept(*this); |
|
6818 s4o.print(")time_to_real("); |
|
6819 IN_param_value->accept(*this); |
|
6820 s4o.print(")"); |
|
6821 return NULL; |
|
6822 |
|
6823 } |
|
6824 |
|
6825 ERROR; |
|
6826 } |
|
6827 |
|
6828 }/*function_time_to_bool*/ |
|
6829 break; |
|
6830 |
|
6831 /**** |
|
6832 *TIME_TO_BYTE |
|
6833 */ |
|
6834 case function_time_to_byte : |
|
6835 { |
|
6836 symbol_c *last_type_symbol = NULL; |
|
6837 |
|
6838 { |
|
6839 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6840 symbol_c *IN_param_value = &this->default_variable_name; |
|
6841 |
|
6842 symbol_c *IN_type_symbol = param_data_type; |
|
6843 last_type_symbol = param_data_type; |
|
6844 |
|
6845 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6846 { |
|
6847 |
|
6848 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6849 s4o.print("("); |
|
6850 return_type_symbol->accept(*this); |
|
6851 s4o.print(")time_to_real("); |
|
6852 IN_param_value->accept(*this); |
|
6853 s4o.print(")"); |
|
6854 return NULL; |
|
6855 |
|
6856 } |
|
6857 |
|
6858 ERROR; |
|
6859 } |
|
6860 |
|
6861 }/*function_time_to_byte*/ |
|
6862 break; |
|
6863 |
|
6864 /**** |
|
6865 *TIME_TO_WORD |
|
6866 */ |
|
6867 case function_time_to_word : |
|
6868 { |
|
6869 symbol_c *last_type_symbol = NULL; |
|
6870 |
|
6871 { |
|
6872 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6873 symbol_c *IN_param_value = &this->default_variable_name; |
|
6874 |
|
6875 symbol_c *IN_type_symbol = param_data_type; |
|
6876 last_type_symbol = param_data_type; |
|
6877 |
|
6878 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6879 { |
|
6880 |
|
6881 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6882 s4o.print("("); |
|
6883 return_type_symbol->accept(*this); |
|
6884 s4o.print(")time_to_real("); |
|
6885 IN_param_value->accept(*this); |
|
6886 s4o.print(")"); |
|
6887 return NULL; |
|
6888 |
|
6889 } |
|
6890 |
|
6891 ERROR; |
|
6892 } |
|
6893 |
|
6894 }/*function_time_to_word*/ |
|
6895 break; |
|
6896 |
|
6897 /**** |
|
6898 *TIME_TO_DWORD |
|
6899 */ |
|
6900 case function_time_to_dword : |
|
6901 { |
|
6902 symbol_c *last_type_symbol = NULL; |
|
6903 |
|
6904 { |
|
6905 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6906 symbol_c *IN_param_value = &this->default_variable_name; |
|
6907 |
|
6908 symbol_c *IN_type_symbol = param_data_type; |
|
6909 last_type_symbol = param_data_type; |
|
6910 |
|
6911 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6912 { |
|
6913 |
|
6914 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6915 s4o.print("("); |
|
6916 return_type_symbol->accept(*this); |
|
6917 s4o.print(")time_to_real("); |
|
6918 IN_param_value->accept(*this); |
|
6919 s4o.print(")"); |
|
6920 return NULL; |
|
6921 |
|
6922 } |
|
6923 |
|
6924 ERROR; |
|
6925 } |
|
6926 |
|
6927 }/*function_time_to_dword*/ |
|
6928 break; |
|
6929 |
|
6930 /**** |
|
6931 *TIME_TO_LWORD |
|
6932 */ |
|
6933 case function_time_to_lword : |
|
6934 { |
|
6935 symbol_c *last_type_symbol = NULL; |
|
6936 |
|
6937 { |
|
6938 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6939 symbol_c *IN_param_value = &this->default_variable_name; |
|
6940 |
|
6941 symbol_c *IN_type_symbol = param_data_type; |
|
6942 last_type_symbol = param_data_type; |
|
6943 |
|
6944 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6945 { |
|
6946 |
|
6947 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6948 s4o.print("("); |
|
6949 return_type_symbol->accept(*this); |
|
6950 s4o.print(")time_to_real("); |
|
6951 IN_param_value->accept(*this); |
|
6952 s4o.print(")"); |
|
6953 return NULL; |
|
6954 |
|
6955 } |
|
6956 |
|
6957 ERROR; |
|
6958 } |
|
6959 |
|
6960 }/*function_time_to_lword*/ |
|
6961 break; |
|
6962 |
|
6963 /**** |
|
6964 *TIME_TO_STRING |
|
6965 */ |
|
6966 case function_time_to_string : |
|
6967 { |
|
6968 symbol_c *last_type_symbol = NULL; |
|
6969 |
|
6970 { |
|
6971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6972 symbol_c *IN_param_value = &this->default_variable_name; |
|
6973 |
|
6974 symbol_c *IN_type_symbol = param_data_type; |
|
6975 last_type_symbol = param_data_type; |
|
6976 |
|
6977 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
6978 { |
|
6979 |
|
6980 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6981 s4o.print("("); |
|
6982 return_type_symbol->accept(*this); |
|
6983 s4o.print(")time_to_string("); |
|
6984 IN_param_value->accept(*this); |
|
6985 s4o.print(")"); |
|
6986 return NULL; |
|
6987 |
|
6988 } |
|
6989 |
|
6990 ERROR; |
|
6991 } |
|
6992 |
|
6993 }/*function_time_to_string*/ |
|
6994 break; |
|
6995 |
|
6996 /**** |
|
6997 *TIME_TO_WSTRING |
|
6998 */ |
|
6999 case function_time_to_wstring : |
|
7000 { |
|
7001 symbol_c *last_type_symbol = NULL; |
|
7002 |
|
7003 { |
|
7004 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7005 symbol_c *IN_param_value = &this->default_variable_name; |
|
7006 |
|
7007 symbol_c *IN_type_symbol = param_data_type; |
|
7008 last_type_symbol = param_data_type; |
|
7009 |
|
7010 if (typeid(*last_type_symbol) == typeid(time_type_name_c)) |
|
7011 { |
|
7012 |
|
7013 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
7014 s4o.print("("); |
|
7015 return_type_symbol->accept(*this); |
|
7016 s4o.print(")time_to_string("); |
|
7017 IN_param_value->accept(*this); |
|
7018 s4o.print(")"); |
|
7019 return NULL; |
|
7020 |
|
7021 } |
|
7022 |
|
7023 ERROR; |
|
7024 } |
|
7025 |
|
7026 }/*function_time_to_wstring*/ |
|
7027 break; |
|
7028 |
|
7029 /**** |
|
7030 *BOOL_TO_REAL |
|
7031 */ |
|
7032 case function_bool_to_real : |
|
7033 { |
|
7034 symbol_c *last_type_symbol = NULL; |
|
7035 |
|
7036 { |
|
7037 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7038 symbol_c *IN_param_value = &this->default_variable_name; |
|
7039 |
|
7040 symbol_c *IN_type_symbol = param_data_type; |
|
7041 last_type_symbol = param_data_type; |
|
7042 |
|
7043 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7044 { |
|
7045 |
|
7046 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7047 s4o.print("("); |
|
7048 return_type_symbol->accept(*this); |
|
7049 s4o.print(")"); |
|
7050 IN_param_value->accept(*this); |
|
7051 return NULL; |
|
7052 |
|
7053 } |
|
7054 |
|
7055 ERROR; |
|
7056 } |
|
7057 |
|
7058 }/*function_bool_to_real*/ |
|
7059 break; |
|
7060 |
|
7061 /**** |
|
7062 *BOOL_TO_LREAL |
|
7063 */ |
|
7064 case function_bool_to_lreal : |
|
7065 { |
|
7066 symbol_c *last_type_symbol = NULL; |
|
7067 |
|
7068 { |
|
7069 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7070 symbol_c *IN_param_value = &this->default_variable_name; |
|
7071 |
|
7072 symbol_c *IN_type_symbol = param_data_type; |
|
7073 last_type_symbol = param_data_type; |
|
7074 |
|
7075 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7076 { |
|
7077 |
|
7078 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7079 s4o.print("("); |
|
7080 return_type_symbol->accept(*this); |
|
7081 s4o.print(")"); |
|
7082 IN_param_value->accept(*this); |
|
7083 return NULL; |
|
7084 |
|
7085 } |
|
7086 |
|
7087 ERROR; |
|
7088 } |
|
7089 |
|
7090 }/*function_bool_to_lreal*/ |
|
7091 break; |
|
7092 |
|
7093 /**** |
|
7094 *BOOL_TO_SINT |
|
7095 */ |
|
7096 case function_bool_to_sint : |
|
7097 { |
|
7098 symbol_c *last_type_symbol = NULL; |
|
7099 |
|
7100 { |
|
7101 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7102 symbol_c *IN_param_value = &this->default_variable_name; |
|
7103 |
|
7104 symbol_c *IN_type_symbol = param_data_type; |
|
7105 last_type_symbol = param_data_type; |
|
7106 |
|
7107 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7108 { |
|
7109 |
|
7110 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7111 s4o.print("("); |
|
7112 return_type_symbol->accept(*this); |
|
7113 s4o.print(")"); |
|
7114 IN_param_value->accept(*this); |
|
7115 return NULL; |
|
7116 |
|
7117 } |
|
7118 |
|
7119 ERROR; |
|
7120 } |
|
7121 |
|
7122 }/*function_bool_to_sint*/ |
|
7123 break; |
|
7124 |
|
7125 /**** |
|
7126 *BOOL_TO_INT |
|
7127 */ |
|
7128 case function_bool_to_int : |
|
7129 { |
|
7130 symbol_c *last_type_symbol = NULL; |
|
7131 |
|
7132 { |
|
7133 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7134 symbol_c *IN_param_value = &this->default_variable_name; |
|
7135 |
|
7136 symbol_c *IN_type_symbol = param_data_type; |
|
7137 last_type_symbol = param_data_type; |
|
7138 |
|
7139 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7140 { |
|
7141 |
|
7142 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7143 s4o.print("("); |
|
7144 return_type_symbol->accept(*this); |
|
7145 s4o.print(")"); |
|
7146 IN_param_value->accept(*this); |
|
7147 return NULL; |
|
7148 |
|
7149 } |
|
7150 |
|
7151 ERROR; |
|
7152 } |
|
7153 |
|
7154 }/*function_bool_to_int*/ |
|
7155 break; |
|
7156 |
|
7157 /**** |
|
7158 *BOOL_TO_DINT |
|
7159 */ |
|
7160 case function_bool_to_dint : |
|
7161 { |
|
7162 symbol_c *last_type_symbol = NULL; |
|
7163 |
|
7164 { |
|
7165 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7166 symbol_c *IN_param_value = &this->default_variable_name; |
|
7167 |
|
7168 symbol_c *IN_type_symbol = param_data_type; |
|
7169 last_type_symbol = param_data_type; |
|
7170 |
|
7171 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7172 { |
|
7173 |
|
7174 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7175 s4o.print("("); |
|
7176 return_type_symbol->accept(*this); |
|
7177 s4o.print(")"); |
|
7178 IN_param_value->accept(*this); |
|
7179 return NULL; |
|
7180 |
|
7181 } |
|
7182 |
|
7183 ERROR; |
|
7184 } |
|
7185 |
|
7186 }/*function_bool_to_dint*/ |
|
7187 break; |
|
7188 |
|
7189 /**** |
|
7190 *BOOL_TO_LINT |
|
7191 */ |
|
7192 case function_bool_to_lint : |
|
7193 { |
|
7194 symbol_c *last_type_symbol = NULL; |
|
7195 |
|
7196 { |
|
7197 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7198 symbol_c *IN_param_value = &this->default_variable_name; |
|
7199 |
|
7200 symbol_c *IN_type_symbol = param_data_type; |
|
7201 last_type_symbol = param_data_type; |
|
7202 |
|
7203 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7204 { |
|
7205 |
|
7206 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7207 s4o.print("("); |
|
7208 return_type_symbol->accept(*this); |
|
7209 s4o.print(")"); |
|
7210 IN_param_value->accept(*this); |
|
7211 return NULL; |
|
7212 |
|
7213 } |
|
7214 |
|
7215 ERROR; |
|
7216 } |
|
7217 |
|
7218 }/*function_bool_to_lint*/ |
|
7219 break; |
|
7220 |
|
7221 /**** |
|
7222 *BOOL_TO_USINT |
|
7223 */ |
|
7224 case function_bool_to_usint : |
|
7225 { |
|
7226 symbol_c *last_type_symbol = NULL; |
|
7227 |
|
7228 { |
|
7229 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7230 symbol_c *IN_param_value = &this->default_variable_name; |
|
7231 |
|
7232 symbol_c *IN_type_symbol = param_data_type; |
|
7233 last_type_symbol = param_data_type; |
|
7234 |
|
7235 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7236 { |
|
7237 |
|
7238 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7239 s4o.print("("); |
|
7240 return_type_symbol->accept(*this); |
|
7241 s4o.print(")"); |
|
7242 IN_param_value->accept(*this); |
|
7243 return NULL; |
|
7244 |
|
7245 } |
|
7246 |
|
7247 ERROR; |
|
7248 } |
|
7249 |
|
7250 }/*function_bool_to_usint*/ |
|
7251 break; |
|
7252 |
|
7253 /**** |
|
7254 *BOOL_TO_UINT |
|
7255 */ |
|
7256 case function_bool_to_uint : |
|
7257 { |
|
7258 symbol_c *last_type_symbol = NULL; |
|
7259 |
|
7260 { |
|
7261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7262 symbol_c *IN_param_value = &this->default_variable_name; |
|
7263 |
|
7264 symbol_c *IN_type_symbol = param_data_type; |
|
7265 last_type_symbol = param_data_type; |
|
7266 |
|
7267 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7268 { |
|
7269 |
|
7270 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7271 s4o.print("("); |
|
7272 return_type_symbol->accept(*this); |
|
7273 s4o.print(")"); |
|
7274 IN_param_value->accept(*this); |
|
7275 return NULL; |
|
7276 |
|
7277 } |
|
7278 |
|
7279 ERROR; |
|
7280 } |
|
7281 |
|
7282 }/*function_bool_to_uint*/ |
|
7283 break; |
|
7284 |
|
7285 /**** |
|
7286 *BOOL_TO_UDINT |
|
7287 */ |
|
7288 case function_bool_to_udint : |
|
7289 { |
|
7290 symbol_c *last_type_symbol = NULL; |
|
7291 |
|
7292 { |
|
7293 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7294 symbol_c *IN_param_value = &this->default_variable_name; |
|
7295 |
|
7296 symbol_c *IN_type_symbol = param_data_type; |
|
7297 last_type_symbol = param_data_type; |
|
7298 |
|
7299 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7300 { |
|
7301 |
|
7302 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7303 s4o.print("("); |
|
7304 return_type_symbol->accept(*this); |
|
7305 s4o.print(")"); |
|
7306 IN_param_value->accept(*this); |
|
7307 return NULL; |
|
7308 |
|
7309 } |
|
7310 |
|
7311 ERROR; |
|
7312 } |
|
7313 |
|
7314 }/*function_bool_to_udint*/ |
|
7315 break; |
|
7316 |
|
7317 /**** |
|
7318 *BOOL_TO_ULINT |
|
7319 */ |
|
7320 case function_bool_to_ulint : |
|
7321 { |
|
7322 symbol_c *last_type_symbol = NULL; |
|
7323 |
|
7324 { |
|
7325 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7326 symbol_c *IN_param_value = &this->default_variable_name; |
|
7327 |
|
7328 symbol_c *IN_type_symbol = param_data_type; |
|
7329 last_type_symbol = param_data_type; |
|
7330 |
|
7331 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7332 { |
|
7333 |
|
7334 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7335 s4o.print("("); |
|
7336 return_type_symbol->accept(*this); |
|
7337 s4o.print(")"); |
|
7338 IN_param_value->accept(*this); |
|
7339 return NULL; |
|
7340 |
|
7341 } |
|
7342 |
|
7343 ERROR; |
|
7344 } |
|
7345 |
|
7346 }/*function_bool_to_ulint*/ |
|
7347 break; |
|
7348 |
|
7349 /**** |
|
7350 *BOOL_TO_TIME |
|
7351 */ |
|
7352 case function_bool_to_time : |
|
7353 { |
|
7354 symbol_c *last_type_symbol = NULL; |
|
7355 |
|
7356 { |
|
7357 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7358 symbol_c *IN_param_value = &this->default_variable_name; |
|
7359 |
|
7360 symbol_c *IN_type_symbol = param_data_type; |
|
7361 last_type_symbol = param_data_type; |
|
7362 |
|
7363 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7364 { |
|
7365 |
|
7366 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7367 s4o.print("("); |
|
7368 return_type_symbol->accept(*this); |
|
7369 s4o.print(")real_to_time("); |
|
7370 IN_param_value->accept(*this); |
|
7371 s4o.print(")"); |
|
7372 return NULL; |
|
7373 |
|
7374 } |
|
7375 |
|
7376 ERROR; |
|
7377 } |
|
7378 |
|
7379 }/*function_bool_to_time*/ |
|
7380 break; |
|
7381 |
|
7382 /**** |
|
7383 *BOOL_TO_BYTE |
|
7384 */ |
|
7385 case function_bool_to_byte : |
|
7386 { |
|
7387 symbol_c *last_type_symbol = NULL; |
|
7388 |
|
7389 { |
|
7390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7391 symbol_c *IN_param_value = &this->default_variable_name; |
|
7392 |
|
7393 symbol_c *IN_type_symbol = param_data_type; |
|
7394 last_type_symbol = param_data_type; |
|
7395 |
|
7396 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7397 { |
|
7398 |
|
7399 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7400 s4o.print("("); |
|
7401 return_type_symbol->accept(*this); |
|
7402 s4o.print(")"); |
|
7403 IN_param_value->accept(*this); |
|
7404 return NULL; |
|
7405 |
|
7406 } |
|
7407 |
|
7408 ERROR; |
|
7409 } |
|
7410 |
|
7411 }/*function_bool_to_byte*/ |
|
7412 break; |
|
7413 |
|
7414 /**** |
|
7415 *BOOL_TO_WORD |
|
7416 */ |
|
7417 case function_bool_to_word : |
|
7418 { |
|
7419 symbol_c *last_type_symbol = NULL; |
|
7420 |
|
7421 { |
|
7422 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7423 symbol_c *IN_param_value = &this->default_variable_name; |
|
7424 |
|
7425 symbol_c *IN_type_symbol = param_data_type; |
|
7426 last_type_symbol = param_data_type; |
|
7427 |
|
7428 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7429 { |
|
7430 |
|
7431 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7432 s4o.print("("); |
|
7433 return_type_symbol->accept(*this); |
|
7434 s4o.print(")"); |
|
7435 IN_param_value->accept(*this); |
|
7436 return NULL; |
|
7437 |
|
7438 } |
|
7439 |
|
7440 ERROR; |
|
7441 } |
|
7442 |
|
7443 }/*function_bool_to_word*/ |
|
7444 break; |
|
7445 |
|
7446 /**** |
|
7447 *BOOL_TO_DWORD |
|
7448 */ |
|
7449 case function_bool_to_dword : |
|
7450 { |
|
7451 symbol_c *last_type_symbol = NULL; |
|
7452 |
|
7453 { |
|
7454 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7455 symbol_c *IN_param_value = &this->default_variable_name; |
|
7456 |
|
7457 symbol_c *IN_type_symbol = param_data_type; |
|
7458 last_type_symbol = param_data_type; |
|
7459 |
|
7460 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7461 { |
|
7462 |
|
7463 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7464 s4o.print("("); |
|
7465 return_type_symbol->accept(*this); |
|
7466 s4o.print(")"); |
|
7467 IN_param_value->accept(*this); |
|
7468 return NULL; |
|
7469 |
|
7470 } |
|
7471 |
|
7472 ERROR; |
|
7473 } |
|
7474 |
|
7475 }/*function_bool_to_dword*/ |
|
7476 break; |
|
7477 |
|
7478 /**** |
|
7479 *BOOL_TO_LWORD |
|
7480 */ |
|
7481 case function_bool_to_lword : |
|
7482 { |
|
7483 symbol_c *last_type_symbol = NULL; |
|
7484 |
|
7485 { |
|
7486 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7487 symbol_c *IN_param_value = &this->default_variable_name; |
|
7488 |
|
7489 symbol_c *IN_type_symbol = param_data_type; |
|
7490 last_type_symbol = param_data_type; |
|
7491 |
|
7492 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7493 { |
|
7494 |
|
7495 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
7496 s4o.print("("); |
|
7497 return_type_symbol->accept(*this); |
|
7498 s4o.print(")"); |
|
7499 IN_param_value->accept(*this); |
|
7500 return NULL; |
|
7501 |
|
7502 } |
|
7503 |
|
7504 ERROR; |
|
7505 } |
|
7506 |
|
7507 }/*function_bool_to_lword*/ |
|
7508 break; |
|
7509 |
|
7510 /**** |
|
7511 *BOOL_TO_STRING |
|
7512 */ |
|
7513 case function_bool_to_string : |
|
7514 { |
|
7515 symbol_c *last_type_symbol = NULL; |
|
7516 |
|
7517 { |
|
7518 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7519 symbol_c *IN_param_value = &this->default_variable_name; |
|
7520 |
|
7521 symbol_c *IN_type_symbol = param_data_type; |
|
7522 last_type_symbol = param_data_type; |
|
7523 |
|
7524 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7525 { |
|
7526 |
|
7527 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7528 s4o.print("("); |
|
7529 return_type_symbol->accept(*this); |
|
7530 s4o.print(")int_to_string("); |
|
7531 IN_param_value->accept(*this); |
|
7532 s4o.print(", 16)"); |
|
7533 return NULL; |
|
7534 |
|
7535 } |
|
7536 |
|
7537 ERROR; |
|
7538 } |
|
7539 |
|
7540 }/*function_bool_to_string*/ |
|
7541 break; |
|
7542 |
|
7543 /**** |
|
7544 *BOOL_TO_WSTRING |
|
7545 */ |
|
7546 case function_bool_to_wstring : |
|
7547 { |
|
7548 symbol_c *last_type_symbol = NULL; |
|
7549 |
|
7550 { |
|
7551 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7552 symbol_c *IN_param_value = &this->default_variable_name; |
|
7553 |
|
7554 symbol_c *IN_type_symbol = param_data_type; |
|
7555 last_type_symbol = param_data_type; |
|
7556 |
|
7557 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7558 { |
|
7559 |
|
7560 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
7561 s4o.print("("); |
|
7562 return_type_symbol->accept(*this); |
|
7563 s4o.print(")int_to_string("); |
|
7564 IN_param_value->accept(*this); |
|
7565 s4o.print(", 16)"); |
|
7566 return NULL; |
|
7567 |
|
7568 } |
|
7569 |
|
7570 ERROR; |
|
7571 } |
|
7572 |
|
7573 }/*function_bool_to_wstring*/ |
|
7574 break; |
|
7575 |
|
7576 /**** |
|
7577 *BOOL_TO_DATE |
|
7578 */ |
|
7579 case function_bool_to_date : |
|
7580 { |
|
7581 symbol_c *last_type_symbol = NULL; |
|
7582 |
|
7583 { |
|
7584 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7585 symbol_c *IN_param_value = &this->default_variable_name; |
|
7586 |
|
7587 symbol_c *IN_type_symbol = param_data_type; |
|
7588 last_type_symbol = param_data_type; |
|
7589 |
|
7590 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7591 { |
|
7592 |
|
7593 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
7594 s4o.print("("); |
|
7595 return_type_symbol->accept(*this); |
|
7596 s4o.print(")real_to_time("); |
|
7597 IN_param_value->accept(*this); |
|
7598 s4o.print(")"); |
|
7599 return NULL; |
|
7600 |
|
7601 } |
|
7602 |
|
7603 ERROR; |
|
7604 } |
|
7605 |
|
7606 }/*function_bool_to_date*/ |
|
7607 break; |
|
7608 |
|
7609 /**** |
|
7610 *BOOL_TO_TOD |
|
7611 */ |
|
7612 case function_bool_to_tod : |
|
7613 { |
|
7614 symbol_c *last_type_symbol = NULL; |
|
7615 |
|
7616 { |
|
7617 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7618 symbol_c *IN_param_value = &this->default_variable_name; |
|
7619 |
|
7620 symbol_c *IN_type_symbol = param_data_type; |
|
7621 last_type_symbol = param_data_type; |
|
7622 |
|
7623 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7624 { |
|
7625 |
|
7626 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
7627 s4o.print("("); |
|
7628 return_type_symbol->accept(*this); |
|
7629 s4o.print(")real_to_time("); |
|
7630 IN_param_value->accept(*this); |
|
7631 s4o.print(")"); |
|
7632 return NULL; |
|
7633 |
|
7634 } |
|
7635 |
|
7636 ERROR; |
|
7637 } |
|
7638 |
|
7639 }/*function_bool_to_tod*/ |
|
7640 break; |
|
7641 |
|
7642 /**** |
|
7643 *BOOL_TO_DT |
|
7644 */ |
|
7645 case function_bool_to_dt : |
|
7646 { |
|
7647 symbol_c *last_type_symbol = NULL; |
|
7648 |
|
7649 { |
|
7650 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7651 symbol_c *IN_param_value = &this->default_variable_name; |
|
7652 |
|
7653 symbol_c *IN_type_symbol = param_data_type; |
|
7654 last_type_symbol = param_data_type; |
|
7655 |
|
7656 if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) |
|
7657 { |
|
7658 |
|
7659 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
7660 s4o.print("("); |
|
7661 return_type_symbol->accept(*this); |
|
7662 s4o.print(")real_to_time("); |
|
7663 IN_param_value->accept(*this); |
|
7664 s4o.print(")"); |
|
7665 return NULL; |
|
7666 |
|
7667 } |
|
7668 |
|
7669 ERROR; |
|
7670 } |
|
7671 |
|
7672 }/*function_bool_to_dt*/ |
|
7673 break; |
|
7674 |
|
7675 /**** |
|
7676 *BYTE_TO_REAL |
|
7677 */ |
|
7678 case function_byte_to_real : |
|
7679 { |
|
7680 symbol_c *last_type_symbol = NULL; |
|
7681 |
|
7682 { |
|
7683 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7684 symbol_c *IN_param_value = &this->default_variable_name; |
|
7685 |
|
7686 symbol_c *IN_type_symbol = param_data_type; |
|
7687 last_type_symbol = param_data_type; |
|
7688 |
|
7689 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7690 { |
|
7691 |
|
7692 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7693 s4o.print("("); |
|
7694 return_type_symbol->accept(*this); |
|
7695 s4o.print(")"); |
|
7696 IN_param_value->accept(*this); |
|
7697 return NULL; |
|
7698 |
|
7699 } |
|
7700 |
|
7701 ERROR; |
|
7702 } |
|
7703 |
|
7704 }/*function_byte_to_real*/ |
|
7705 break; |
|
7706 |
|
7707 /**** |
|
7708 *BYTE_TO_LREAL |
|
7709 */ |
|
7710 case function_byte_to_lreal : |
|
7711 { |
|
7712 symbol_c *last_type_symbol = NULL; |
|
7713 |
|
7714 { |
|
7715 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7716 symbol_c *IN_param_value = &this->default_variable_name; |
|
7717 |
|
7718 symbol_c *IN_type_symbol = param_data_type; |
|
7719 last_type_symbol = param_data_type; |
|
7720 |
|
7721 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7722 { |
|
7723 |
|
7724 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7725 s4o.print("("); |
|
7726 return_type_symbol->accept(*this); |
|
7727 s4o.print(")"); |
|
7728 IN_param_value->accept(*this); |
|
7729 return NULL; |
|
7730 |
|
7731 } |
|
7732 |
|
7733 ERROR; |
|
7734 } |
|
7735 |
|
7736 }/*function_byte_to_lreal*/ |
|
7737 break; |
|
7738 |
|
7739 /**** |
|
7740 *BYTE_TO_SINT |
|
7741 */ |
|
7742 case function_byte_to_sint : |
|
7743 { |
|
7744 symbol_c *last_type_symbol = NULL; |
|
7745 |
|
7746 { |
|
7747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7748 symbol_c *IN_param_value = &this->default_variable_name; |
|
7749 |
|
7750 symbol_c *IN_type_symbol = param_data_type; |
|
7751 last_type_symbol = param_data_type; |
|
7752 |
|
7753 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7754 { |
|
7755 |
|
7756 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7757 s4o.print("("); |
|
7758 return_type_symbol->accept(*this); |
|
7759 s4o.print(")"); |
|
7760 IN_param_value->accept(*this); |
|
7761 return NULL; |
|
7762 |
|
7763 } |
|
7764 |
|
7765 ERROR; |
|
7766 } |
|
7767 |
|
7768 }/*function_byte_to_sint*/ |
|
7769 break; |
|
7770 |
|
7771 /**** |
|
7772 *BYTE_TO_INT |
|
7773 */ |
|
7774 case function_byte_to_int : |
|
7775 { |
|
7776 symbol_c *last_type_symbol = NULL; |
|
7777 |
|
7778 { |
|
7779 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7780 symbol_c *IN_param_value = &this->default_variable_name; |
|
7781 |
|
7782 symbol_c *IN_type_symbol = param_data_type; |
|
7783 last_type_symbol = param_data_type; |
|
7784 |
|
7785 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7786 { |
|
7787 |
|
7788 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7789 s4o.print("("); |
|
7790 return_type_symbol->accept(*this); |
|
7791 s4o.print(")"); |
|
7792 IN_param_value->accept(*this); |
|
7793 return NULL; |
|
7794 |
|
7795 } |
|
7796 |
|
7797 ERROR; |
|
7798 } |
|
7799 |
|
7800 }/*function_byte_to_int*/ |
|
7801 break; |
|
7802 |
|
7803 /**** |
|
7804 *BYTE_TO_DINT |
|
7805 */ |
|
7806 case function_byte_to_dint : |
|
7807 { |
|
7808 symbol_c *last_type_symbol = NULL; |
|
7809 |
|
7810 { |
|
7811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7812 symbol_c *IN_param_value = &this->default_variable_name; |
|
7813 |
|
7814 symbol_c *IN_type_symbol = param_data_type; |
|
7815 last_type_symbol = param_data_type; |
|
7816 |
|
7817 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7818 { |
|
7819 |
|
7820 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7821 s4o.print("("); |
|
7822 return_type_symbol->accept(*this); |
|
7823 s4o.print(")"); |
|
7824 IN_param_value->accept(*this); |
|
7825 return NULL; |
|
7826 |
|
7827 } |
|
7828 |
|
7829 ERROR; |
|
7830 } |
|
7831 |
|
7832 }/*function_byte_to_dint*/ |
|
7833 break; |
|
7834 |
|
7835 /**** |
|
7836 *BYTE_TO_LINT |
|
7837 */ |
|
7838 case function_byte_to_lint : |
|
7839 { |
|
7840 symbol_c *last_type_symbol = NULL; |
|
7841 |
|
7842 { |
|
7843 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7844 symbol_c *IN_param_value = &this->default_variable_name; |
|
7845 |
|
7846 symbol_c *IN_type_symbol = param_data_type; |
|
7847 last_type_symbol = param_data_type; |
|
7848 |
|
7849 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7850 { |
|
7851 |
|
7852 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7853 s4o.print("("); |
|
7854 return_type_symbol->accept(*this); |
|
7855 s4o.print(")"); |
|
7856 IN_param_value->accept(*this); |
|
7857 return NULL; |
|
7858 |
|
7859 } |
|
7860 |
|
7861 ERROR; |
|
7862 } |
|
7863 |
|
7864 }/*function_byte_to_lint*/ |
|
7865 break; |
|
7866 |
|
7867 /**** |
|
7868 *BYTE_TO_USINT |
|
7869 */ |
|
7870 case function_byte_to_usint : |
|
7871 { |
|
7872 symbol_c *last_type_symbol = NULL; |
|
7873 |
|
7874 { |
|
7875 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7876 symbol_c *IN_param_value = &this->default_variable_name; |
|
7877 |
|
7878 symbol_c *IN_type_symbol = param_data_type; |
|
7879 last_type_symbol = param_data_type; |
|
7880 |
|
7881 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7882 { |
|
7883 |
|
7884 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7885 s4o.print("("); |
|
7886 return_type_symbol->accept(*this); |
|
7887 s4o.print(")"); |
|
7888 IN_param_value->accept(*this); |
|
7889 return NULL; |
|
7890 |
|
7891 } |
|
7892 |
|
7893 ERROR; |
|
7894 } |
|
7895 |
|
7896 }/*function_byte_to_usint*/ |
|
7897 break; |
|
7898 |
|
7899 /**** |
|
7900 *BYTE_TO_UINT |
|
7901 */ |
|
7902 case function_byte_to_uint : |
|
7903 { |
|
7904 symbol_c *last_type_symbol = NULL; |
|
7905 |
|
7906 { |
|
7907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7908 symbol_c *IN_param_value = &this->default_variable_name; |
|
7909 |
|
7910 symbol_c *IN_type_symbol = param_data_type; |
|
7911 last_type_symbol = param_data_type; |
|
7912 |
|
7913 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7914 { |
|
7915 |
|
7916 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7917 s4o.print("("); |
|
7918 return_type_symbol->accept(*this); |
|
7919 s4o.print(")"); |
|
7920 IN_param_value->accept(*this); |
|
7921 return NULL; |
|
7922 |
|
7923 } |
|
7924 |
|
7925 ERROR; |
|
7926 } |
|
7927 |
|
7928 }/*function_byte_to_uint*/ |
|
7929 break; |
|
7930 |
|
7931 /**** |
|
7932 *BYTE_TO_UDINT |
|
7933 */ |
|
7934 case function_byte_to_udint : |
|
7935 { |
|
7936 symbol_c *last_type_symbol = NULL; |
|
7937 |
|
7938 { |
|
7939 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7940 symbol_c *IN_param_value = &this->default_variable_name; |
|
7941 |
|
7942 symbol_c *IN_type_symbol = param_data_type; |
|
7943 last_type_symbol = param_data_type; |
|
7944 |
|
7945 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7946 { |
|
7947 |
|
7948 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7949 s4o.print("("); |
|
7950 return_type_symbol->accept(*this); |
|
7951 s4o.print(")"); |
|
7952 IN_param_value->accept(*this); |
|
7953 return NULL; |
|
7954 |
|
7955 } |
|
7956 |
|
7957 ERROR; |
|
7958 } |
|
7959 |
|
7960 }/*function_byte_to_udint*/ |
|
7961 break; |
|
7962 |
|
7963 /**** |
|
7964 *BYTE_TO_ULINT |
|
7965 */ |
|
7966 case function_byte_to_ulint : |
|
7967 { |
|
7968 symbol_c *last_type_symbol = NULL; |
|
7969 |
|
7970 { |
|
7971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7972 symbol_c *IN_param_value = &this->default_variable_name; |
|
7973 |
|
7974 symbol_c *IN_type_symbol = param_data_type; |
|
7975 last_type_symbol = param_data_type; |
|
7976 |
|
7977 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
7978 { |
|
7979 |
|
7980 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7981 s4o.print("("); |
|
7982 return_type_symbol->accept(*this); |
|
7983 s4o.print(")"); |
|
7984 IN_param_value->accept(*this); |
|
7985 return NULL; |
|
7986 |
|
7987 } |
|
7988 |
|
7989 ERROR; |
|
7990 } |
|
7991 |
|
7992 }/*function_byte_to_ulint*/ |
|
7993 break; |
|
7994 |
|
7995 /**** |
|
7996 *BYTE_TO_TIME |
|
7997 */ |
|
7998 case function_byte_to_time : |
|
7999 { |
|
8000 symbol_c *last_type_symbol = NULL; |
|
8001 |
|
8002 { |
|
8003 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8004 symbol_c *IN_param_value = &this->default_variable_name; |
|
8005 |
|
8006 symbol_c *IN_type_symbol = param_data_type; |
|
8007 last_type_symbol = param_data_type; |
|
8008 |
|
8009 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8010 { |
|
8011 |
|
8012 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
8013 s4o.print("("); |
|
8014 return_type_symbol->accept(*this); |
|
8015 s4o.print(")real_to_time("); |
|
8016 IN_param_value->accept(*this); |
|
8017 s4o.print(")"); |
|
8018 return NULL; |
|
8019 |
|
8020 } |
|
8021 |
|
8022 ERROR; |
|
8023 } |
|
8024 |
|
8025 }/*function_byte_to_time*/ |
|
8026 break; |
|
8027 |
|
8028 /**** |
|
8029 *BYTE_TO_BOOL |
|
8030 */ |
|
8031 case function_byte_to_bool : |
|
8032 { |
|
8033 symbol_c *last_type_symbol = NULL; |
|
8034 |
|
8035 { |
|
8036 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8037 symbol_c *IN_param_value = &this->default_variable_name; |
|
8038 |
|
8039 symbol_c *IN_type_symbol = param_data_type; |
|
8040 last_type_symbol = param_data_type; |
|
8041 |
|
8042 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8043 { |
|
8044 |
|
8045 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8046 s4o.print("("); |
|
8047 return_type_symbol->accept(*this); |
|
8048 s4o.print(")"); |
|
8049 IN_param_value->accept(*this); |
|
8050 return NULL; |
|
8051 |
|
8052 } |
|
8053 |
|
8054 ERROR; |
|
8055 } |
|
8056 |
|
8057 }/*function_byte_to_bool*/ |
|
8058 break; |
|
8059 |
|
8060 /**** |
|
8061 *BYTE_TO_WORD |
|
8062 */ |
|
8063 case function_byte_to_word : |
|
8064 { |
|
8065 symbol_c *last_type_symbol = NULL; |
|
8066 |
|
8067 { |
|
8068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8069 symbol_c *IN_param_value = &this->default_variable_name; |
|
8070 |
|
8071 symbol_c *IN_type_symbol = param_data_type; |
|
8072 last_type_symbol = param_data_type; |
|
8073 |
|
8074 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8075 { |
|
8076 |
|
8077 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8078 s4o.print("("); |
|
8079 return_type_symbol->accept(*this); |
|
8080 s4o.print(")"); |
|
8081 IN_param_value->accept(*this); |
|
8082 return NULL; |
|
8083 |
|
8084 } |
|
8085 |
|
8086 ERROR; |
|
8087 } |
|
8088 |
|
8089 }/*function_byte_to_word*/ |
|
8090 break; |
|
8091 |
|
8092 /**** |
|
8093 *BYTE_TO_DWORD |
|
8094 */ |
|
8095 case function_byte_to_dword : |
|
8096 { |
|
8097 symbol_c *last_type_symbol = NULL; |
|
8098 |
|
8099 { |
|
8100 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8101 symbol_c *IN_param_value = &this->default_variable_name; |
|
8102 |
|
8103 symbol_c *IN_type_symbol = param_data_type; |
|
8104 last_type_symbol = param_data_type; |
|
8105 |
|
8106 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8107 { |
|
8108 |
|
8109 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8110 s4o.print("("); |
|
8111 return_type_symbol->accept(*this); |
|
8112 s4o.print(")"); |
|
8113 IN_param_value->accept(*this); |
|
8114 return NULL; |
|
8115 |
|
8116 } |
|
8117 |
|
8118 ERROR; |
|
8119 } |
|
8120 |
|
8121 }/*function_byte_to_dword*/ |
|
8122 break; |
|
8123 |
|
8124 /**** |
|
8125 *BYTE_TO_LWORD |
|
8126 */ |
|
8127 case function_byte_to_lword : |
|
8128 { |
|
8129 symbol_c *last_type_symbol = NULL; |
|
8130 |
|
8131 { |
|
8132 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8133 symbol_c *IN_param_value = &this->default_variable_name; |
|
8134 |
|
8135 symbol_c *IN_type_symbol = param_data_type; |
|
8136 last_type_symbol = param_data_type; |
|
8137 |
|
8138 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8139 { |
|
8140 |
|
8141 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8142 s4o.print("("); |
|
8143 return_type_symbol->accept(*this); |
|
8144 s4o.print(")"); |
|
8145 IN_param_value->accept(*this); |
|
8146 return NULL; |
|
8147 |
|
8148 } |
|
8149 |
|
8150 ERROR; |
|
8151 } |
|
8152 |
|
8153 }/*function_byte_to_lword*/ |
|
8154 break; |
|
8155 |
|
8156 /**** |
|
8157 *BYTE_TO_STRING |
|
8158 */ |
|
8159 case function_byte_to_string : |
|
8160 { |
|
8161 symbol_c *last_type_symbol = NULL; |
|
8162 |
|
8163 { |
|
8164 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8165 symbol_c *IN_param_value = &this->default_variable_name; |
|
8166 |
|
8167 symbol_c *IN_type_symbol = param_data_type; |
|
8168 last_type_symbol = param_data_type; |
|
8169 |
|
8170 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8171 { |
|
8172 |
|
8173 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8174 s4o.print("("); |
|
8175 return_type_symbol->accept(*this); |
|
8176 s4o.print(")int_to_string("); |
|
8177 IN_param_value->accept(*this); |
|
8178 s4o.print(", 16)"); |
|
8179 return NULL; |
|
8180 |
|
8181 } |
|
8182 |
|
8183 ERROR; |
|
8184 } |
|
8185 |
|
8186 }/*function_byte_to_string*/ |
|
8187 break; |
|
8188 |
|
8189 /**** |
|
8190 *BYTE_TO_WSTRING |
|
8191 */ |
|
8192 case function_byte_to_wstring : |
|
8193 { |
|
8194 symbol_c *last_type_symbol = NULL; |
|
8195 |
|
8196 { |
|
8197 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8198 symbol_c *IN_param_value = &this->default_variable_name; |
|
8199 |
|
8200 symbol_c *IN_type_symbol = param_data_type; |
|
8201 last_type_symbol = param_data_type; |
|
8202 |
|
8203 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8204 { |
|
8205 |
|
8206 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
8207 s4o.print("("); |
|
8208 return_type_symbol->accept(*this); |
|
8209 s4o.print(")int_to_string("); |
|
8210 IN_param_value->accept(*this); |
|
8211 s4o.print(", 16)"); |
|
8212 return NULL; |
|
8213 |
|
8214 } |
|
8215 |
|
8216 ERROR; |
|
8217 } |
|
8218 |
|
8219 }/*function_byte_to_wstring*/ |
|
8220 break; |
|
8221 |
|
8222 /**** |
|
8223 *BYTE_TO_DATE |
|
8224 */ |
|
8225 case function_byte_to_date : |
|
8226 { |
|
8227 symbol_c *last_type_symbol = NULL; |
|
8228 |
|
8229 { |
|
8230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8231 symbol_c *IN_param_value = &this->default_variable_name; |
|
8232 |
|
8233 symbol_c *IN_type_symbol = param_data_type; |
|
8234 last_type_symbol = param_data_type; |
|
8235 |
|
8236 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8237 { |
|
8238 |
|
8239 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8240 s4o.print("("); |
|
8241 return_type_symbol->accept(*this); |
|
8242 s4o.print(")real_to_time("); |
|
8243 IN_param_value->accept(*this); |
|
8244 s4o.print(")"); |
|
8245 return NULL; |
|
8246 |
|
8247 } |
|
8248 |
|
8249 ERROR; |
|
8250 } |
|
8251 |
|
8252 }/*function_byte_to_date*/ |
|
8253 break; |
|
8254 |
|
8255 /**** |
|
8256 *BYTE_TO_TOD |
|
8257 */ |
|
8258 case function_byte_to_tod : |
|
8259 { |
|
8260 symbol_c *last_type_symbol = NULL; |
|
8261 |
|
8262 { |
|
8263 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8264 symbol_c *IN_param_value = &this->default_variable_name; |
|
8265 |
|
8266 symbol_c *IN_type_symbol = param_data_type; |
|
8267 last_type_symbol = param_data_type; |
|
8268 |
|
8269 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8270 { |
|
8271 |
|
8272 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8273 s4o.print("("); |
|
8274 return_type_symbol->accept(*this); |
|
8275 s4o.print(")real_to_time("); |
|
8276 IN_param_value->accept(*this); |
|
8277 s4o.print(")"); |
|
8278 return NULL; |
|
8279 |
|
8280 } |
|
8281 |
|
8282 ERROR; |
|
8283 } |
|
8284 |
|
8285 }/*function_byte_to_tod*/ |
|
8286 break; |
|
8287 |
|
8288 /**** |
|
8289 *BYTE_TO_DT |
|
8290 */ |
|
8291 case function_byte_to_dt : |
|
8292 { |
|
8293 symbol_c *last_type_symbol = NULL; |
|
8294 |
|
8295 { |
|
8296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8297 symbol_c *IN_param_value = &this->default_variable_name; |
|
8298 |
|
8299 symbol_c *IN_type_symbol = param_data_type; |
|
8300 last_type_symbol = param_data_type; |
|
8301 |
|
8302 if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) |
|
8303 { |
|
8304 |
|
8305 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8306 s4o.print("("); |
|
8307 return_type_symbol->accept(*this); |
|
8308 s4o.print(")real_to_time("); |
|
8309 IN_param_value->accept(*this); |
|
8310 s4o.print(")"); |
|
8311 return NULL; |
|
8312 |
|
8313 } |
|
8314 |
|
8315 ERROR; |
|
8316 } |
|
8317 |
|
8318 }/*function_byte_to_dt*/ |
|
8319 break; |
|
8320 |
|
8321 /**** |
|
8322 *WORD_TO_REAL |
|
8323 */ |
|
8324 case function_word_to_real : |
|
8325 { |
|
8326 symbol_c *last_type_symbol = NULL; |
|
8327 |
|
8328 { |
|
8329 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8330 symbol_c *IN_param_value = &this->default_variable_name; |
|
8331 |
|
8332 symbol_c *IN_type_symbol = param_data_type; |
|
8333 last_type_symbol = param_data_type; |
|
8334 |
|
8335 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8336 { |
|
8337 |
|
8338 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8339 s4o.print("("); |
|
8340 return_type_symbol->accept(*this); |
|
8341 s4o.print(")"); |
|
8342 IN_param_value->accept(*this); |
|
8343 return NULL; |
|
8344 |
|
8345 } |
|
8346 |
|
8347 ERROR; |
|
8348 } |
|
8349 |
|
8350 }/*function_word_to_real*/ |
|
8351 break; |
|
8352 |
|
8353 /**** |
|
8354 *WORD_TO_LREAL |
|
8355 */ |
|
8356 case function_word_to_lreal : |
|
8357 { |
|
8358 symbol_c *last_type_symbol = NULL; |
|
8359 |
|
8360 { |
|
8361 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8362 symbol_c *IN_param_value = &this->default_variable_name; |
|
8363 |
|
8364 symbol_c *IN_type_symbol = param_data_type; |
|
8365 last_type_symbol = param_data_type; |
|
8366 |
|
8367 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8368 { |
|
8369 |
|
8370 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8371 s4o.print("("); |
|
8372 return_type_symbol->accept(*this); |
|
8373 s4o.print(")"); |
|
8374 IN_param_value->accept(*this); |
|
8375 return NULL; |
|
8376 |
|
8377 } |
|
8378 |
|
8379 ERROR; |
|
8380 } |
|
8381 |
|
8382 }/*function_word_to_lreal*/ |
|
8383 break; |
|
8384 |
|
8385 /**** |
|
8386 *WORD_TO_SINT |
|
8387 */ |
|
8388 case function_word_to_sint : |
|
8389 { |
|
8390 symbol_c *last_type_symbol = NULL; |
|
8391 |
|
8392 { |
|
8393 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8394 symbol_c *IN_param_value = &this->default_variable_name; |
|
8395 |
|
8396 symbol_c *IN_type_symbol = param_data_type; |
|
8397 last_type_symbol = param_data_type; |
|
8398 |
|
8399 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8400 { |
|
8401 |
|
8402 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8403 s4o.print("("); |
|
8404 return_type_symbol->accept(*this); |
|
8405 s4o.print(")"); |
|
8406 IN_param_value->accept(*this); |
|
8407 return NULL; |
|
8408 |
|
8409 } |
|
8410 |
|
8411 ERROR; |
|
8412 } |
|
8413 |
|
8414 }/*function_word_to_sint*/ |
|
8415 break; |
|
8416 |
|
8417 /**** |
|
8418 *WORD_TO_INT |
|
8419 */ |
|
8420 case function_word_to_int : |
|
8421 { |
|
8422 symbol_c *last_type_symbol = NULL; |
|
8423 |
|
8424 { |
|
8425 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8426 symbol_c *IN_param_value = &this->default_variable_name; |
|
8427 |
|
8428 symbol_c *IN_type_symbol = param_data_type; |
|
8429 last_type_symbol = param_data_type; |
|
8430 |
|
8431 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8432 { |
|
8433 |
|
8434 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8435 s4o.print("("); |
|
8436 return_type_symbol->accept(*this); |
|
8437 s4o.print(")"); |
|
8438 IN_param_value->accept(*this); |
|
8439 return NULL; |
|
8440 |
|
8441 } |
|
8442 |
|
8443 ERROR; |
|
8444 } |
|
8445 |
|
8446 }/*function_word_to_int*/ |
|
8447 break; |
|
8448 |
|
8449 /**** |
|
8450 *WORD_TO_DINT |
|
8451 */ |
|
8452 case function_word_to_dint : |
|
8453 { |
|
8454 symbol_c *last_type_symbol = NULL; |
|
8455 |
|
8456 { |
|
8457 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8458 symbol_c *IN_param_value = &this->default_variable_name; |
|
8459 |
|
8460 symbol_c *IN_type_symbol = param_data_type; |
|
8461 last_type_symbol = param_data_type; |
|
8462 |
|
8463 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8464 { |
|
8465 |
|
8466 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8467 s4o.print("("); |
|
8468 return_type_symbol->accept(*this); |
|
8469 s4o.print(")"); |
|
8470 IN_param_value->accept(*this); |
|
8471 return NULL; |
|
8472 |
|
8473 } |
|
8474 |
|
8475 ERROR; |
|
8476 } |
|
8477 |
|
8478 }/*function_word_to_dint*/ |
|
8479 break; |
|
8480 |
|
8481 /**** |
|
8482 *WORD_TO_LINT |
|
8483 */ |
|
8484 case function_word_to_lint : |
|
8485 { |
|
8486 symbol_c *last_type_symbol = NULL; |
|
8487 |
|
8488 { |
|
8489 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8490 symbol_c *IN_param_value = &this->default_variable_name; |
|
8491 |
|
8492 symbol_c *IN_type_symbol = param_data_type; |
|
8493 last_type_symbol = param_data_type; |
|
8494 |
|
8495 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8496 { |
|
8497 |
|
8498 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8499 s4o.print("("); |
|
8500 return_type_symbol->accept(*this); |
|
8501 s4o.print(")"); |
|
8502 IN_param_value->accept(*this); |
|
8503 return NULL; |
|
8504 |
|
8505 } |
|
8506 |
|
8507 ERROR; |
|
8508 } |
|
8509 |
|
8510 }/*function_word_to_lint*/ |
|
8511 break; |
|
8512 |
|
8513 /**** |
|
8514 *WORD_TO_USINT |
|
8515 */ |
|
8516 case function_word_to_usint : |
|
8517 { |
|
8518 symbol_c *last_type_symbol = NULL; |
|
8519 |
|
8520 { |
|
8521 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8522 symbol_c *IN_param_value = &this->default_variable_name; |
|
8523 |
|
8524 symbol_c *IN_type_symbol = param_data_type; |
|
8525 last_type_symbol = param_data_type; |
|
8526 |
|
8527 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8528 { |
|
8529 |
|
8530 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8531 s4o.print("("); |
|
8532 return_type_symbol->accept(*this); |
|
8533 s4o.print(")"); |
|
8534 IN_param_value->accept(*this); |
|
8535 return NULL; |
|
8536 |
|
8537 } |
|
8538 |
|
8539 ERROR; |
|
8540 } |
|
8541 |
|
8542 }/*function_word_to_usint*/ |
|
8543 break; |
|
8544 |
|
8545 /**** |
|
8546 *WORD_TO_UINT |
|
8547 */ |
|
8548 case function_word_to_uint : |
|
8549 { |
|
8550 symbol_c *last_type_symbol = NULL; |
|
8551 |
|
8552 { |
|
8553 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8554 symbol_c *IN_param_value = &this->default_variable_name; |
|
8555 |
|
8556 symbol_c *IN_type_symbol = param_data_type; |
|
8557 last_type_symbol = param_data_type; |
|
8558 |
|
8559 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8560 { |
|
8561 |
|
8562 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
8563 s4o.print("("); |
|
8564 return_type_symbol->accept(*this); |
|
8565 s4o.print(")"); |
|
8566 IN_param_value->accept(*this); |
|
8567 return NULL; |
|
8568 |
|
8569 } |
|
8570 |
|
8571 ERROR; |
|
8572 } |
|
8573 |
|
8574 }/*function_word_to_uint*/ |
|
8575 break; |
|
8576 |
|
8577 /**** |
|
8578 *WORD_TO_UDINT |
|
8579 */ |
|
8580 case function_word_to_udint : |
|
8581 { |
|
8582 symbol_c *last_type_symbol = NULL; |
|
8583 |
|
8584 { |
|
8585 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8586 symbol_c *IN_param_value = &this->default_variable_name; |
|
8587 |
|
8588 symbol_c *IN_type_symbol = param_data_type; |
|
8589 last_type_symbol = param_data_type; |
|
8590 |
|
8591 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8592 { |
|
8593 |
|
8594 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8595 s4o.print("("); |
|
8596 return_type_symbol->accept(*this); |
|
8597 s4o.print(")"); |
|
8598 IN_param_value->accept(*this); |
|
8599 return NULL; |
|
8600 |
|
8601 } |
|
8602 |
|
8603 ERROR; |
|
8604 } |
|
8605 |
|
8606 }/*function_word_to_udint*/ |
|
8607 break; |
|
8608 |
|
8609 /**** |
|
8610 *WORD_TO_ULINT |
|
8611 */ |
|
8612 case function_word_to_ulint : |
|
8613 { |
|
8614 symbol_c *last_type_symbol = NULL; |
|
8615 |
|
8616 { |
|
8617 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8618 symbol_c *IN_param_value = &this->default_variable_name; |
|
8619 |
|
8620 symbol_c *IN_type_symbol = param_data_type; |
|
8621 last_type_symbol = param_data_type; |
|
8622 |
|
8623 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8624 { |
|
8625 |
|
8626 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8627 s4o.print("("); |
|
8628 return_type_symbol->accept(*this); |
|
8629 s4o.print(")"); |
|
8630 IN_param_value->accept(*this); |
|
8631 return NULL; |
|
8632 |
|
8633 } |
|
8634 |
|
8635 ERROR; |
|
8636 } |
|
8637 |
|
8638 }/*function_word_to_ulint*/ |
|
8639 break; |
|
8640 |
|
8641 /**** |
|
8642 *WORD_TO_TIME |
|
8643 */ |
|
8644 case function_word_to_time : |
|
8645 { |
|
8646 symbol_c *last_type_symbol = NULL; |
|
8647 |
|
8648 { |
|
8649 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8650 symbol_c *IN_param_value = &this->default_variable_name; |
|
8651 |
|
8652 symbol_c *IN_type_symbol = param_data_type; |
|
8653 last_type_symbol = param_data_type; |
|
8654 |
|
8655 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8656 { |
|
8657 |
|
8658 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
8659 s4o.print("("); |
|
8660 return_type_symbol->accept(*this); |
|
8661 s4o.print(")real_to_time("); |
|
8662 IN_param_value->accept(*this); |
|
8663 s4o.print(")"); |
|
8664 return NULL; |
|
8665 |
|
8666 } |
|
8667 |
|
8668 ERROR; |
|
8669 } |
|
8670 |
|
8671 }/*function_word_to_time*/ |
|
8672 break; |
|
8673 |
|
8674 /**** |
|
8675 *WORD_TO_BOOL |
|
8676 */ |
|
8677 case function_word_to_bool : |
|
8678 { |
|
8679 symbol_c *last_type_symbol = NULL; |
|
8680 |
|
8681 { |
|
8682 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8683 symbol_c *IN_param_value = &this->default_variable_name; |
|
8684 |
|
8685 symbol_c *IN_type_symbol = param_data_type; |
|
8686 last_type_symbol = param_data_type; |
|
8687 |
|
8688 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8689 { |
|
8690 |
|
8691 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8692 s4o.print("("); |
|
8693 return_type_symbol->accept(*this); |
|
8694 s4o.print(")"); |
|
8695 IN_param_value->accept(*this); |
|
8696 return NULL; |
|
8697 |
|
8698 } |
|
8699 |
|
8700 ERROR; |
|
8701 } |
|
8702 |
|
8703 }/*function_word_to_bool*/ |
|
8704 break; |
|
8705 |
|
8706 /**** |
|
8707 *WORD_TO_BYTE |
|
8708 */ |
|
8709 case function_word_to_byte : |
|
8710 { |
|
8711 symbol_c *last_type_symbol = NULL; |
|
8712 |
|
8713 { |
|
8714 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8715 symbol_c *IN_param_value = &this->default_variable_name; |
|
8716 |
|
8717 symbol_c *IN_type_symbol = param_data_type; |
|
8718 last_type_symbol = param_data_type; |
|
8719 |
|
8720 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8721 { |
|
8722 |
|
8723 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
8724 s4o.print("("); |
|
8725 return_type_symbol->accept(*this); |
|
8726 s4o.print(")"); |
|
8727 IN_param_value->accept(*this); |
|
8728 return NULL; |
|
8729 |
|
8730 } |
|
8731 |
|
8732 ERROR; |
|
8733 } |
|
8734 |
|
8735 }/*function_word_to_byte*/ |
|
8736 break; |
|
8737 |
|
8738 /**** |
|
8739 *WORD_TO_DWORD |
|
8740 */ |
|
8741 case function_word_to_dword : |
|
8742 { |
|
8743 symbol_c *last_type_symbol = NULL; |
|
8744 |
|
8745 { |
|
8746 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8747 symbol_c *IN_param_value = &this->default_variable_name; |
|
8748 |
|
8749 symbol_c *IN_type_symbol = param_data_type; |
|
8750 last_type_symbol = param_data_type; |
|
8751 |
|
8752 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8753 { |
|
8754 |
|
8755 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8756 s4o.print("("); |
|
8757 return_type_symbol->accept(*this); |
|
8758 s4o.print(")"); |
|
8759 IN_param_value->accept(*this); |
|
8760 return NULL; |
|
8761 |
|
8762 } |
|
8763 |
|
8764 ERROR; |
|
8765 } |
|
8766 |
|
8767 }/*function_word_to_dword*/ |
|
8768 break; |
|
8769 |
|
8770 /**** |
|
8771 *WORD_TO_LWORD |
|
8772 */ |
|
8773 case function_word_to_lword : |
|
8774 { |
|
8775 symbol_c *last_type_symbol = NULL; |
|
8776 |
|
8777 { |
|
8778 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8779 symbol_c *IN_param_value = &this->default_variable_name; |
|
8780 |
|
8781 symbol_c *IN_type_symbol = param_data_type; |
|
8782 last_type_symbol = param_data_type; |
|
8783 |
|
8784 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8785 { |
|
8786 |
|
8787 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8788 s4o.print("("); |
|
8789 return_type_symbol->accept(*this); |
|
8790 s4o.print(")"); |
|
8791 IN_param_value->accept(*this); |
|
8792 return NULL; |
|
8793 |
|
8794 } |
|
8795 |
|
8796 ERROR; |
|
8797 } |
|
8798 |
|
8799 }/*function_word_to_lword*/ |
|
8800 break; |
|
8801 |
|
8802 /**** |
|
8803 *WORD_TO_STRING |
|
8804 */ |
|
8805 case function_word_to_string : |
|
8806 { |
|
8807 symbol_c *last_type_symbol = NULL; |
|
8808 |
|
8809 { |
|
8810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8811 symbol_c *IN_param_value = &this->default_variable_name; |
|
8812 |
|
8813 symbol_c *IN_type_symbol = param_data_type; |
|
8814 last_type_symbol = param_data_type; |
|
8815 |
|
8816 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8817 { |
|
8818 |
|
8819 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8820 s4o.print("("); |
|
8821 return_type_symbol->accept(*this); |
|
8822 s4o.print(")int_to_string("); |
|
8823 IN_param_value->accept(*this); |
|
8824 s4o.print(", 16)"); |
|
8825 return NULL; |
|
8826 |
|
8827 } |
|
8828 |
|
8829 ERROR; |
|
8830 } |
|
8831 |
|
8832 }/*function_word_to_string*/ |
|
8833 break; |
|
8834 |
|
8835 /**** |
|
8836 *WORD_TO_WSTRING |
|
8837 */ |
|
8838 case function_word_to_wstring : |
|
8839 { |
|
8840 symbol_c *last_type_symbol = NULL; |
|
8841 |
|
8842 { |
|
8843 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8844 symbol_c *IN_param_value = &this->default_variable_name; |
|
8845 |
|
8846 symbol_c *IN_type_symbol = param_data_type; |
|
8847 last_type_symbol = param_data_type; |
|
8848 |
|
8849 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8850 { |
|
8851 |
|
8852 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
8853 s4o.print("("); |
|
8854 return_type_symbol->accept(*this); |
|
8855 s4o.print(")int_to_string("); |
|
8856 IN_param_value->accept(*this); |
|
8857 s4o.print(", 16)"); |
|
8858 return NULL; |
|
8859 |
|
8860 } |
|
8861 |
|
8862 ERROR; |
|
8863 } |
|
8864 |
|
8865 }/*function_word_to_wstring*/ |
|
8866 break; |
|
8867 |
|
8868 /**** |
|
8869 *WORD_TO_DATE |
|
8870 */ |
|
8871 case function_word_to_date : |
|
8872 { |
|
8873 symbol_c *last_type_symbol = NULL; |
|
8874 |
|
8875 { |
|
8876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8877 symbol_c *IN_param_value = &this->default_variable_name; |
|
8878 |
|
8879 symbol_c *IN_type_symbol = param_data_type; |
|
8880 last_type_symbol = param_data_type; |
|
8881 |
|
8882 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8883 { |
|
8884 |
|
8885 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8886 s4o.print("("); |
|
8887 return_type_symbol->accept(*this); |
|
8888 s4o.print(")real_to_time("); |
|
8889 IN_param_value->accept(*this); |
|
8890 s4o.print(")"); |
|
8891 return NULL; |
|
8892 |
|
8893 } |
|
8894 |
|
8895 ERROR; |
|
8896 } |
|
8897 |
|
8898 }/*function_word_to_date*/ |
|
8899 break; |
|
8900 |
|
8901 /**** |
|
8902 *WORD_TO_TOD |
|
8903 */ |
|
8904 case function_word_to_tod : |
|
8905 { |
|
8906 symbol_c *last_type_symbol = NULL; |
|
8907 |
|
8908 { |
|
8909 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8910 symbol_c *IN_param_value = &this->default_variable_name; |
|
8911 |
|
8912 symbol_c *IN_type_symbol = param_data_type; |
|
8913 last_type_symbol = param_data_type; |
|
8914 |
|
8915 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8916 { |
|
8917 |
|
8918 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8919 s4o.print("("); |
|
8920 return_type_symbol->accept(*this); |
|
8921 s4o.print(")real_to_time("); |
|
8922 IN_param_value->accept(*this); |
|
8923 s4o.print(")"); |
|
8924 return NULL; |
|
8925 |
|
8926 } |
|
8927 |
|
8928 ERROR; |
|
8929 } |
|
8930 |
|
8931 }/*function_word_to_tod*/ |
|
8932 break; |
|
8933 |
|
8934 /**** |
|
8935 *WORD_TO_DT |
|
8936 */ |
|
8937 case function_word_to_dt : |
|
8938 { |
|
8939 symbol_c *last_type_symbol = NULL; |
|
8940 |
|
8941 { |
|
8942 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8943 symbol_c *IN_param_value = &this->default_variable_name; |
|
8944 |
|
8945 symbol_c *IN_type_symbol = param_data_type; |
|
8946 last_type_symbol = param_data_type; |
|
8947 |
|
8948 if (typeid(*last_type_symbol) == typeid(word_type_name_c)) |
|
8949 { |
|
8950 |
|
8951 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8952 s4o.print("("); |
|
8953 return_type_symbol->accept(*this); |
|
8954 s4o.print(")real_to_time("); |
|
8955 IN_param_value->accept(*this); |
|
8956 s4o.print(")"); |
|
8957 return NULL; |
|
8958 |
|
8959 } |
|
8960 |
|
8961 ERROR; |
|
8962 } |
|
8963 |
|
8964 }/*function_word_to_dt*/ |
|
8965 break; |
|
8966 |
|
8967 /**** |
|
8968 *DWORD_TO_REAL |
|
8969 */ |
|
8970 case function_dword_to_real : |
|
8971 { |
|
8972 symbol_c *last_type_symbol = NULL; |
|
8973 |
|
8974 { |
|
8975 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8976 symbol_c *IN_param_value = &this->default_variable_name; |
|
8977 |
|
8978 symbol_c *IN_type_symbol = param_data_type; |
|
8979 last_type_symbol = param_data_type; |
|
8980 |
|
8981 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
8982 { |
|
8983 |
|
8984 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8985 s4o.print("("); |
|
8986 return_type_symbol->accept(*this); |
|
8987 s4o.print(")"); |
|
8988 IN_param_value->accept(*this); |
|
8989 return NULL; |
|
8990 |
|
8991 } |
|
8992 |
|
8993 ERROR; |
|
8994 } |
|
8995 |
|
8996 }/*function_dword_to_real*/ |
|
8997 break; |
|
8998 |
|
8999 /**** |
|
9000 *DWORD_TO_LREAL |
|
9001 */ |
|
9002 case function_dword_to_lreal : |
|
9003 { |
|
9004 symbol_c *last_type_symbol = NULL; |
|
9005 |
|
9006 { |
|
9007 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9008 symbol_c *IN_param_value = &this->default_variable_name; |
|
9009 |
|
9010 symbol_c *IN_type_symbol = param_data_type; |
|
9011 last_type_symbol = param_data_type; |
|
9012 |
|
9013 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9014 { |
|
9015 |
|
9016 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9017 s4o.print("("); |
|
9018 return_type_symbol->accept(*this); |
|
9019 s4o.print(")"); |
|
9020 IN_param_value->accept(*this); |
|
9021 return NULL; |
|
9022 |
|
9023 } |
|
9024 |
|
9025 ERROR; |
|
9026 } |
|
9027 |
|
9028 }/*function_dword_to_lreal*/ |
|
9029 break; |
|
9030 |
|
9031 /**** |
|
9032 *DWORD_TO_SINT |
|
9033 */ |
|
9034 case function_dword_to_sint : |
|
9035 { |
|
9036 symbol_c *last_type_symbol = NULL; |
|
9037 |
|
9038 { |
|
9039 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9040 symbol_c *IN_param_value = &this->default_variable_name; |
|
9041 |
|
9042 symbol_c *IN_type_symbol = param_data_type; |
|
9043 last_type_symbol = param_data_type; |
|
9044 |
|
9045 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9046 { |
|
9047 |
|
9048 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9049 s4o.print("("); |
|
9050 return_type_symbol->accept(*this); |
|
9051 s4o.print(")"); |
|
9052 IN_param_value->accept(*this); |
|
9053 return NULL; |
|
9054 |
|
9055 } |
|
9056 |
|
9057 ERROR; |
|
9058 } |
|
9059 |
|
9060 }/*function_dword_to_sint*/ |
|
9061 break; |
|
9062 |
|
9063 /**** |
|
9064 *DWORD_TO_INT |
|
9065 */ |
|
9066 case function_dword_to_int : |
|
9067 { |
|
9068 symbol_c *last_type_symbol = NULL; |
|
9069 |
|
9070 { |
|
9071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9072 symbol_c *IN_param_value = &this->default_variable_name; |
|
9073 |
|
9074 symbol_c *IN_type_symbol = param_data_type; |
|
9075 last_type_symbol = param_data_type; |
|
9076 |
|
9077 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9078 { |
|
9079 |
|
9080 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9081 s4o.print("("); |
|
9082 return_type_symbol->accept(*this); |
|
9083 s4o.print(")"); |
|
9084 IN_param_value->accept(*this); |
|
9085 return NULL; |
|
9086 |
|
9087 } |
|
9088 |
|
9089 ERROR; |
|
9090 } |
|
9091 |
|
9092 }/*function_dword_to_int*/ |
|
9093 break; |
|
9094 |
|
9095 /**** |
|
9096 *DWORD_TO_DINT |
|
9097 */ |
|
9098 case function_dword_to_dint : |
|
9099 { |
|
9100 symbol_c *last_type_symbol = NULL; |
|
9101 |
|
9102 { |
|
9103 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9104 symbol_c *IN_param_value = &this->default_variable_name; |
|
9105 |
|
9106 symbol_c *IN_type_symbol = param_data_type; |
|
9107 last_type_symbol = param_data_type; |
|
9108 |
|
9109 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9110 { |
|
9111 |
|
9112 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9113 s4o.print("("); |
|
9114 return_type_symbol->accept(*this); |
|
9115 s4o.print(")"); |
|
9116 IN_param_value->accept(*this); |
|
9117 return NULL; |
|
9118 |
|
9119 } |
|
9120 |
|
9121 ERROR; |
|
9122 } |
|
9123 |
|
9124 }/*function_dword_to_dint*/ |
|
9125 break; |
|
9126 |
|
9127 /**** |
|
9128 *DWORD_TO_LINT |
|
9129 */ |
|
9130 case function_dword_to_lint : |
|
9131 { |
|
9132 symbol_c *last_type_symbol = NULL; |
|
9133 |
|
9134 { |
|
9135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9136 symbol_c *IN_param_value = &this->default_variable_name; |
|
9137 |
|
9138 symbol_c *IN_type_symbol = param_data_type; |
|
9139 last_type_symbol = param_data_type; |
|
9140 |
|
9141 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9142 { |
|
9143 |
|
9144 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9145 s4o.print("("); |
|
9146 return_type_symbol->accept(*this); |
|
9147 s4o.print(")"); |
|
9148 IN_param_value->accept(*this); |
|
9149 return NULL; |
|
9150 |
|
9151 } |
|
9152 |
|
9153 ERROR; |
|
9154 } |
|
9155 |
|
9156 }/*function_dword_to_lint*/ |
|
9157 break; |
|
9158 |
|
9159 /**** |
|
9160 *DWORD_TO_USINT |
|
9161 */ |
|
9162 case function_dword_to_usint : |
|
9163 { |
|
9164 symbol_c *last_type_symbol = NULL; |
|
9165 |
|
9166 { |
|
9167 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9168 symbol_c *IN_param_value = &this->default_variable_name; |
|
9169 |
|
9170 symbol_c *IN_type_symbol = param_data_type; |
|
9171 last_type_symbol = param_data_type; |
|
9172 |
|
9173 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9174 { |
|
9175 |
|
9176 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9177 s4o.print("("); |
|
9178 return_type_symbol->accept(*this); |
|
9179 s4o.print(")"); |
|
9180 IN_param_value->accept(*this); |
|
9181 return NULL; |
|
9182 |
|
9183 } |
|
9184 |
|
9185 ERROR; |
|
9186 } |
|
9187 |
|
9188 }/*function_dword_to_usint*/ |
|
9189 break; |
|
9190 |
|
9191 /**** |
|
9192 *DWORD_TO_UINT |
|
9193 */ |
|
9194 case function_dword_to_uint : |
|
9195 { |
|
9196 symbol_c *last_type_symbol = NULL; |
|
9197 |
|
9198 { |
|
9199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9200 symbol_c *IN_param_value = &this->default_variable_name; |
|
9201 |
|
9202 symbol_c *IN_type_symbol = param_data_type; |
|
9203 last_type_symbol = param_data_type; |
|
9204 |
|
9205 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9206 { |
|
9207 |
|
9208 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9209 s4o.print("("); |
|
9210 return_type_symbol->accept(*this); |
|
9211 s4o.print(")"); |
|
9212 IN_param_value->accept(*this); |
|
9213 return NULL; |
|
9214 |
|
9215 } |
|
9216 |
|
9217 ERROR; |
|
9218 } |
|
9219 |
|
9220 }/*function_dword_to_uint*/ |
|
9221 break; |
|
9222 |
|
9223 /**** |
|
9224 *DWORD_TO_UDINT |
|
9225 */ |
|
9226 case function_dword_to_udint : |
|
9227 { |
|
9228 symbol_c *last_type_symbol = NULL; |
|
9229 |
|
9230 { |
|
9231 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9232 symbol_c *IN_param_value = &this->default_variable_name; |
|
9233 |
|
9234 symbol_c *IN_type_symbol = param_data_type; |
|
9235 last_type_symbol = param_data_type; |
|
9236 |
|
9237 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9238 { |
|
9239 |
|
9240 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9241 s4o.print("("); |
|
9242 return_type_symbol->accept(*this); |
|
9243 s4o.print(")"); |
|
9244 IN_param_value->accept(*this); |
|
9245 return NULL; |
|
9246 |
|
9247 } |
|
9248 |
|
9249 ERROR; |
|
9250 } |
|
9251 |
|
9252 }/*function_dword_to_udint*/ |
|
9253 break; |
|
9254 |
|
9255 /**** |
|
9256 *DWORD_TO_ULINT |
|
9257 */ |
|
9258 case function_dword_to_ulint : |
|
9259 { |
|
9260 symbol_c *last_type_symbol = NULL; |
|
9261 |
|
9262 { |
|
9263 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9264 symbol_c *IN_param_value = &this->default_variable_name; |
|
9265 |
|
9266 symbol_c *IN_type_symbol = param_data_type; |
|
9267 last_type_symbol = param_data_type; |
|
9268 |
|
9269 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9270 { |
|
9271 |
|
9272 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9273 s4o.print("("); |
|
9274 return_type_symbol->accept(*this); |
|
9275 s4o.print(")"); |
|
9276 IN_param_value->accept(*this); |
|
9277 return NULL; |
|
9278 |
|
9279 } |
|
9280 |
|
9281 ERROR; |
|
9282 } |
|
9283 |
|
9284 }/*function_dword_to_ulint*/ |
|
9285 break; |
|
9286 |
|
9287 /**** |
|
9288 *DWORD_TO_TIME |
|
9289 */ |
|
9290 case function_dword_to_time : |
|
9291 { |
|
9292 symbol_c *last_type_symbol = NULL; |
|
9293 |
|
9294 { |
|
9295 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9296 symbol_c *IN_param_value = &this->default_variable_name; |
|
9297 |
|
9298 symbol_c *IN_type_symbol = param_data_type; |
|
9299 last_type_symbol = param_data_type; |
|
9300 |
|
9301 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9302 { |
|
9303 |
|
9304 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9305 s4o.print("("); |
|
9306 return_type_symbol->accept(*this); |
|
9307 s4o.print(")real_to_time("); |
|
9308 IN_param_value->accept(*this); |
|
9309 s4o.print(")"); |
|
9310 return NULL; |
|
9311 |
|
9312 } |
|
9313 |
|
9314 ERROR; |
|
9315 } |
|
9316 |
|
9317 }/*function_dword_to_time*/ |
|
9318 break; |
|
9319 |
|
9320 /**** |
|
9321 *DWORD_TO_BOOL |
|
9322 */ |
|
9323 case function_dword_to_bool : |
|
9324 { |
|
9325 symbol_c *last_type_symbol = NULL; |
|
9326 |
|
9327 { |
|
9328 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9329 symbol_c *IN_param_value = &this->default_variable_name; |
|
9330 |
|
9331 symbol_c *IN_type_symbol = param_data_type; |
|
9332 last_type_symbol = param_data_type; |
|
9333 |
|
9334 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9335 { |
|
9336 |
|
9337 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9338 s4o.print("("); |
|
9339 return_type_symbol->accept(*this); |
|
9340 s4o.print(")"); |
|
9341 IN_param_value->accept(*this); |
|
9342 return NULL; |
|
9343 |
|
9344 } |
|
9345 |
|
9346 ERROR; |
|
9347 } |
|
9348 |
|
9349 }/*function_dword_to_bool*/ |
|
9350 break; |
|
9351 |
|
9352 /**** |
|
9353 *DWORD_TO_BYTE |
|
9354 */ |
|
9355 case function_dword_to_byte : |
|
9356 { |
|
9357 symbol_c *last_type_symbol = NULL; |
|
9358 |
|
9359 { |
|
9360 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9361 symbol_c *IN_param_value = &this->default_variable_name; |
|
9362 |
|
9363 symbol_c *IN_type_symbol = param_data_type; |
|
9364 last_type_symbol = param_data_type; |
|
9365 |
|
9366 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9367 { |
|
9368 |
|
9369 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9370 s4o.print("("); |
|
9371 return_type_symbol->accept(*this); |
|
9372 s4o.print(")"); |
|
9373 IN_param_value->accept(*this); |
|
9374 return NULL; |
|
9375 |
|
9376 } |
|
9377 |
|
9378 ERROR; |
|
9379 } |
|
9380 |
|
9381 }/*function_dword_to_byte*/ |
|
9382 break; |
|
9383 |
|
9384 /**** |
|
9385 *DWORD_TO_WORD |
|
9386 */ |
|
9387 case function_dword_to_word : |
|
9388 { |
|
9389 symbol_c *last_type_symbol = NULL; |
|
9390 |
|
9391 { |
|
9392 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9393 symbol_c *IN_param_value = &this->default_variable_name; |
|
9394 |
|
9395 symbol_c *IN_type_symbol = param_data_type; |
|
9396 last_type_symbol = param_data_type; |
|
9397 |
|
9398 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9399 { |
|
9400 |
|
9401 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9402 s4o.print("("); |
|
9403 return_type_symbol->accept(*this); |
|
9404 s4o.print(")"); |
|
9405 IN_param_value->accept(*this); |
|
9406 return NULL; |
|
9407 |
|
9408 } |
|
9409 |
|
9410 ERROR; |
|
9411 } |
|
9412 |
|
9413 }/*function_dword_to_word*/ |
|
9414 break; |
|
9415 |
|
9416 /**** |
|
9417 *DWORD_TO_LWORD |
|
9418 */ |
|
9419 case function_dword_to_lword : |
|
9420 { |
|
9421 symbol_c *last_type_symbol = NULL; |
|
9422 |
|
9423 { |
|
9424 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9425 symbol_c *IN_param_value = &this->default_variable_name; |
|
9426 |
|
9427 symbol_c *IN_type_symbol = param_data_type; |
|
9428 last_type_symbol = param_data_type; |
|
9429 |
|
9430 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9431 { |
|
9432 |
|
9433 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9434 s4o.print("("); |
|
9435 return_type_symbol->accept(*this); |
|
9436 s4o.print(")"); |
|
9437 IN_param_value->accept(*this); |
|
9438 return NULL; |
|
9439 |
|
9440 } |
|
9441 |
|
9442 ERROR; |
|
9443 } |
|
9444 |
|
9445 }/*function_dword_to_lword*/ |
|
9446 break; |
|
9447 |
|
9448 /**** |
|
9449 *DWORD_TO_STRING |
|
9450 */ |
|
9451 case function_dword_to_string : |
|
9452 { |
|
9453 symbol_c *last_type_symbol = NULL; |
|
9454 |
|
9455 { |
|
9456 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9457 symbol_c *IN_param_value = &this->default_variable_name; |
|
9458 |
|
9459 symbol_c *IN_type_symbol = param_data_type; |
|
9460 last_type_symbol = param_data_type; |
|
9461 |
|
9462 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9463 { |
|
9464 |
|
9465 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9466 s4o.print("("); |
|
9467 return_type_symbol->accept(*this); |
|
9468 s4o.print(")int_to_string("); |
|
9469 IN_param_value->accept(*this); |
|
9470 s4o.print(", 16)"); |
|
9471 return NULL; |
|
9472 |
|
9473 } |
|
9474 |
|
9475 ERROR; |
|
9476 } |
|
9477 |
|
9478 }/*function_dword_to_string*/ |
|
9479 break; |
|
9480 |
|
9481 /**** |
|
9482 *DWORD_TO_WSTRING |
|
9483 */ |
|
9484 case function_dword_to_wstring : |
|
9485 { |
|
9486 symbol_c *last_type_symbol = NULL; |
|
9487 |
|
9488 { |
|
9489 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9490 symbol_c *IN_param_value = &this->default_variable_name; |
|
9491 |
|
9492 symbol_c *IN_type_symbol = param_data_type; |
|
9493 last_type_symbol = param_data_type; |
|
9494 |
|
9495 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9496 { |
|
9497 |
|
9498 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
9499 s4o.print("("); |
|
9500 return_type_symbol->accept(*this); |
|
9501 s4o.print(")int_to_string("); |
|
9502 IN_param_value->accept(*this); |
|
9503 s4o.print(", 16)"); |
|
9504 return NULL; |
|
9505 |
|
9506 } |
|
9507 |
|
9508 ERROR; |
|
9509 } |
|
9510 |
|
9511 }/*function_dword_to_wstring*/ |
|
9512 break; |
|
9513 |
|
9514 /**** |
|
9515 *DWORD_TO_DATE |
|
9516 */ |
|
9517 case function_dword_to_date : |
|
9518 { |
|
9519 symbol_c *last_type_symbol = NULL; |
|
9520 |
|
9521 { |
|
9522 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9523 symbol_c *IN_param_value = &this->default_variable_name; |
|
9524 |
|
9525 symbol_c *IN_type_symbol = param_data_type; |
|
9526 last_type_symbol = param_data_type; |
|
9527 |
|
9528 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9529 { |
|
9530 |
|
9531 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9532 s4o.print("("); |
|
9533 return_type_symbol->accept(*this); |
|
9534 s4o.print(")real_to_time("); |
|
9535 IN_param_value->accept(*this); |
|
9536 s4o.print(")"); |
|
9537 return NULL; |
|
9538 |
|
9539 } |
|
9540 |
|
9541 ERROR; |
|
9542 } |
|
9543 |
|
9544 }/*function_dword_to_date*/ |
|
9545 break; |
|
9546 |
|
9547 /**** |
|
9548 *DWORD_TO_TOD |
|
9549 */ |
|
9550 case function_dword_to_tod : |
|
9551 { |
|
9552 symbol_c *last_type_symbol = NULL; |
|
9553 |
|
9554 { |
|
9555 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9556 symbol_c *IN_param_value = &this->default_variable_name; |
|
9557 |
|
9558 symbol_c *IN_type_symbol = param_data_type; |
|
9559 last_type_symbol = param_data_type; |
|
9560 |
|
9561 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9562 { |
|
9563 |
|
9564 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9565 s4o.print("("); |
|
9566 return_type_symbol->accept(*this); |
|
9567 s4o.print(")real_to_time("); |
|
9568 IN_param_value->accept(*this); |
|
9569 s4o.print(")"); |
|
9570 return NULL; |
|
9571 |
|
9572 } |
|
9573 |
|
9574 ERROR; |
|
9575 } |
|
9576 |
|
9577 }/*function_dword_to_tod*/ |
|
9578 break; |
|
9579 |
|
9580 /**** |
|
9581 *DWORD_TO_DT |
|
9582 */ |
|
9583 case function_dword_to_dt : |
|
9584 { |
|
9585 symbol_c *last_type_symbol = NULL; |
|
9586 |
|
9587 { |
|
9588 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9589 symbol_c *IN_param_value = &this->default_variable_name; |
|
9590 |
|
9591 symbol_c *IN_type_symbol = param_data_type; |
|
9592 last_type_symbol = param_data_type; |
|
9593 |
|
9594 if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) |
|
9595 { |
|
9596 |
|
9597 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9598 s4o.print("("); |
|
9599 return_type_symbol->accept(*this); |
|
9600 s4o.print(")real_to_time("); |
|
9601 IN_param_value->accept(*this); |
|
9602 s4o.print(")"); |
|
9603 return NULL; |
|
9604 |
|
9605 } |
|
9606 |
|
9607 ERROR; |
|
9608 } |
|
9609 |
|
9610 }/*function_dword_to_dt*/ |
|
9611 break; |
|
9612 |
|
9613 /**** |
|
9614 *LWORD_TO_REAL |
|
9615 */ |
|
9616 case function_lword_to_real : |
|
9617 { |
|
9618 symbol_c *last_type_symbol = NULL; |
|
9619 |
|
9620 { |
|
9621 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9622 symbol_c *IN_param_value = &this->default_variable_name; |
|
9623 |
|
9624 symbol_c *IN_type_symbol = param_data_type; |
|
9625 last_type_symbol = param_data_type; |
|
9626 |
|
9627 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9628 { |
|
9629 |
|
9630 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9631 s4o.print("("); |
|
9632 return_type_symbol->accept(*this); |
|
9633 s4o.print(")"); |
|
9634 IN_param_value->accept(*this); |
|
9635 return NULL; |
|
9636 |
|
9637 } |
|
9638 |
|
9639 ERROR; |
|
9640 } |
|
9641 |
|
9642 }/*function_lword_to_real*/ |
|
9643 break; |
|
9644 |
|
9645 /**** |
|
9646 *LWORD_TO_LREAL |
|
9647 */ |
|
9648 case function_lword_to_lreal : |
|
9649 { |
|
9650 symbol_c *last_type_symbol = NULL; |
|
9651 |
|
9652 { |
|
9653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9654 symbol_c *IN_param_value = &this->default_variable_name; |
|
9655 |
|
9656 symbol_c *IN_type_symbol = param_data_type; |
|
9657 last_type_symbol = param_data_type; |
|
9658 |
|
9659 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9660 { |
|
9661 |
|
9662 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9663 s4o.print("("); |
|
9664 return_type_symbol->accept(*this); |
|
9665 s4o.print(")"); |
|
9666 IN_param_value->accept(*this); |
|
9667 return NULL; |
|
9668 |
|
9669 } |
|
9670 |
|
9671 ERROR; |
|
9672 } |
|
9673 |
|
9674 }/*function_lword_to_lreal*/ |
|
9675 break; |
|
9676 |
|
9677 /**** |
|
9678 *LWORD_TO_SINT |
|
9679 */ |
|
9680 case function_lword_to_sint : |
|
9681 { |
|
9682 symbol_c *last_type_symbol = NULL; |
|
9683 |
|
9684 { |
|
9685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9686 symbol_c *IN_param_value = &this->default_variable_name; |
|
9687 |
|
9688 symbol_c *IN_type_symbol = param_data_type; |
|
9689 last_type_symbol = param_data_type; |
|
9690 |
|
9691 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9692 { |
|
9693 |
|
9694 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9695 s4o.print("("); |
|
9696 return_type_symbol->accept(*this); |
|
9697 s4o.print(")"); |
|
9698 IN_param_value->accept(*this); |
|
9699 return NULL; |
|
9700 |
|
9701 } |
|
9702 |
|
9703 ERROR; |
|
9704 } |
|
9705 |
|
9706 }/*function_lword_to_sint*/ |
|
9707 break; |
|
9708 |
|
9709 /**** |
|
9710 *LWORD_TO_INT |
|
9711 */ |
|
9712 case function_lword_to_int : |
|
9713 { |
|
9714 symbol_c *last_type_symbol = NULL; |
|
9715 |
|
9716 { |
|
9717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9718 symbol_c *IN_param_value = &this->default_variable_name; |
|
9719 |
|
9720 symbol_c *IN_type_symbol = param_data_type; |
|
9721 last_type_symbol = param_data_type; |
|
9722 |
|
9723 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9724 { |
|
9725 |
|
9726 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9727 s4o.print("("); |
|
9728 return_type_symbol->accept(*this); |
|
9729 s4o.print(")"); |
|
9730 IN_param_value->accept(*this); |
|
9731 return NULL; |
|
9732 |
|
9733 } |
|
9734 |
|
9735 ERROR; |
|
9736 } |
|
9737 |
|
9738 }/*function_lword_to_int*/ |
|
9739 break; |
|
9740 |
|
9741 /**** |
|
9742 *LWORD_TO_DINT |
|
9743 */ |
|
9744 case function_lword_to_dint : |
|
9745 { |
|
9746 symbol_c *last_type_symbol = NULL; |
|
9747 |
|
9748 { |
|
9749 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9750 symbol_c *IN_param_value = &this->default_variable_name; |
|
9751 |
|
9752 symbol_c *IN_type_symbol = param_data_type; |
|
9753 last_type_symbol = param_data_type; |
|
9754 |
|
9755 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9756 { |
|
9757 |
|
9758 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9759 s4o.print("("); |
|
9760 return_type_symbol->accept(*this); |
|
9761 s4o.print(")"); |
|
9762 IN_param_value->accept(*this); |
|
9763 return NULL; |
|
9764 |
|
9765 } |
|
9766 |
|
9767 ERROR; |
|
9768 } |
|
9769 |
|
9770 }/*function_lword_to_dint*/ |
|
9771 break; |
|
9772 |
|
9773 /**** |
|
9774 *LWORD_TO_LINT |
|
9775 */ |
|
9776 case function_lword_to_lint : |
|
9777 { |
|
9778 symbol_c *last_type_symbol = NULL; |
|
9779 |
|
9780 { |
|
9781 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9782 symbol_c *IN_param_value = &this->default_variable_name; |
|
9783 |
|
9784 symbol_c *IN_type_symbol = param_data_type; |
|
9785 last_type_symbol = param_data_type; |
|
9786 |
|
9787 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9788 { |
|
9789 |
|
9790 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9791 s4o.print("("); |
|
9792 return_type_symbol->accept(*this); |
|
9793 s4o.print(")"); |
|
9794 IN_param_value->accept(*this); |
|
9795 return NULL; |
|
9796 |
|
9797 } |
|
9798 |
|
9799 ERROR; |
|
9800 } |
|
9801 |
|
9802 }/*function_lword_to_lint*/ |
|
9803 break; |
|
9804 |
|
9805 /**** |
|
9806 *LWORD_TO_USINT |
|
9807 */ |
|
9808 case function_lword_to_usint : |
|
9809 { |
|
9810 symbol_c *last_type_symbol = NULL; |
|
9811 |
|
9812 { |
|
9813 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9814 symbol_c *IN_param_value = &this->default_variable_name; |
|
9815 |
|
9816 symbol_c *IN_type_symbol = param_data_type; |
|
9817 last_type_symbol = param_data_type; |
|
9818 |
|
9819 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9820 { |
|
9821 |
|
9822 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9823 s4o.print("("); |
|
9824 return_type_symbol->accept(*this); |
|
9825 s4o.print(")"); |
|
9826 IN_param_value->accept(*this); |
|
9827 return NULL; |
|
9828 |
|
9829 } |
|
9830 |
|
9831 ERROR; |
|
9832 } |
|
9833 |
|
9834 }/*function_lword_to_usint*/ |
|
9835 break; |
|
9836 |
|
9837 /**** |
|
9838 *LWORD_TO_UINT |
|
9839 */ |
|
9840 case function_lword_to_uint : |
|
9841 { |
|
9842 symbol_c *last_type_symbol = NULL; |
|
9843 |
|
9844 { |
|
9845 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9846 symbol_c *IN_param_value = &this->default_variable_name; |
|
9847 |
|
9848 symbol_c *IN_type_symbol = param_data_type; |
|
9849 last_type_symbol = param_data_type; |
|
9850 |
|
9851 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9852 { |
|
9853 |
|
9854 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9855 s4o.print("("); |
|
9856 return_type_symbol->accept(*this); |
|
9857 s4o.print(")"); |
|
9858 IN_param_value->accept(*this); |
|
9859 return NULL; |
|
9860 |
|
9861 } |
|
9862 |
|
9863 ERROR; |
|
9864 } |
|
9865 |
|
9866 }/*function_lword_to_uint*/ |
|
9867 break; |
|
9868 |
|
9869 /**** |
|
9870 *LWORD_TO_UDINT |
|
9871 */ |
|
9872 case function_lword_to_udint : |
|
9873 { |
|
9874 symbol_c *last_type_symbol = NULL; |
|
9875 |
|
9876 { |
|
9877 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9878 symbol_c *IN_param_value = &this->default_variable_name; |
|
9879 |
|
9880 symbol_c *IN_type_symbol = param_data_type; |
|
9881 last_type_symbol = param_data_type; |
|
9882 |
|
9883 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9884 { |
|
9885 |
|
9886 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9887 s4o.print("("); |
|
9888 return_type_symbol->accept(*this); |
|
9889 s4o.print(")"); |
|
9890 IN_param_value->accept(*this); |
|
9891 return NULL; |
|
9892 |
|
9893 } |
|
9894 |
|
9895 ERROR; |
|
9896 } |
|
9897 |
|
9898 }/*function_lword_to_udint*/ |
|
9899 break; |
|
9900 |
|
9901 /**** |
|
9902 *LWORD_TO_ULINT |
|
9903 */ |
|
9904 case function_lword_to_ulint : |
|
9905 { |
|
9906 symbol_c *last_type_symbol = NULL; |
|
9907 |
|
9908 { |
|
9909 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9910 symbol_c *IN_param_value = &this->default_variable_name; |
|
9911 |
|
9912 symbol_c *IN_type_symbol = param_data_type; |
|
9913 last_type_symbol = param_data_type; |
|
9914 |
|
9915 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9916 { |
|
9917 |
|
9918 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9919 s4o.print("("); |
|
9920 return_type_symbol->accept(*this); |
|
9921 s4o.print(")"); |
|
9922 IN_param_value->accept(*this); |
|
9923 return NULL; |
|
9924 |
|
9925 } |
|
9926 |
|
9927 ERROR; |
|
9928 } |
|
9929 |
|
9930 }/*function_lword_to_ulint*/ |
|
9931 break; |
|
9932 |
|
9933 /**** |
|
9934 *LWORD_TO_TIME |
|
9935 */ |
|
9936 case function_lword_to_time : |
|
9937 { |
|
9938 symbol_c *last_type_symbol = NULL; |
|
9939 |
|
9940 { |
|
9941 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9942 symbol_c *IN_param_value = &this->default_variable_name; |
|
9943 |
|
9944 symbol_c *IN_type_symbol = param_data_type; |
|
9945 last_type_symbol = param_data_type; |
|
9946 |
|
9947 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9948 { |
|
9949 |
|
9950 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9951 s4o.print("("); |
|
9952 return_type_symbol->accept(*this); |
|
9953 s4o.print(")real_to_time("); |
|
9954 IN_param_value->accept(*this); |
|
9955 s4o.print(")"); |
|
9956 return NULL; |
|
9957 |
|
9958 } |
|
9959 |
|
9960 ERROR; |
|
9961 } |
|
9962 |
|
9963 }/*function_lword_to_time*/ |
|
9964 break; |
|
9965 |
|
9966 /**** |
|
9967 *LWORD_TO_BOOL |
|
9968 */ |
|
9969 case function_lword_to_bool : |
|
9970 { |
|
9971 symbol_c *last_type_symbol = NULL; |
|
9972 |
|
9973 { |
|
9974 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9975 symbol_c *IN_param_value = &this->default_variable_name; |
|
9976 |
|
9977 symbol_c *IN_type_symbol = param_data_type; |
|
9978 last_type_symbol = param_data_type; |
|
9979 |
|
9980 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
9981 { |
|
9982 |
|
9983 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9984 s4o.print("("); |
|
9985 return_type_symbol->accept(*this); |
|
9986 s4o.print(")"); |
|
9987 IN_param_value->accept(*this); |
|
9988 return NULL; |
|
9989 |
|
9990 } |
|
9991 |
|
9992 ERROR; |
|
9993 } |
|
9994 |
|
9995 }/*function_lword_to_bool*/ |
|
9996 break; |
|
9997 |
|
9998 /**** |
|
9999 *LWORD_TO_BYTE |
|
10000 */ |
|
10001 case function_lword_to_byte : |
|
10002 { |
|
10003 symbol_c *last_type_symbol = NULL; |
|
10004 |
|
10005 { |
|
10006 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10007 symbol_c *IN_param_value = &this->default_variable_name; |
|
10008 |
|
10009 symbol_c *IN_type_symbol = param_data_type; |
|
10010 last_type_symbol = param_data_type; |
|
10011 |
|
10012 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10013 { |
|
10014 |
|
10015 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10016 s4o.print("("); |
|
10017 return_type_symbol->accept(*this); |
|
10018 s4o.print(")"); |
|
10019 IN_param_value->accept(*this); |
|
10020 return NULL; |
|
10021 |
|
10022 } |
|
10023 |
|
10024 ERROR; |
|
10025 } |
|
10026 |
|
10027 }/*function_lword_to_byte*/ |
|
10028 break; |
|
10029 |
|
10030 /**** |
|
10031 *LWORD_TO_WORD |
|
10032 */ |
|
10033 case function_lword_to_word : |
|
10034 { |
|
10035 symbol_c *last_type_symbol = NULL; |
|
10036 |
|
10037 { |
|
10038 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10039 symbol_c *IN_param_value = &this->default_variable_name; |
|
10040 |
|
10041 symbol_c *IN_type_symbol = param_data_type; |
|
10042 last_type_symbol = param_data_type; |
|
10043 |
|
10044 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10045 { |
|
10046 |
|
10047 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10048 s4o.print("("); |
|
10049 return_type_symbol->accept(*this); |
|
10050 s4o.print(")"); |
|
10051 IN_param_value->accept(*this); |
|
10052 return NULL; |
|
10053 |
|
10054 } |
|
10055 |
|
10056 ERROR; |
|
10057 } |
|
10058 |
|
10059 }/*function_lword_to_word*/ |
|
10060 break; |
|
10061 |
|
10062 /**** |
|
10063 *LWORD_TO_DWORD |
|
10064 */ |
|
10065 case function_lword_to_dword : |
|
10066 { |
|
10067 symbol_c *last_type_symbol = NULL; |
|
10068 |
|
10069 { |
|
10070 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10071 symbol_c *IN_param_value = &this->default_variable_name; |
|
10072 |
|
10073 symbol_c *IN_type_symbol = param_data_type; |
|
10074 last_type_symbol = param_data_type; |
|
10075 |
|
10076 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10077 { |
|
10078 |
|
10079 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10080 s4o.print("("); |
|
10081 return_type_symbol->accept(*this); |
|
10082 s4o.print(")"); |
|
10083 IN_param_value->accept(*this); |
|
10084 return NULL; |
|
10085 |
|
10086 } |
|
10087 |
|
10088 ERROR; |
|
10089 } |
|
10090 |
|
10091 }/*function_lword_to_dword*/ |
|
10092 break; |
|
10093 |
|
10094 /**** |
|
10095 *LWORD_TO_STRING |
|
10096 */ |
|
10097 case function_lword_to_string : |
|
10098 { |
|
10099 symbol_c *last_type_symbol = NULL; |
|
10100 |
|
10101 { |
|
10102 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10103 symbol_c *IN_param_value = &this->default_variable_name; |
|
10104 |
|
10105 symbol_c *IN_type_symbol = param_data_type; |
|
10106 last_type_symbol = param_data_type; |
|
10107 |
|
10108 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10109 { |
|
10110 |
|
10111 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
10112 s4o.print("("); |
|
10113 return_type_symbol->accept(*this); |
|
10114 s4o.print(")int_to_string("); |
|
10115 IN_param_value->accept(*this); |
|
10116 s4o.print(", 16)"); |
|
10117 return NULL; |
|
10118 |
|
10119 } |
|
10120 |
|
10121 ERROR; |
|
10122 } |
|
10123 |
|
10124 }/*function_lword_to_string*/ |
|
10125 break; |
|
10126 |
|
10127 /**** |
|
10128 *LWORD_TO_WSTRING |
|
10129 */ |
|
10130 case function_lword_to_wstring : |
|
10131 { |
|
10132 symbol_c *last_type_symbol = NULL; |
|
10133 |
|
10134 { |
|
10135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10136 symbol_c *IN_param_value = &this->default_variable_name; |
|
10137 |
|
10138 symbol_c *IN_type_symbol = param_data_type; |
|
10139 last_type_symbol = param_data_type; |
|
10140 |
|
10141 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10142 { |
|
10143 |
|
10144 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
10145 s4o.print("("); |
|
10146 return_type_symbol->accept(*this); |
|
10147 s4o.print(")int_to_string("); |
|
10148 IN_param_value->accept(*this); |
|
10149 s4o.print(", 16)"); |
|
10150 return NULL; |
|
10151 |
|
10152 } |
|
10153 |
|
10154 ERROR; |
|
10155 } |
|
10156 |
|
10157 }/*function_lword_to_wstring*/ |
|
10158 break; |
|
10159 |
|
10160 /**** |
|
10161 *LWORD_TO_DATE |
|
10162 */ |
|
10163 case function_lword_to_date : |
|
10164 { |
|
10165 symbol_c *last_type_symbol = NULL; |
|
10166 |
|
10167 { |
|
10168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10169 symbol_c *IN_param_value = &this->default_variable_name; |
|
10170 |
|
10171 symbol_c *IN_type_symbol = param_data_type; |
|
10172 last_type_symbol = param_data_type; |
|
10173 |
|
10174 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10175 { |
|
10176 |
|
10177 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10178 s4o.print("("); |
|
10179 return_type_symbol->accept(*this); |
|
10180 s4o.print(")real_to_time("); |
|
10181 IN_param_value->accept(*this); |
|
10182 s4o.print(")"); |
|
10183 return NULL; |
|
10184 |
|
10185 } |
|
10186 |
|
10187 ERROR; |
|
10188 } |
|
10189 |
|
10190 }/*function_lword_to_date*/ |
|
10191 break; |
|
10192 |
|
10193 /**** |
|
10194 *LWORD_TO_TOD |
|
10195 */ |
|
10196 case function_lword_to_tod : |
|
10197 { |
|
10198 symbol_c *last_type_symbol = NULL; |
|
10199 |
|
10200 { |
|
10201 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10202 symbol_c *IN_param_value = &this->default_variable_name; |
|
10203 |
|
10204 symbol_c *IN_type_symbol = param_data_type; |
|
10205 last_type_symbol = param_data_type; |
|
10206 |
|
10207 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10208 { |
|
10209 |
|
10210 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10211 s4o.print("("); |
|
10212 return_type_symbol->accept(*this); |
|
10213 s4o.print(")real_to_time("); |
|
10214 IN_param_value->accept(*this); |
|
10215 s4o.print(")"); |
|
10216 return NULL; |
|
10217 |
|
10218 } |
|
10219 |
|
10220 ERROR; |
|
10221 } |
|
10222 |
|
10223 }/*function_lword_to_tod*/ |
|
10224 break; |
|
10225 |
|
10226 /**** |
|
10227 *LWORD_TO_DT |
|
10228 */ |
|
10229 case function_lword_to_dt : |
|
10230 { |
|
10231 symbol_c *last_type_symbol = NULL; |
|
10232 |
|
10233 { |
|
10234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10235 symbol_c *IN_param_value = &this->default_variable_name; |
|
10236 |
|
10237 symbol_c *IN_type_symbol = param_data_type; |
|
10238 last_type_symbol = param_data_type; |
|
10239 |
|
10240 if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) |
|
10241 { |
|
10242 |
|
10243 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10244 s4o.print("("); |
|
10245 return_type_symbol->accept(*this); |
|
10246 s4o.print(")real_to_time("); |
|
10247 IN_param_value->accept(*this); |
|
10248 s4o.print(")"); |
|
10249 return NULL; |
|
10250 |
|
10251 } |
|
10252 |
|
10253 ERROR; |
|
10254 } |
|
10255 |
|
10256 }/*function_lword_to_dt*/ |
|
10257 break; |
|
10258 |
|
10259 /**** |
|
10260 *STRING_TO_REAL |
|
10261 */ |
|
10262 case function_string_to_real : |
|
10263 { |
|
10264 symbol_c *last_type_symbol = NULL; |
|
10265 |
|
10266 { |
|
10267 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10268 symbol_c *IN_param_value = &this->default_variable_name; |
|
10269 |
|
10270 symbol_c *IN_type_symbol = param_data_type; |
|
10271 last_type_symbol = param_data_type; |
|
10272 |
|
10273 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10274 { |
|
10275 |
|
10276 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10277 s4o.print("("); |
|
10278 return_type_symbol->accept(*this); |
|
10279 s4o.print(")string_to_int("); |
|
10280 IN_param_value->accept(*this); |
|
10281 s4o.print(", 10)"); |
|
10282 return NULL; |
|
10283 |
|
10284 } |
|
10285 |
|
10286 ERROR; |
|
10287 } |
|
10288 |
|
10289 }/*function_string_to_real*/ |
|
10290 break; |
|
10291 |
|
10292 /**** |
|
10293 *STRING_TO_LREAL |
|
10294 */ |
|
10295 case function_string_to_lreal : |
|
10296 { |
|
10297 symbol_c *last_type_symbol = NULL; |
|
10298 |
|
10299 { |
|
10300 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10301 symbol_c *IN_param_value = &this->default_variable_name; |
|
10302 |
|
10303 symbol_c *IN_type_symbol = param_data_type; |
|
10304 last_type_symbol = param_data_type; |
|
10305 |
|
10306 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10307 { |
|
10308 |
|
10309 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10310 s4o.print("("); |
|
10311 return_type_symbol->accept(*this); |
|
10312 s4o.print(")string_to_int("); |
|
10313 IN_param_value->accept(*this); |
|
10314 s4o.print(", 10)"); |
|
10315 return NULL; |
|
10316 |
|
10317 } |
|
10318 |
|
10319 ERROR; |
|
10320 } |
|
10321 |
|
10322 }/*function_string_to_lreal*/ |
|
10323 break; |
|
10324 |
|
10325 /**** |
|
10326 *STRING_TO_SINT |
|
10327 */ |
|
10328 case function_string_to_sint : |
|
10329 { |
|
10330 symbol_c *last_type_symbol = NULL; |
|
10331 |
|
10332 { |
|
10333 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10334 symbol_c *IN_param_value = &this->default_variable_name; |
|
10335 |
|
10336 symbol_c *IN_type_symbol = param_data_type; |
|
10337 last_type_symbol = param_data_type; |
|
10338 |
|
10339 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10340 { |
|
10341 |
|
10342 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10343 s4o.print("("); |
|
10344 return_type_symbol->accept(*this); |
|
10345 s4o.print(")string_to_int("); |
|
10346 IN_param_value->accept(*this); |
|
10347 s4o.print(", 10)"); |
|
10348 return NULL; |
|
10349 |
|
10350 } |
|
10351 |
|
10352 ERROR; |
|
10353 } |
|
10354 |
|
10355 }/*function_string_to_sint*/ |
|
10356 break; |
|
10357 |
|
10358 /**** |
|
10359 *STRING_TO_INT |
|
10360 */ |
|
10361 case function_string_to_int : |
|
10362 { |
|
10363 symbol_c *last_type_symbol = NULL; |
|
10364 |
|
10365 { |
|
10366 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10367 symbol_c *IN_param_value = &this->default_variable_name; |
|
10368 |
|
10369 symbol_c *IN_type_symbol = param_data_type; |
|
10370 last_type_symbol = param_data_type; |
|
10371 |
|
10372 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10373 { |
|
10374 |
|
10375 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10376 s4o.print("("); |
|
10377 return_type_symbol->accept(*this); |
|
10378 s4o.print(")string_to_int("); |
|
10379 IN_param_value->accept(*this); |
|
10380 s4o.print(", 10)"); |
|
10381 return NULL; |
|
10382 |
|
10383 } |
|
10384 |
|
10385 ERROR; |
|
10386 } |
|
10387 |
|
10388 }/*function_string_to_int*/ |
|
10389 break; |
|
10390 |
|
10391 /**** |
|
10392 *STRING_TO_DINT |
|
10393 */ |
|
10394 case function_string_to_dint : |
|
10395 { |
|
10396 symbol_c *last_type_symbol = NULL; |
|
10397 |
|
10398 { |
|
10399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10400 symbol_c *IN_param_value = &this->default_variable_name; |
|
10401 |
|
10402 symbol_c *IN_type_symbol = param_data_type; |
|
10403 last_type_symbol = param_data_type; |
|
10404 |
|
10405 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10406 { |
|
10407 |
|
10408 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10409 s4o.print("("); |
|
10410 return_type_symbol->accept(*this); |
|
10411 s4o.print(")string_to_int("); |
|
10412 IN_param_value->accept(*this); |
|
10413 s4o.print(", 10)"); |
|
10414 return NULL; |
|
10415 |
|
10416 } |
|
10417 |
|
10418 ERROR; |
|
10419 } |
|
10420 |
|
10421 }/*function_string_to_dint*/ |
|
10422 break; |
|
10423 |
|
10424 /**** |
|
10425 *STRING_TO_LINT |
|
10426 */ |
|
10427 case function_string_to_lint : |
|
10428 { |
|
10429 symbol_c *last_type_symbol = NULL; |
|
10430 |
|
10431 { |
|
10432 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10433 symbol_c *IN_param_value = &this->default_variable_name; |
|
10434 |
|
10435 symbol_c *IN_type_symbol = param_data_type; |
|
10436 last_type_symbol = param_data_type; |
|
10437 |
|
10438 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10439 { |
|
10440 |
|
10441 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10442 s4o.print("("); |
|
10443 return_type_symbol->accept(*this); |
|
10444 s4o.print(")string_to_int("); |
|
10445 IN_param_value->accept(*this); |
|
10446 s4o.print(", 10)"); |
|
10447 return NULL; |
|
10448 |
|
10449 } |
|
10450 |
|
10451 ERROR; |
|
10452 } |
|
10453 |
|
10454 }/*function_string_to_lint*/ |
|
10455 break; |
|
10456 |
|
10457 /**** |
|
10458 *STRING_TO_USINT |
|
10459 */ |
|
10460 case function_string_to_usint : |
|
10461 { |
|
10462 symbol_c *last_type_symbol = NULL; |
|
10463 |
|
10464 { |
|
10465 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10466 symbol_c *IN_param_value = &this->default_variable_name; |
|
10467 |
|
10468 symbol_c *IN_type_symbol = param_data_type; |
|
10469 last_type_symbol = param_data_type; |
|
10470 |
|
10471 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10472 { |
|
10473 |
|
10474 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
10475 s4o.print("("); |
|
10476 return_type_symbol->accept(*this); |
|
10477 s4o.print(")string_to_int("); |
|
10478 IN_param_value->accept(*this); |
|
10479 s4o.print(", 10)"); |
|
10480 return NULL; |
|
10481 |
|
10482 } |
|
10483 |
|
10484 ERROR; |
|
10485 } |
|
10486 |
|
10487 }/*function_string_to_usint*/ |
|
10488 break; |
|
10489 |
|
10490 /**** |
|
10491 *STRING_TO_UINT |
|
10492 */ |
|
10493 case function_string_to_uint : |
|
10494 { |
|
10495 symbol_c *last_type_symbol = NULL; |
|
10496 |
|
10497 { |
|
10498 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10499 symbol_c *IN_param_value = &this->default_variable_name; |
|
10500 |
|
10501 symbol_c *IN_type_symbol = param_data_type; |
|
10502 last_type_symbol = param_data_type; |
|
10503 |
|
10504 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10505 { |
|
10506 |
|
10507 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10508 s4o.print("("); |
|
10509 return_type_symbol->accept(*this); |
|
10510 s4o.print(")string_to_int("); |
|
10511 IN_param_value->accept(*this); |
|
10512 s4o.print(", 10)"); |
|
10513 return NULL; |
|
10514 |
|
10515 } |
|
10516 |
|
10517 ERROR; |
|
10518 } |
|
10519 |
|
10520 }/*function_string_to_uint*/ |
|
10521 break; |
|
10522 |
|
10523 /**** |
|
10524 *STRING_TO_UDINT |
|
10525 */ |
|
10526 case function_string_to_udint : |
|
10527 { |
|
10528 symbol_c *last_type_symbol = NULL; |
|
10529 |
|
10530 { |
|
10531 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10532 symbol_c *IN_param_value = &this->default_variable_name; |
|
10533 |
|
10534 symbol_c *IN_type_symbol = param_data_type; |
|
10535 last_type_symbol = param_data_type; |
|
10536 |
|
10537 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10538 { |
|
10539 |
|
10540 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10541 s4o.print("("); |
|
10542 return_type_symbol->accept(*this); |
|
10543 s4o.print(")string_to_int("); |
|
10544 IN_param_value->accept(*this); |
|
10545 s4o.print(", 10)"); |
|
10546 return NULL; |
|
10547 |
|
10548 } |
|
10549 |
|
10550 ERROR; |
|
10551 } |
|
10552 |
|
10553 }/*function_string_to_udint*/ |
|
10554 break; |
|
10555 |
|
10556 /**** |
|
10557 *STRING_TO_ULINT |
|
10558 */ |
|
10559 case function_string_to_ulint : |
|
10560 { |
|
10561 symbol_c *last_type_symbol = NULL; |
|
10562 |
|
10563 { |
|
10564 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10565 symbol_c *IN_param_value = &this->default_variable_name; |
|
10566 |
|
10567 symbol_c *IN_type_symbol = param_data_type; |
|
10568 last_type_symbol = param_data_type; |
|
10569 |
|
10570 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10571 { |
|
10572 |
|
10573 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10574 s4o.print("("); |
|
10575 return_type_symbol->accept(*this); |
|
10576 s4o.print(")string_to_int("); |
|
10577 IN_param_value->accept(*this); |
|
10578 s4o.print(", 10)"); |
|
10579 return NULL; |
|
10580 |
|
10581 } |
|
10582 |
|
10583 ERROR; |
|
10584 } |
|
10585 |
|
10586 }/*function_string_to_ulint*/ |
|
10587 break; |
|
10588 |
|
10589 /**** |
|
10590 *STRING_TO_TIME |
|
10591 */ |
|
10592 case function_string_to_time : |
|
10593 { |
|
10594 symbol_c *last_type_symbol = NULL; |
|
10595 |
|
10596 { |
|
10597 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10598 symbol_c *IN_param_value = &this->default_variable_name; |
|
10599 |
|
10600 symbol_c *IN_type_symbol = param_data_type; |
|
10601 last_type_symbol = param_data_type; |
|
10602 |
|
10603 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10604 { |
|
10605 |
|
10606 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10607 s4o.print("("); |
|
10608 return_type_symbol->accept(*this); |
|
10609 s4o.print(")string_to_time("); |
|
10610 IN_param_value->accept(*this); |
|
10611 s4o.print(")"); |
|
10612 return NULL; |
|
10613 |
|
10614 } |
|
10615 |
|
10616 ERROR; |
|
10617 } |
|
10618 |
|
10619 }/*function_string_to_time*/ |
|
10620 break; |
|
10621 |
|
10622 /**** |
|
10623 *STRING_TO_BOOL |
|
10624 */ |
|
10625 case function_string_to_bool : |
|
10626 { |
|
10627 symbol_c *last_type_symbol = NULL; |
|
10628 |
|
10629 { |
|
10630 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10631 symbol_c *IN_param_value = &this->default_variable_name; |
|
10632 |
|
10633 symbol_c *IN_type_symbol = param_data_type; |
|
10634 last_type_symbol = param_data_type; |
|
10635 |
|
10636 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10637 { |
|
10638 |
|
10639 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10640 s4o.print("("); |
|
10641 return_type_symbol->accept(*this); |
|
10642 s4o.print(")string_to_int("); |
|
10643 IN_param_value->accept(*this); |
|
10644 s4o.print(", 16)"); |
|
10645 return NULL; |
|
10646 |
|
10647 } |
|
10648 |
|
10649 ERROR; |
|
10650 } |
|
10651 |
|
10652 }/*function_string_to_bool*/ |
|
10653 break; |
|
10654 |
|
10655 /**** |
|
10656 *STRING_TO_BYTE |
|
10657 */ |
|
10658 case function_string_to_byte : |
|
10659 { |
|
10660 symbol_c *last_type_symbol = NULL; |
|
10661 |
|
10662 { |
|
10663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10664 symbol_c *IN_param_value = &this->default_variable_name; |
|
10665 |
|
10666 symbol_c *IN_type_symbol = param_data_type; |
|
10667 last_type_symbol = param_data_type; |
|
10668 |
|
10669 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10670 { |
|
10671 |
|
10672 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10673 s4o.print("("); |
|
10674 return_type_symbol->accept(*this); |
|
10675 s4o.print(")string_to_int("); |
|
10676 IN_param_value->accept(*this); |
|
10677 s4o.print(", 16)"); |
|
10678 return NULL; |
|
10679 |
|
10680 } |
|
10681 |
|
10682 ERROR; |
|
10683 } |
|
10684 |
|
10685 }/*function_string_to_byte*/ |
|
10686 break; |
|
10687 |
|
10688 /**** |
|
10689 *STRING_TO_WORD |
|
10690 */ |
|
10691 case function_string_to_word : |
|
10692 { |
|
10693 symbol_c *last_type_symbol = NULL; |
|
10694 |
|
10695 { |
|
10696 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10697 symbol_c *IN_param_value = &this->default_variable_name; |
|
10698 |
|
10699 symbol_c *IN_type_symbol = param_data_type; |
|
10700 last_type_symbol = param_data_type; |
|
10701 |
|
10702 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10703 { |
|
10704 |
|
10705 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10706 s4o.print("("); |
|
10707 return_type_symbol->accept(*this); |
|
10708 s4o.print(")string_to_int("); |
|
10709 IN_param_value->accept(*this); |
|
10710 s4o.print(", 16)"); |
|
10711 return NULL; |
|
10712 |
|
10713 } |
|
10714 |
|
10715 ERROR; |
|
10716 } |
|
10717 |
|
10718 }/*function_string_to_word*/ |
|
10719 break; |
|
10720 |
|
10721 /**** |
|
10722 *STRING_TO_DWORD |
|
10723 */ |
|
10724 case function_string_to_dword : |
|
10725 { |
|
10726 symbol_c *last_type_symbol = NULL; |
|
10727 |
|
10728 { |
|
10729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10730 symbol_c *IN_param_value = &this->default_variable_name; |
|
10731 |
|
10732 symbol_c *IN_type_symbol = param_data_type; |
|
10733 last_type_symbol = param_data_type; |
|
10734 |
|
10735 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10736 { |
|
10737 |
|
10738 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10739 s4o.print("("); |
|
10740 return_type_symbol->accept(*this); |
|
10741 s4o.print(")string_to_int("); |
|
10742 IN_param_value->accept(*this); |
|
10743 s4o.print(", 16)"); |
|
10744 return NULL; |
|
10745 |
|
10746 } |
|
10747 |
|
10748 ERROR; |
|
10749 } |
|
10750 |
|
10751 }/*function_string_to_dword*/ |
|
10752 break; |
|
10753 |
|
10754 /**** |
|
10755 *STRING_TO_LWORD |
|
10756 */ |
|
10757 case function_string_to_lword : |
|
10758 { |
|
10759 symbol_c *last_type_symbol = NULL; |
|
10760 |
|
10761 { |
|
10762 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10763 symbol_c *IN_param_value = &this->default_variable_name; |
|
10764 |
|
10765 symbol_c *IN_type_symbol = param_data_type; |
|
10766 last_type_symbol = param_data_type; |
|
10767 |
|
10768 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10769 { |
|
10770 |
|
10771 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10772 s4o.print("("); |
|
10773 return_type_symbol->accept(*this); |
|
10774 s4o.print(")string_to_int("); |
|
10775 IN_param_value->accept(*this); |
|
10776 s4o.print(", 16)"); |
|
10777 return NULL; |
|
10778 |
|
10779 } |
|
10780 |
|
10781 ERROR; |
|
10782 } |
|
10783 |
|
10784 }/*function_string_to_lword*/ |
|
10785 break; |
|
10786 |
|
10787 /**** |
|
10788 *STRING_TO_DATE |
|
10789 */ |
|
10790 case function_string_to_date : |
|
10791 { |
|
10792 symbol_c *last_type_symbol = NULL; |
|
10793 |
|
10794 { |
|
10795 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10796 symbol_c *IN_param_value = &this->default_variable_name; |
|
10797 |
|
10798 symbol_c *IN_type_symbol = param_data_type; |
|
10799 last_type_symbol = param_data_type; |
|
10800 |
|
10801 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10802 { |
|
10803 |
|
10804 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10805 s4o.print("("); |
|
10806 return_type_symbol->accept(*this); |
|
10807 s4o.print(")string_to_time("); |
|
10808 IN_param_value->accept(*this); |
|
10809 s4o.print(")"); |
|
10810 return NULL; |
|
10811 |
|
10812 } |
|
10813 |
|
10814 ERROR; |
|
10815 } |
|
10816 |
|
10817 }/*function_string_to_date*/ |
|
10818 break; |
|
10819 |
|
10820 /**** |
|
10821 *STRING_TO_TOD |
|
10822 */ |
|
10823 case function_string_to_tod : |
|
10824 { |
|
10825 symbol_c *last_type_symbol = NULL; |
|
10826 |
|
10827 { |
|
10828 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10829 symbol_c *IN_param_value = &this->default_variable_name; |
|
10830 |
|
10831 symbol_c *IN_type_symbol = param_data_type; |
|
10832 last_type_symbol = param_data_type; |
|
10833 |
|
10834 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10835 { |
|
10836 |
|
10837 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10838 s4o.print("("); |
|
10839 return_type_symbol->accept(*this); |
|
10840 s4o.print(")string_to_time("); |
|
10841 IN_param_value->accept(*this); |
|
10842 s4o.print(")"); |
|
10843 return NULL; |
|
10844 |
|
10845 } |
|
10846 |
|
10847 ERROR; |
|
10848 } |
|
10849 |
|
10850 }/*function_string_to_tod*/ |
|
10851 break; |
|
10852 |
|
10853 /**** |
|
10854 *STRING_TO_DT |
|
10855 */ |
|
10856 case function_string_to_dt : |
|
10857 { |
|
10858 symbol_c *last_type_symbol = NULL; |
|
10859 |
|
10860 { |
|
10861 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10862 symbol_c *IN_param_value = &this->default_variable_name; |
|
10863 |
|
10864 symbol_c *IN_type_symbol = param_data_type; |
|
10865 last_type_symbol = param_data_type; |
|
10866 |
|
10867 if (typeid(*last_type_symbol) == typeid(string_type_name_c)) |
|
10868 { |
|
10869 |
|
10870 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10871 s4o.print("("); |
|
10872 return_type_symbol->accept(*this); |
|
10873 s4o.print(")string_to_time("); |
|
10874 IN_param_value->accept(*this); |
|
10875 s4o.print(")"); |
|
10876 return NULL; |
|
10877 |
|
10878 } |
|
10879 |
|
10880 ERROR; |
|
10881 } |
|
10882 |
|
10883 }/*function_string_to_dt*/ |
|
10884 break; |
|
10885 |
|
10886 /**** |
|
10887 *WSTRING_TO_REAL |
|
10888 */ |
|
10889 case function_wstring_to_real : |
|
10890 { |
|
10891 symbol_c *last_type_symbol = NULL; |
|
10892 |
|
10893 { |
|
10894 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10895 symbol_c *IN_param_value = &this->default_variable_name; |
|
10896 |
|
10897 symbol_c *IN_type_symbol = param_data_type; |
|
10898 last_type_symbol = param_data_type; |
|
10899 |
|
10900 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
10901 { |
|
10902 |
|
10903 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10904 s4o.print("("); |
|
10905 return_type_symbol->accept(*this); |
|
10906 s4o.print(")string_to_int("); |
|
10907 IN_param_value->accept(*this); |
|
10908 s4o.print(", 10)"); |
|
10909 return NULL; |
|
10910 |
|
10911 } |
|
10912 |
|
10913 ERROR; |
|
10914 } |
|
10915 |
|
10916 }/*function_wstring_to_real*/ |
|
10917 break; |
|
10918 |
|
10919 /**** |
|
10920 *WSTRING_TO_LREAL |
|
10921 */ |
|
10922 case function_wstring_to_lreal : |
|
10923 { |
|
10924 symbol_c *last_type_symbol = NULL; |
|
10925 |
|
10926 { |
|
10927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10928 symbol_c *IN_param_value = &this->default_variable_name; |
|
10929 |
|
10930 symbol_c *IN_type_symbol = param_data_type; |
|
10931 last_type_symbol = param_data_type; |
|
10932 |
|
10933 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
10934 { |
|
10935 |
|
10936 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10937 s4o.print("("); |
|
10938 return_type_symbol->accept(*this); |
|
10939 s4o.print(")string_to_int("); |
|
10940 IN_param_value->accept(*this); |
|
10941 s4o.print(", 10)"); |
|
10942 return NULL; |
|
10943 |
|
10944 } |
|
10945 |
|
10946 ERROR; |
|
10947 } |
|
10948 |
|
10949 }/*function_wstring_to_lreal*/ |
|
10950 break; |
|
10951 |
|
10952 /**** |
|
10953 *WSTRING_TO_SINT |
|
10954 */ |
|
10955 case function_wstring_to_sint : |
|
10956 { |
|
10957 symbol_c *last_type_symbol = NULL; |
|
10958 |
|
10959 { |
|
10960 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10961 symbol_c *IN_param_value = &this->default_variable_name; |
|
10962 |
|
10963 symbol_c *IN_type_symbol = param_data_type; |
|
10964 last_type_symbol = param_data_type; |
|
10965 |
|
10966 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
10967 { |
|
10968 |
|
10969 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10970 s4o.print("("); |
|
10971 return_type_symbol->accept(*this); |
|
10972 s4o.print(")string_to_int("); |
|
10973 IN_param_value->accept(*this); |
|
10974 s4o.print(", 10)"); |
|
10975 return NULL; |
|
10976 |
|
10977 } |
|
10978 |
|
10979 ERROR; |
|
10980 } |
|
10981 |
|
10982 }/*function_wstring_to_sint*/ |
|
10983 break; |
|
10984 |
|
10985 /**** |
|
10986 *WSTRING_TO_INT |
|
10987 */ |
|
10988 case function_wstring_to_int : |
|
10989 { |
|
10990 symbol_c *last_type_symbol = NULL; |
|
10991 |
|
10992 { |
|
10993 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10994 symbol_c *IN_param_value = &this->default_variable_name; |
|
10995 |
|
10996 symbol_c *IN_type_symbol = param_data_type; |
|
10997 last_type_symbol = param_data_type; |
|
10998 |
|
10999 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11000 { |
|
11001 |
|
11002 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11003 s4o.print("("); |
|
11004 return_type_symbol->accept(*this); |
|
11005 s4o.print(")string_to_int("); |
|
11006 IN_param_value->accept(*this); |
|
11007 s4o.print(", 10)"); |
|
11008 return NULL; |
|
11009 |
|
11010 } |
|
11011 |
|
11012 ERROR; |
|
11013 } |
|
11014 |
|
11015 }/*function_wstring_to_int*/ |
|
11016 break; |
|
11017 |
|
11018 /**** |
|
11019 *WSTRING_TO_DINT |
|
11020 */ |
|
11021 case function_wstring_to_dint : |
|
11022 { |
|
11023 symbol_c *last_type_symbol = NULL; |
|
11024 |
|
11025 { |
|
11026 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11027 symbol_c *IN_param_value = &this->default_variable_name; |
|
11028 |
|
11029 symbol_c *IN_type_symbol = param_data_type; |
|
11030 last_type_symbol = param_data_type; |
|
11031 |
|
11032 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11033 { |
|
11034 |
|
11035 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
11036 s4o.print("("); |
|
11037 return_type_symbol->accept(*this); |
|
11038 s4o.print(")string_to_int("); |
|
11039 IN_param_value->accept(*this); |
|
11040 s4o.print(", 10)"); |
|
11041 return NULL; |
|
11042 |
|
11043 } |
|
11044 |
|
11045 ERROR; |
|
11046 } |
|
11047 |
|
11048 }/*function_wstring_to_dint*/ |
|
11049 break; |
|
11050 |
|
11051 /**** |
|
11052 *WSTRING_TO_LINT |
|
11053 */ |
|
11054 case function_wstring_to_lint : |
|
11055 { |
|
11056 symbol_c *last_type_symbol = NULL; |
|
11057 |
|
11058 { |
|
11059 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11060 symbol_c *IN_param_value = &this->default_variable_name; |
|
11061 |
|
11062 symbol_c *IN_type_symbol = param_data_type; |
|
11063 last_type_symbol = param_data_type; |
|
11064 |
|
11065 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11066 { |
|
11067 |
|
11068 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
11069 s4o.print("("); |
|
11070 return_type_symbol->accept(*this); |
|
11071 s4o.print(")string_to_int("); |
|
11072 IN_param_value->accept(*this); |
|
11073 s4o.print(", 10)"); |
|
11074 return NULL; |
|
11075 |
|
11076 } |
|
11077 |
|
11078 ERROR; |
|
11079 } |
|
11080 |
|
11081 }/*function_wstring_to_lint*/ |
|
11082 break; |
|
11083 |
|
11084 /**** |
|
11085 *WSTRING_TO_USINT |
|
11086 */ |
|
11087 case function_wstring_to_usint : |
|
11088 { |
|
11089 symbol_c *last_type_symbol = NULL; |
|
11090 |
|
11091 { |
|
11092 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11093 symbol_c *IN_param_value = &this->default_variable_name; |
|
11094 |
|
11095 symbol_c *IN_type_symbol = param_data_type; |
|
11096 last_type_symbol = param_data_type; |
|
11097 |
|
11098 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11099 { |
|
11100 |
|
11101 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11102 s4o.print("("); |
|
11103 return_type_symbol->accept(*this); |
|
11104 s4o.print(")string_to_int("); |
|
11105 IN_param_value->accept(*this); |
|
11106 s4o.print(", 10)"); |
|
11107 return NULL; |
|
11108 |
|
11109 } |
|
11110 |
|
11111 ERROR; |
|
11112 } |
|
11113 |
|
11114 }/*function_wstring_to_usint*/ |
|
11115 break; |
|
11116 |
|
11117 /**** |
|
11118 *WSTRING_TO_UINT |
|
11119 */ |
|
11120 case function_wstring_to_uint : |
|
11121 { |
|
11122 symbol_c *last_type_symbol = NULL; |
|
11123 |
|
11124 { |
|
11125 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11126 symbol_c *IN_param_value = &this->default_variable_name; |
|
11127 |
|
11128 symbol_c *IN_type_symbol = param_data_type; |
|
11129 last_type_symbol = param_data_type; |
|
11130 |
|
11131 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11132 { |
|
11133 |
|
11134 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11135 s4o.print("("); |
|
11136 return_type_symbol->accept(*this); |
|
11137 s4o.print(")string_to_int("); |
|
11138 IN_param_value->accept(*this); |
|
11139 s4o.print(", 10)"); |
|
11140 return NULL; |
|
11141 |
|
11142 } |
|
11143 |
|
11144 ERROR; |
|
11145 } |
|
11146 |
|
11147 }/*function_wstring_to_uint*/ |
|
11148 break; |
|
11149 |
|
11150 /**** |
|
11151 *WSTRING_TO_UDINT |
|
11152 */ |
|
11153 case function_wstring_to_udint : |
|
11154 { |
|
11155 symbol_c *last_type_symbol = NULL; |
|
11156 |
|
11157 { |
|
11158 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11159 symbol_c *IN_param_value = &this->default_variable_name; |
|
11160 |
|
11161 symbol_c *IN_type_symbol = param_data_type; |
|
11162 last_type_symbol = param_data_type; |
|
11163 |
|
11164 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11165 { |
|
11166 |
|
11167 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11168 s4o.print("("); |
|
11169 return_type_symbol->accept(*this); |
|
11170 s4o.print(")string_to_int("); |
|
11171 IN_param_value->accept(*this); |
|
11172 s4o.print(", 10)"); |
|
11173 return NULL; |
|
11174 |
|
11175 } |
|
11176 |
|
11177 ERROR; |
|
11178 } |
|
11179 |
|
11180 }/*function_wstring_to_udint*/ |
|
11181 break; |
|
11182 |
|
11183 /**** |
|
11184 *WSTRING_TO_ULINT |
|
11185 */ |
|
11186 case function_wstring_to_ulint : |
|
11187 { |
|
11188 symbol_c *last_type_symbol = NULL; |
|
11189 |
|
11190 { |
|
11191 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11192 symbol_c *IN_param_value = &this->default_variable_name; |
|
11193 |
|
11194 symbol_c *IN_type_symbol = param_data_type; |
|
11195 last_type_symbol = param_data_type; |
|
11196 |
|
11197 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11198 { |
|
11199 |
|
11200 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11201 s4o.print("("); |
|
11202 return_type_symbol->accept(*this); |
|
11203 s4o.print(")string_to_int("); |
|
11204 IN_param_value->accept(*this); |
|
11205 s4o.print(", 10)"); |
|
11206 return NULL; |
|
11207 |
|
11208 } |
|
11209 |
|
11210 ERROR; |
|
11211 } |
|
11212 |
|
11213 }/*function_wstring_to_ulint*/ |
|
11214 break; |
|
11215 |
|
11216 /**** |
|
11217 *WSTRING_TO_TIME |
|
11218 */ |
|
11219 case function_wstring_to_time : |
|
11220 { |
|
11221 symbol_c *last_type_symbol = NULL; |
|
11222 |
|
11223 { |
|
11224 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11225 symbol_c *IN_param_value = &this->default_variable_name; |
|
11226 |
|
11227 symbol_c *IN_type_symbol = param_data_type; |
|
11228 last_type_symbol = param_data_type; |
|
11229 |
|
11230 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11231 { |
|
11232 |
|
11233 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
11234 s4o.print("("); |
|
11235 return_type_symbol->accept(*this); |
|
11236 s4o.print(")string_to_time("); |
|
11237 IN_param_value->accept(*this); |
|
11238 s4o.print(")"); |
|
11239 return NULL; |
|
11240 |
|
11241 } |
|
11242 |
|
11243 ERROR; |
|
11244 } |
|
11245 |
|
11246 }/*function_wstring_to_time*/ |
|
11247 break; |
|
11248 |
|
11249 /**** |
|
11250 *WSTRING_TO_BOOL |
|
11251 */ |
|
11252 case function_wstring_to_bool : |
|
11253 { |
|
11254 symbol_c *last_type_symbol = NULL; |
|
11255 |
|
11256 { |
|
11257 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11258 symbol_c *IN_param_value = &this->default_variable_name; |
|
11259 |
|
11260 symbol_c *IN_type_symbol = param_data_type; |
|
11261 last_type_symbol = param_data_type; |
|
11262 |
|
11263 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11264 { |
|
11265 |
|
11266 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11267 s4o.print("("); |
|
11268 return_type_symbol->accept(*this); |
|
11269 s4o.print(")string_to_int("); |
|
11270 IN_param_value->accept(*this); |
|
11271 s4o.print(", 16)"); |
|
11272 return NULL; |
|
11273 |
|
11274 } |
|
11275 |
|
11276 ERROR; |
|
11277 } |
|
11278 |
|
11279 }/*function_wstring_to_bool*/ |
|
11280 break; |
|
11281 |
|
11282 /**** |
|
11283 *WSTRING_TO_BYTE |
|
11284 */ |
|
11285 case function_wstring_to_byte : |
|
11286 { |
|
11287 symbol_c *last_type_symbol = NULL; |
|
11288 |
|
11289 { |
|
11290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11291 symbol_c *IN_param_value = &this->default_variable_name; |
|
11292 |
|
11293 symbol_c *IN_type_symbol = param_data_type; |
|
11294 last_type_symbol = param_data_type; |
|
11295 |
|
11296 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11297 { |
|
11298 |
|
11299 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11300 s4o.print("("); |
|
11301 return_type_symbol->accept(*this); |
|
11302 s4o.print(")string_to_int("); |
|
11303 IN_param_value->accept(*this); |
|
11304 s4o.print(", 16)"); |
|
11305 return NULL; |
|
11306 |
|
11307 } |
|
11308 |
|
11309 ERROR; |
|
11310 } |
|
11311 |
|
11312 }/*function_wstring_to_byte*/ |
|
11313 break; |
|
11314 |
|
11315 /**** |
|
11316 *WSTRING_TO_WORD |
|
11317 */ |
|
11318 case function_wstring_to_word : |
|
11319 { |
|
11320 symbol_c *last_type_symbol = NULL; |
|
11321 |
|
11322 { |
|
11323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11324 symbol_c *IN_param_value = &this->default_variable_name; |
|
11325 |
|
11326 symbol_c *IN_type_symbol = param_data_type; |
|
11327 last_type_symbol = param_data_type; |
|
11328 |
|
11329 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11330 { |
|
11331 |
|
11332 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11333 s4o.print("("); |
|
11334 return_type_symbol->accept(*this); |
|
11335 s4o.print(")string_to_int("); |
|
11336 IN_param_value->accept(*this); |
|
11337 s4o.print(", 16)"); |
|
11338 return NULL; |
|
11339 |
|
11340 } |
|
11341 |
|
11342 ERROR; |
|
11343 } |
|
11344 |
|
11345 }/*function_wstring_to_word*/ |
|
11346 break; |
|
11347 |
|
11348 /**** |
|
11349 *WSTRING_TO_DWORD |
|
11350 */ |
|
11351 case function_wstring_to_dword : |
|
11352 { |
|
11353 symbol_c *last_type_symbol = NULL; |
|
11354 |
|
11355 { |
|
11356 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11357 symbol_c *IN_param_value = &this->default_variable_name; |
|
11358 |
|
11359 symbol_c *IN_type_symbol = param_data_type; |
|
11360 last_type_symbol = param_data_type; |
|
11361 |
|
11362 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11363 { |
|
11364 |
|
11365 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11366 s4o.print("("); |
|
11367 return_type_symbol->accept(*this); |
|
11368 s4o.print(")string_to_int("); |
|
11369 IN_param_value->accept(*this); |
|
11370 s4o.print(", 16)"); |
|
11371 return NULL; |
|
11372 |
|
11373 } |
|
11374 |
|
11375 ERROR; |
|
11376 } |
|
11377 |
|
11378 }/*function_wstring_to_dword*/ |
|
11379 break; |
|
11380 |
|
11381 /**** |
|
11382 *WSTRING_TO_LWORD |
|
11383 */ |
|
11384 case function_wstring_to_lword : |
|
11385 { |
|
11386 symbol_c *last_type_symbol = NULL; |
|
11387 |
|
11388 { |
|
11389 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11390 symbol_c *IN_param_value = &this->default_variable_name; |
|
11391 |
|
11392 symbol_c *IN_type_symbol = param_data_type; |
|
11393 last_type_symbol = param_data_type; |
|
11394 |
|
11395 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11396 { |
|
11397 |
|
11398 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11399 s4o.print("("); |
|
11400 return_type_symbol->accept(*this); |
|
11401 s4o.print(")string_to_int("); |
|
11402 IN_param_value->accept(*this); |
|
11403 s4o.print(", 16)"); |
|
11404 return NULL; |
|
11405 |
|
11406 } |
|
11407 |
|
11408 ERROR; |
|
11409 } |
|
11410 |
|
11411 }/*function_wstring_to_lword*/ |
|
11412 break; |
|
11413 |
|
11414 /**** |
|
11415 *WSTRING_TO_DATE |
|
11416 */ |
|
11417 case function_wstring_to_date : |
|
11418 { |
|
11419 symbol_c *last_type_symbol = NULL; |
|
11420 |
|
11421 { |
|
11422 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11423 symbol_c *IN_param_value = &this->default_variable_name; |
|
11424 |
|
11425 symbol_c *IN_type_symbol = param_data_type; |
|
11426 last_type_symbol = param_data_type; |
|
11427 |
|
11428 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11429 { |
|
11430 |
|
11431 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11432 s4o.print("("); |
|
11433 return_type_symbol->accept(*this); |
|
11434 s4o.print(")string_to_time("); |
|
11435 IN_param_value->accept(*this); |
|
11436 s4o.print(")"); |
|
11437 return NULL; |
|
11438 |
|
11439 } |
|
11440 |
|
11441 ERROR; |
|
11442 } |
|
11443 |
|
11444 }/*function_wstring_to_date*/ |
|
11445 break; |
|
11446 |
|
11447 /**** |
|
11448 *WSTRING_TO_TOD |
|
11449 */ |
|
11450 case function_wstring_to_tod : |
|
11451 { |
|
11452 symbol_c *last_type_symbol = NULL; |
|
11453 |
|
11454 { |
|
11455 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11456 symbol_c *IN_param_value = &this->default_variable_name; |
|
11457 |
|
11458 symbol_c *IN_type_symbol = param_data_type; |
|
11459 last_type_symbol = param_data_type; |
|
11460 |
|
11461 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11462 { |
|
11463 |
|
11464 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11465 s4o.print("("); |
|
11466 return_type_symbol->accept(*this); |
|
11467 s4o.print(")string_to_time("); |
|
11468 IN_param_value->accept(*this); |
|
11469 s4o.print(")"); |
|
11470 return NULL; |
|
11471 |
|
11472 } |
|
11473 |
|
11474 ERROR; |
|
11475 } |
|
11476 |
|
11477 }/*function_wstring_to_tod*/ |
|
11478 break; |
|
11479 |
|
11480 /**** |
|
11481 *WSTRING_TO_DT |
|
11482 */ |
|
11483 case function_wstring_to_dt : |
|
11484 { |
|
11485 symbol_c *last_type_symbol = NULL; |
|
11486 |
|
11487 { |
|
11488 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11489 symbol_c *IN_param_value = &this->default_variable_name; |
|
11490 |
|
11491 symbol_c *IN_type_symbol = param_data_type; |
|
11492 last_type_symbol = param_data_type; |
|
11493 |
|
11494 if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) |
|
11495 { |
|
11496 |
|
11497 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11498 s4o.print("("); |
|
11499 return_type_symbol->accept(*this); |
|
11500 s4o.print(")string_to_time("); |
|
11501 IN_param_value->accept(*this); |
|
11502 s4o.print(")"); |
|
11503 return NULL; |
|
11504 |
|
11505 } |
|
11506 |
|
11507 ERROR; |
|
11508 } |
|
11509 |
|
11510 }/*function_wstring_to_dt*/ |
|
11511 break; |
|
11512 |
|
11513 /**** |
|
11514 *DATE_TO_REAL |
|
11515 */ |
|
11516 case function_date_to_real : |
|
11517 { |
|
11518 symbol_c *last_type_symbol = NULL; |
|
11519 |
|
11520 { |
|
11521 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11522 symbol_c *IN_param_value = &this->default_variable_name; |
|
11523 |
|
11524 symbol_c *IN_type_symbol = param_data_type; |
|
11525 last_type_symbol = param_data_type; |
|
11526 |
|
11527 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11528 { |
|
11529 |
|
11530 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
11531 s4o.print("("); |
|
11532 return_type_symbol->accept(*this); |
|
11533 s4o.print(")time_to_real("); |
|
11534 IN_param_value->accept(*this); |
|
11535 s4o.print(")"); |
|
11536 return NULL; |
|
11537 |
|
11538 } |
|
11539 |
|
11540 ERROR; |
|
11541 } |
|
11542 |
|
11543 }/*function_date_to_real*/ |
|
11544 break; |
|
11545 |
|
11546 /**** |
|
11547 *DATE_TO_LREAL |
|
11548 */ |
|
11549 case function_date_to_lreal : |
|
11550 { |
|
11551 symbol_c *last_type_symbol = NULL; |
|
11552 |
|
11553 { |
|
11554 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11555 symbol_c *IN_param_value = &this->default_variable_name; |
|
11556 |
|
11557 symbol_c *IN_type_symbol = param_data_type; |
|
11558 last_type_symbol = param_data_type; |
|
11559 |
|
11560 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11561 { |
|
11562 |
|
11563 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11564 s4o.print("("); |
|
11565 return_type_symbol->accept(*this); |
|
11566 s4o.print(")time_to_real("); |
|
11567 IN_param_value->accept(*this); |
|
11568 s4o.print(")"); |
|
11569 return NULL; |
|
11570 |
|
11571 } |
|
11572 |
|
11573 ERROR; |
|
11574 } |
|
11575 |
|
11576 }/*function_date_to_lreal*/ |
|
11577 break; |
|
11578 |
|
11579 /**** |
|
11580 *DATE_TO_SINT |
|
11581 */ |
|
11582 case function_date_to_sint : |
|
11583 { |
|
11584 symbol_c *last_type_symbol = NULL; |
|
11585 |
|
11586 { |
|
11587 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11588 symbol_c *IN_param_value = &this->default_variable_name; |
|
11589 |
|
11590 symbol_c *IN_type_symbol = param_data_type; |
|
11591 last_type_symbol = param_data_type; |
|
11592 |
|
11593 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11594 { |
|
11595 |
|
11596 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
11597 s4o.print("("); |
|
11598 return_type_symbol->accept(*this); |
|
11599 s4o.print(")time_to_real("); |
|
11600 IN_param_value->accept(*this); |
|
11601 s4o.print(")"); |
|
11602 return NULL; |
|
11603 |
|
11604 } |
|
11605 |
|
11606 ERROR; |
|
11607 } |
|
11608 |
|
11609 }/*function_date_to_sint*/ |
|
11610 break; |
|
11611 |
|
11612 /**** |
|
11613 *DATE_TO_INT |
|
11614 */ |
|
11615 case function_date_to_int : |
|
11616 { |
|
11617 symbol_c *last_type_symbol = NULL; |
|
11618 |
|
11619 { |
|
11620 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11621 symbol_c *IN_param_value = &this->default_variable_name; |
|
11622 |
|
11623 symbol_c *IN_type_symbol = param_data_type; |
|
11624 last_type_symbol = param_data_type; |
|
11625 |
|
11626 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11627 { |
|
11628 |
|
11629 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11630 s4o.print("("); |
|
11631 return_type_symbol->accept(*this); |
|
11632 s4o.print(")time_to_real("); |
|
11633 IN_param_value->accept(*this); |
|
11634 s4o.print(")"); |
|
11635 return NULL; |
|
11636 |
|
11637 } |
|
11638 |
|
11639 ERROR; |
|
11640 } |
|
11641 |
|
11642 }/*function_date_to_int*/ |
|
11643 break; |
|
11644 |
|
11645 /**** |
|
11646 *DATE_TO_DINT |
|
11647 */ |
|
11648 case function_date_to_dint : |
|
11649 { |
|
11650 symbol_c *last_type_symbol = NULL; |
|
11651 |
|
11652 { |
|
11653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11654 symbol_c *IN_param_value = &this->default_variable_name; |
|
11655 |
|
11656 symbol_c *IN_type_symbol = param_data_type; |
|
11657 last_type_symbol = param_data_type; |
|
11658 |
|
11659 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11660 { |
|
11661 |
|
11662 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
11663 s4o.print("("); |
|
11664 return_type_symbol->accept(*this); |
|
11665 s4o.print(")time_to_real("); |
|
11666 IN_param_value->accept(*this); |
|
11667 s4o.print(")"); |
|
11668 return NULL; |
|
11669 |
|
11670 } |
|
11671 |
|
11672 ERROR; |
|
11673 } |
|
11674 |
|
11675 }/*function_date_to_dint*/ |
|
11676 break; |
|
11677 |
|
11678 /**** |
|
11679 *DATE_TO_LINT |
|
11680 */ |
|
11681 case function_date_to_lint : |
|
11682 { |
|
11683 symbol_c *last_type_symbol = NULL; |
|
11684 |
|
11685 { |
|
11686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11687 symbol_c *IN_param_value = &this->default_variable_name; |
|
11688 |
|
11689 symbol_c *IN_type_symbol = param_data_type; |
|
11690 last_type_symbol = param_data_type; |
|
11691 |
|
11692 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11693 { |
|
11694 |
|
11695 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
11696 s4o.print("("); |
|
11697 return_type_symbol->accept(*this); |
|
11698 s4o.print(")time_to_real("); |
|
11699 IN_param_value->accept(*this); |
|
11700 s4o.print(")"); |
|
11701 return NULL; |
|
11702 |
|
11703 } |
|
11704 |
|
11705 ERROR; |
|
11706 } |
|
11707 |
|
11708 }/*function_date_to_lint*/ |
|
11709 break; |
|
11710 |
|
11711 /**** |
|
11712 *DATE_TO_USINT |
|
11713 */ |
|
11714 case function_date_to_usint : |
|
11715 { |
|
11716 symbol_c *last_type_symbol = NULL; |
|
11717 |
|
11718 { |
|
11719 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11720 symbol_c *IN_param_value = &this->default_variable_name; |
|
11721 |
|
11722 symbol_c *IN_type_symbol = param_data_type; |
|
11723 last_type_symbol = param_data_type; |
|
11724 |
|
11725 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11726 { |
|
11727 |
|
11728 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11729 s4o.print("("); |
|
11730 return_type_symbol->accept(*this); |
|
11731 s4o.print(")time_to_real("); |
|
11732 IN_param_value->accept(*this); |
|
11733 s4o.print(")"); |
|
11734 return NULL; |
|
11735 |
|
11736 } |
|
11737 |
|
11738 ERROR; |
|
11739 } |
|
11740 |
|
11741 }/*function_date_to_usint*/ |
|
11742 break; |
|
11743 |
|
11744 /**** |
|
11745 *DATE_TO_UINT |
|
11746 */ |
|
11747 case function_date_to_uint : |
|
11748 { |
|
11749 symbol_c *last_type_symbol = NULL; |
|
11750 |
|
11751 { |
|
11752 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11753 symbol_c *IN_param_value = &this->default_variable_name; |
|
11754 |
|
11755 symbol_c *IN_type_symbol = param_data_type; |
|
11756 last_type_symbol = param_data_type; |
|
11757 |
|
11758 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11759 { |
|
11760 |
|
11761 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11762 s4o.print("("); |
|
11763 return_type_symbol->accept(*this); |
|
11764 s4o.print(")time_to_real("); |
|
11765 IN_param_value->accept(*this); |
|
11766 s4o.print(")"); |
|
11767 return NULL; |
|
11768 |
|
11769 } |
|
11770 |
|
11771 ERROR; |
|
11772 } |
|
11773 |
|
11774 }/*function_date_to_uint*/ |
|
11775 break; |
|
11776 |
|
11777 /**** |
|
11778 *DATE_TO_UDINT |
|
11779 */ |
|
11780 case function_date_to_udint : |
|
11781 { |
|
11782 symbol_c *last_type_symbol = NULL; |
|
11783 |
|
11784 { |
|
11785 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11786 symbol_c *IN_param_value = &this->default_variable_name; |
|
11787 |
|
11788 symbol_c *IN_type_symbol = param_data_type; |
|
11789 last_type_symbol = param_data_type; |
|
11790 |
|
11791 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11792 { |
|
11793 |
|
11794 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11795 s4o.print("("); |
|
11796 return_type_symbol->accept(*this); |
|
11797 s4o.print(")time_to_real("); |
|
11798 IN_param_value->accept(*this); |
|
11799 s4o.print(")"); |
|
11800 return NULL; |
|
11801 |
|
11802 } |
|
11803 |
|
11804 ERROR; |
|
11805 } |
|
11806 |
|
11807 }/*function_date_to_udint*/ |
|
11808 break; |
|
11809 |
|
11810 /**** |
|
11811 *DATE_TO_ULINT |
|
11812 */ |
|
11813 case function_date_to_ulint : |
|
11814 { |
|
11815 symbol_c *last_type_symbol = NULL; |
|
11816 |
|
11817 { |
|
11818 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11819 symbol_c *IN_param_value = &this->default_variable_name; |
|
11820 |
|
11821 symbol_c *IN_type_symbol = param_data_type; |
|
11822 last_type_symbol = param_data_type; |
|
11823 |
|
11824 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11825 { |
|
11826 |
|
11827 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11828 s4o.print("("); |
|
11829 return_type_symbol->accept(*this); |
|
11830 s4o.print(")time_to_real("); |
|
11831 IN_param_value->accept(*this); |
|
11832 s4o.print(")"); |
|
11833 return NULL; |
|
11834 |
|
11835 } |
|
11836 |
|
11837 ERROR; |
|
11838 } |
|
11839 |
|
11840 }/*function_date_to_ulint*/ |
|
11841 break; |
|
11842 |
|
11843 /**** |
|
11844 *DATE_TO_BOOL |
|
11845 */ |
|
11846 case function_date_to_bool : |
|
11847 { |
|
11848 symbol_c *last_type_symbol = NULL; |
|
11849 |
|
11850 { |
|
11851 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11852 symbol_c *IN_param_value = &this->default_variable_name; |
|
11853 |
|
11854 symbol_c *IN_type_symbol = param_data_type; |
|
11855 last_type_symbol = param_data_type; |
|
11856 |
|
11857 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11858 { |
|
11859 |
|
11860 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11861 s4o.print("("); |
|
11862 return_type_symbol->accept(*this); |
|
11863 s4o.print(")time_to_real("); |
|
11864 IN_param_value->accept(*this); |
|
11865 s4o.print(")"); |
|
11866 return NULL; |
|
11867 |
|
11868 } |
|
11869 |
|
11870 ERROR; |
|
11871 } |
|
11872 |
|
11873 }/*function_date_to_bool*/ |
|
11874 break; |
|
11875 |
|
11876 /**** |
|
11877 *DATE_TO_BYTE |
|
11878 */ |
|
11879 case function_date_to_byte : |
|
11880 { |
|
11881 symbol_c *last_type_symbol = NULL; |
|
11882 |
|
11883 { |
|
11884 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11885 symbol_c *IN_param_value = &this->default_variable_name; |
|
11886 |
|
11887 symbol_c *IN_type_symbol = param_data_type; |
|
11888 last_type_symbol = param_data_type; |
|
11889 |
|
11890 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11891 { |
|
11892 |
|
11893 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11894 s4o.print("("); |
|
11895 return_type_symbol->accept(*this); |
|
11896 s4o.print(")time_to_real("); |
|
11897 IN_param_value->accept(*this); |
|
11898 s4o.print(")"); |
|
11899 return NULL; |
|
11900 |
|
11901 } |
|
11902 |
|
11903 ERROR; |
|
11904 } |
|
11905 |
|
11906 }/*function_date_to_byte*/ |
|
11907 break; |
|
11908 |
|
11909 /**** |
|
11910 *DATE_TO_WORD |
|
11911 */ |
|
11912 case function_date_to_word : |
|
11913 { |
|
11914 symbol_c *last_type_symbol = NULL; |
|
11915 |
|
11916 { |
|
11917 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11918 symbol_c *IN_param_value = &this->default_variable_name; |
|
11919 |
|
11920 symbol_c *IN_type_symbol = param_data_type; |
|
11921 last_type_symbol = param_data_type; |
|
11922 |
|
11923 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11924 { |
|
11925 |
|
11926 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11927 s4o.print("("); |
|
11928 return_type_symbol->accept(*this); |
|
11929 s4o.print(")time_to_real("); |
|
11930 IN_param_value->accept(*this); |
|
11931 s4o.print(")"); |
|
11932 return NULL; |
|
11933 |
|
11934 } |
|
11935 |
|
11936 ERROR; |
|
11937 } |
|
11938 |
|
11939 }/*function_date_to_word*/ |
|
11940 break; |
|
11941 |
|
11942 /**** |
|
11943 *DATE_TO_DWORD |
|
11944 */ |
|
11945 case function_date_to_dword : |
|
11946 { |
|
11947 symbol_c *last_type_symbol = NULL; |
|
11948 |
|
11949 { |
|
11950 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11951 symbol_c *IN_param_value = &this->default_variable_name; |
|
11952 |
|
11953 symbol_c *IN_type_symbol = param_data_type; |
|
11954 last_type_symbol = param_data_type; |
|
11955 |
|
11956 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11957 { |
|
11958 |
|
11959 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11960 s4o.print("("); |
|
11961 return_type_symbol->accept(*this); |
|
11962 s4o.print(")time_to_real("); |
|
11963 IN_param_value->accept(*this); |
|
11964 s4o.print(")"); |
|
11965 return NULL; |
|
11966 |
|
11967 } |
|
11968 |
|
11969 ERROR; |
|
11970 } |
|
11971 |
|
11972 }/*function_date_to_dword*/ |
|
11973 break; |
|
11974 |
|
11975 /**** |
|
11976 *DATE_TO_LWORD |
|
11977 */ |
|
11978 case function_date_to_lword : |
|
11979 { |
|
11980 symbol_c *last_type_symbol = NULL; |
|
11981 |
|
11982 { |
|
11983 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11984 symbol_c *IN_param_value = &this->default_variable_name; |
|
11985 |
|
11986 symbol_c *IN_type_symbol = param_data_type; |
|
11987 last_type_symbol = param_data_type; |
|
11988 |
|
11989 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
11990 { |
|
11991 |
|
11992 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11993 s4o.print("("); |
|
11994 return_type_symbol->accept(*this); |
|
11995 s4o.print(")time_to_real("); |
|
11996 IN_param_value->accept(*this); |
|
11997 s4o.print(")"); |
|
11998 return NULL; |
|
11999 |
|
12000 } |
|
12001 |
|
12002 ERROR; |
|
12003 } |
|
12004 |
|
12005 }/*function_date_to_lword*/ |
|
12006 break; |
|
12007 |
|
12008 /**** |
|
12009 *DATE_TO_STRING |
|
12010 */ |
|
12011 case function_date_to_string : |
|
12012 { |
|
12013 symbol_c *last_type_symbol = NULL; |
|
12014 |
|
12015 { |
|
12016 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12017 symbol_c *IN_param_value = &this->default_variable_name; |
|
12018 |
|
12019 symbol_c *IN_type_symbol = param_data_type; |
|
12020 last_type_symbol = param_data_type; |
|
12021 |
|
12022 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
12023 { |
|
12024 |
|
12025 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
12026 s4o.print("("); |
|
12027 return_type_symbol->accept(*this); |
|
12028 s4o.print(")time_to_string("); |
|
12029 IN_param_value->accept(*this); |
|
12030 s4o.print(")"); |
|
12031 return NULL; |
|
12032 |
|
12033 } |
|
12034 |
|
12035 ERROR; |
|
12036 } |
|
12037 |
|
12038 }/*function_date_to_string*/ |
|
12039 break; |
|
12040 |
|
12041 /**** |
|
12042 *DATE_TO_WSTRING |
|
12043 */ |
|
12044 case function_date_to_wstring : |
|
12045 { |
|
12046 symbol_c *last_type_symbol = NULL; |
|
12047 |
|
12048 { |
|
12049 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12050 symbol_c *IN_param_value = &this->default_variable_name; |
|
12051 |
|
12052 symbol_c *IN_type_symbol = param_data_type; |
|
12053 last_type_symbol = param_data_type; |
|
12054 |
|
12055 if (typeid(*last_type_symbol) == typeid(date_type_name_c)) |
|
12056 { |
|
12057 |
|
12058 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
12059 s4o.print("("); |
|
12060 return_type_symbol->accept(*this); |
|
12061 s4o.print(")time_to_string("); |
|
12062 IN_param_value->accept(*this); |
|
12063 s4o.print(")"); |
|
12064 return NULL; |
|
12065 |
|
12066 } |
|
12067 |
|
12068 ERROR; |
|
12069 } |
|
12070 |
|
12071 }/*function_date_to_wstring*/ |
|
12072 break; |
|
12073 |
|
12074 /**** |
|
12075 *TOD_TO_REAL |
|
12076 */ |
|
12077 case function_tod_to_real : |
|
12078 { |
|
12079 symbol_c *last_type_symbol = NULL; |
|
12080 |
|
12081 { |
|
12082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12083 symbol_c *IN_param_value = &this->default_variable_name; |
|
12084 |
|
12085 symbol_c *IN_type_symbol = param_data_type; |
|
12086 last_type_symbol = param_data_type; |
|
12087 |
|
12088 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12089 { |
|
12090 |
|
12091 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12092 s4o.print("("); |
|
12093 return_type_symbol->accept(*this); |
|
12094 s4o.print(")time_to_real("); |
|
12095 IN_param_value->accept(*this); |
|
12096 s4o.print(")"); |
|
12097 return NULL; |
|
12098 |
|
12099 } |
|
12100 |
|
12101 ERROR; |
|
12102 } |
|
12103 |
|
12104 }/*function_tod_to_real*/ |
|
12105 break; |
|
12106 |
|
12107 /**** |
|
12108 *TOD_TO_LREAL |
|
12109 */ |
|
12110 case function_tod_to_lreal : |
|
12111 { |
|
12112 symbol_c *last_type_symbol = NULL; |
|
12113 |
|
12114 { |
|
12115 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12116 symbol_c *IN_param_value = &this->default_variable_name; |
|
12117 |
|
12118 symbol_c *IN_type_symbol = param_data_type; |
|
12119 last_type_symbol = param_data_type; |
|
12120 |
|
12121 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12122 { |
|
12123 |
|
12124 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
12125 s4o.print("("); |
|
12126 return_type_symbol->accept(*this); |
|
12127 s4o.print(")time_to_real("); |
|
12128 IN_param_value->accept(*this); |
|
12129 s4o.print(")"); |
|
12130 return NULL; |
|
12131 |
|
12132 } |
|
12133 |
|
12134 ERROR; |
|
12135 } |
|
12136 |
|
12137 }/*function_tod_to_lreal*/ |
|
12138 break; |
|
12139 |
|
12140 /**** |
|
12141 *TOD_TO_SINT |
|
12142 */ |
|
12143 case function_tod_to_sint : |
|
12144 { |
|
12145 symbol_c *last_type_symbol = NULL; |
|
12146 |
|
12147 { |
|
12148 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12149 symbol_c *IN_param_value = &this->default_variable_name; |
|
12150 |
|
12151 symbol_c *IN_type_symbol = param_data_type; |
|
12152 last_type_symbol = param_data_type; |
|
12153 |
|
12154 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12155 { |
|
12156 |
|
12157 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12158 s4o.print("("); |
|
12159 return_type_symbol->accept(*this); |
|
12160 s4o.print(")time_to_real("); |
|
12161 IN_param_value->accept(*this); |
|
12162 s4o.print(")"); |
|
12163 return NULL; |
|
12164 |
|
12165 } |
|
12166 |
|
12167 ERROR; |
|
12168 } |
|
12169 |
|
12170 }/*function_tod_to_sint*/ |
|
12171 break; |
|
12172 |
|
12173 /**** |
|
12174 *TOD_TO_INT |
|
12175 */ |
|
12176 case function_tod_to_int : |
|
12177 { |
|
12178 symbol_c *last_type_symbol = NULL; |
|
12179 |
|
12180 { |
|
12181 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12182 symbol_c *IN_param_value = &this->default_variable_name; |
|
12183 |
|
12184 symbol_c *IN_type_symbol = param_data_type; |
|
12185 last_type_symbol = param_data_type; |
|
12186 |
|
12187 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12188 { |
|
12189 |
|
12190 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12191 s4o.print("("); |
|
12192 return_type_symbol->accept(*this); |
|
12193 s4o.print(")time_to_real("); |
|
12194 IN_param_value->accept(*this); |
|
12195 s4o.print(")"); |
|
12196 return NULL; |
|
12197 |
|
12198 } |
|
12199 |
|
12200 ERROR; |
|
12201 } |
|
12202 |
|
12203 }/*function_tod_to_int*/ |
|
12204 break; |
|
12205 |
|
12206 /**** |
|
12207 *TOD_TO_DINT |
|
12208 */ |
|
12209 case function_tod_to_dint : |
|
12210 { |
|
12211 symbol_c *last_type_symbol = NULL; |
|
12212 |
|
12213 { |
|
12214 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12215 symbol_c *IN_param_value = &this->default_variable_name; |
|
12216 |
|
12217 symbol_c *IN_type_symbol = param_data_type; |
|
12218 last_type_symbol = param_data_type; |
|
12219 |
|
12220 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12221 { |
|
12222 |
|
12223 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12224 s4o.print("("); |
|
12225 return_type_symbol->accept(*this); |
|
12226 s4o.print(")time_to_real("); |
|
12227 IN_param_value->accept(*this); |
|
12228 s4o.print(")"); |
|
12229 return NULL; |
|
12230 |
|
12231 } |
|
12232 |
|
12233 ERROR; |
|
12234 } |
|
12235 |
|
12236 }/*function_tod_to_dint*/ |
|
12237 break; |
|
12238 |
|
12239 /**** |
|
12240 *TOD_TO_LINT |
|
12241 */ |
|
12242 case function_tod_to_lint : |
|
12243 { |
|
12244 symbol_c *last_type_symbol = NULL; |
|
12245 |
|
12246 { |
|
12247 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12248 symbol_c *IN_param_value = &this->default_variable_name; |
|
12249 |
|
12250 symbol_c *IN_type_symbol = param_data_type; |
|
12251 last_type_symbol = param_data_type; |
|
12252 |
|
12253 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12254 { |
|
12255 |
|
12256 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12257 s4o.print("("); |
|
12258 return_type_symbol->accept(*this); |
|
12259 s4o.print(")time_to_real("); |
|
12260 IN_param_value->accept(*this); |
|
12261 s4o.print(")"); |
|
12262 return NULL; |
|
12263 |
|
12264 } |
|
12265 |
|
12266 ERROR; |
|
12267 } |
|
12268 |
|
12269 }/*function_tod_to_lint*/ |
|
12270 break; |
|
12271 |
|
12272 /**** |
|
12273 *TOD_TO_USINT |
|
12274 */ |
|
12275 case function_tod_to_usint : |
|
12276 { |
|
12277 symbol_c *last_type_symbol = NULL; |
|
12278 |
|
12279 { |
|
12280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12281 symbol_c *IN_param_value = &this->default_variable_name; |
|
12282 |
|
12283 symbol_c *IN_type_symbol = param_data_type; |
|
12284 last_type_symbol = param_data_type; |
|
12285 |
|
12286 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12287 { |
|
12288 |
|
12289 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
12290 s4o.print("("); |
|
12291 return_type_symbol->accept(*this); |
|
12292 s4o.print(")time_to_real("); |
|
12293 IN_param_value->accept(*this); |
|
12294 s4o.print(")"); |
|
12295 return NULL; |
|
12296 |
|
12297 } |
|
12298 |
|
12299 ERROR; |
|
12300 } |
|
12301 |
|
12302 }/*function_tod_to_usint*/ |
|
12303 break; |
|
12304 |
|
12305 /**** |
|
12306 *TOD_TO_UINT |
|
12307 */ |
|
12308 case function_tod_to_uint : |
|
12309 { |
|
12310 symbol_c *last_type_symbol = NULL; |
|
12311 |
|
12312 { |
|
12313 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12314 symbol_c *IN_param_value = &this->default_variable_name; |
|
12315 |
|
12316 symbol_c *IN_type_symbol = param_data_type; |
|
12317 last_type_symbol = param_data_type; |
|
12318 |
|
12319 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12320 { |
|
12321 |
|
12322 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
12323 s4o.print("("); |
|
12324 return_type_symbol->accept(*this); |
|
12325 s4o.print(")time_to_real("); |
|
12326 IN_param_value->accept(*this); |
|
12327 s4o.print(")"); |
|
12328 return NULL; |
|
12329 |
|
12330 } |
|
12331 |
|
12332 ERROR; |
|
12333 } |
|
12334 |
|
12335 }/*function_tod_to_uint*/ |
|
12336 break; |
|
12337 |
|
12338 /**** |
|
12339 *TOD_TO_UDINT |
|
12340 */ |
|
12341 case function_tod_to_udint : |
|
12342 { |
|
12343 symbol_c *last_type_symbol = NULL; |
|
12344 |
|
12345 { |
|
12346 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12347 symbol_c *IN_param_value = &this->default_variable_name; |
|
12348 |
|
12349 symbol_c *IN_type_symbol = param_data_type; |
|
12350 last_type_symbol = param_data_type; |
|
12351 |
|
12352 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12353 { |
|
12354 |
|
12355 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12356 s4o.print("("); |
|
12357 return_type_symbol->accept(*this); |
|
12358 s4o.print(")time_to_real("); |
|
12359 IN_param_value->accept(*this); |
|
12360 s4o.print(")"); |
|
12361 return NULL; |
|
12362 |
|
12363 } |
|
12364 |
|
12365 ERROR; |
|
12366 } |
|
12367 |
|
12368 }/*function_tod_to_udint*/ |
|
12369 break; |
|
12370 |
|
12371 /**** |
|
12372 *TOD_TO_ULINT |
|
12373 */ |
|
12374 case function_tod_to_ulint : |
|
12375 { |
|
12376 symbol_c *last_type_symbol = NULL; |
|
12377 |
|
12378 { |
|
12379 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12380 symbol_c *IN_param_value = &this->default_variable_name; |
|
12381 |
|
12382 symbol_c *IN_type_symbol = param_data_type; |
|
12383 last_type_symbol = param_data_type; |
|
12384 |
|
12385 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12386 { |
|
12387 |
|
12388 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
12389 s4o.print("("); |
|
12390 return_type_symbol->accept(*this); |
|
12391 s4o.print(")time_to_real("); |
|
12392 IN_param_value->accept(*this); |
|
12393 s4o.print(")"); |
|
12394 return NULL; |
|
12395 |
|
12396 } |
|
12397 |
|
12398 ERROR; |
|
12399 } |
|
12400 |
|
12401 }/*function_tod_to_ulint*/ |
|
12402 break; |
|
12403 |
|
12404 /**** |
|
12405 *TOD_TO_BOOL |
|
12406 */ |
|
12407 case function_tod_to_bool : |
|
12408 { |
|
12409 symbol_c *last_type_symbol = NULL; |
|
12410 |
|
12411 { |
|
12412 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12413 symbol_c *IN_param_value = &this->default_variable_name; |
|
12414 |
|
12415 symbol_c *IN_type_symbol = param_data_type; |
|
12416 last_type_symbol = param_data_type; |
|
12417 |
|
12418 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12419 { |
|
12420 |
|
12421 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
12422 s4o.print("("); |
|
12423 return_type_symbol->accept(*this); |
|
12424 s4o.print(")time_to_real("); |
|
12425 IN_param_value->accept(*this); |
|
12426 s4o.print(")"); |
|
12427 return NULL; |
|
12428 |
|
12429 } |
|
12430 |
|
12431 ERROR; |
|
12432 } |
|
12433 |
|
12434 }/*function_tod_to_bool*/ |
|
12435 break; |
|
12436 |
|
12437 /**** |
|
12438 *TOD_TO_BYTE |
|
12439 */ |
|
12440 case function_tod_to_byte : |
|
12441 { |
|
12442 symbol_c *last_type_symbol = NULL; |
|
12443 |
|
12444 { |
|
12445 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12446 symbol_c *IN_param_value = &this->default_variable_name; |
|
12447 |
|
12448 symbol_c *IN_type_symbol = param_data_type; |
|
12449 last_type_symbol = param_data_type; |
|
12450 |
|
12451 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12452 { |
|
12453 |
|
12454 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
12455 s4o.print("("); |
|
12456 return_type_symbol->accept(*this); |
|
12457 s4o.print(")time_to_real("); |
|
12458 IN_param_value->accept(*this); |
|
12459 s4o.print(")"); |
|
12460 return NULL; |
|
12461 |
|
12462 } |
|
12463 |
|
12464 ERROR; |
|
12465 } |
|
12466 |
|
12467 }/*function_tod_to_byte*/ |
|
12468 break; |
|
12469 |
|
12470 /**** |
|
12471 *TOD_TO_WORD |
|
12472 */ |
|
12473 case function_tod_to_word : |
|
12474 { |
|
12475 symbol_c *last_type_symbol = NULL; |
|
12476 |
|
12477 { |
|
12478 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12479 symbol_c *IN_param_value = &this->default_variable_name; |
|
12480 |
|
12481 symbol_c *IN_type_symbol = param_data_type; |
|
12482 last_type_symbol = param_data_type; |
|
12483 |
|
12484 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12485 { |
|
12486 |
|
12487 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
12488 s4o.print("("); |
|
12489 return_type_symbol->accept(*this); |
|
12490 s4o.print(")time_to_real("); |
|
12491 IN_param_value->accept(*this); |
|
12492 s4o.print(")"); |
|
12493 return NULL; |
|
12494 |
|
12495 } |
|
12496 |
|
12497 ERROR; |
|
12498 } |
|
12499 |
|
12500 }/*function_tod_to_word*/ |
|
12501 break; |
|
12502 |
|
12503 /**** |
|
12504 *TOD_TO_DWORD |
|
12505 */ |
|
12506 case function_tod_to_dword : |
|
12507 { |
|
12508 symbol_c *last_type_symbol = NULL; |
|
12509 |
|
12510 { |
|
12511 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12512 symbol_c *IN_param_value = &this->default_variable_name; |
|
12513 |
|
12514 symbol_c *IN_type_symbol = param_data_type; |
|
12515 last_type_symbol = param_data_type; |
|
12516 |
|
12517 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12518 { |
|
12519 |
|
12520 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
12521 s4o.print("("); |
|
12522 return_type_symbol->accept(*this); |
|
12523 s4o.print(")time_to_real("); |
|
12524 IN_param_value->accept(*this); |
|
12525 s4o.print(")"); |
|
12526 return NULL; |
|
12527 |
|
12528 } |
|
12529 |
|
12530 ERROR; |
|
12531 } |
|
12532 |
|
12533 }/*function_tod_to_dword*/ |
|
12534 break; |
|
12535 |
|
12536 /**** |
|
12537 *TOD_TO_LWORD |
|
12538 */ |
|
12539 case function_tod_to_lword : |
|
12540 { |
|
12541 symbol_c *last_type_symbol = NULL; |
|
12542 |
|
12543 { |
|
12544 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12545 symbol_c *IN_param_value = &this->default_variable_name; |
|
12546 |
|
12547 symbol_c *IN_type_symbol = param_data_type; |
|
12548 last_type_symbol = param_data_type; |
|
12549 |
|
12550 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12551 { |
|
12552 |
|
12553 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
12554 s4o.print("("); |
|
12555 return_type_symbol->accept(*this); |
|
12556 s4o.print(")time_to_real("); |
|
12557 IN_param_value->accept(*this); |
|
12558 s4o.print(")"); |
|
12559 return NULL; |
|
12560 |
|
12561 } |
|
12562 |
|
12563 ERROR; |
|
12564 } |
|
12565 |
|
12566 }/*function_tod_to_lword*/ |
|
12567 break; |
|
12568 |
|
12569 /**** |
|
12570 *TOD_TO_STRING |
|
12571 */ |
|
12572 case function_tod_to_string : |
|
12573 { |
|
12574 symbol_c *last_type_symbol = NULL; |
|
12575 |
|
12576 { |
|
12577 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12578 symbol_c *IN_param_value = &this->default_variable_name; |
|
12579 |
|
12580 symbol_c *IN_type_symbol = param_data_type; |
|
12581 last_type_symbol = param_data_type; |
|
12582 |
|
12583 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12584 { |
|
12585 |
|
12586 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
12587 s4o.print("("); |
|
12588 return_type_symbol->accept(*this); |
|
12589 s4o.print(")time_to_string("); |
|
12590 IN_param_value->accept(*this); |
|
12591 s4o.print(")"); |
|
12592 return NULL; |
|
12593 |
|
12594 } |
|
12595 |
|
12596 ERROR; |
|
12597 } |
|
12598 |
|
12599 }/*function_tod_to_string*/ |
|
12600 break; |
|
12601 |
|
12602 /**** |
|
12603 *TOD_TO_WSTRING |
|
12604 */ |
|
12605 case function_tod_to_wstring : |
|
12606 { |
|
12607 symbol_c *last_type_symbol = NULL; |
|
12608 |
|
12609 { |
|
12610 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12611 symbol_c *IN_param_value = &this->default_variable_name; |
|
12612 |
|
12613 symbol_c *IN_type_symbol = param_data_type; |
|
12614 last_type_symbol = param_data_type; |
|
12615 |
|
12616 if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) |
|
12617 { |
|
12618 |
|
12619 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
12620 s4o.print("("); |
|
12621 return_type_symbol->accept(*this); |
|
12622 s4o.print(")time_to_string("); |
|
12623 IN_param_value->accept(*this); |
|
12624 s4o.print(")"); |
|
12625 return NULL; |
|
12626 |
|
12627 } |
|
12628 |
|
12629 ERROR; |
|
12630 } |
|
12631 |
|
12632 }/*function_tod_to_wstring*/ |
|
12633 break; |
|
12634 |
|
12635 /**** |
|
12636 *DT_TO_REAL |
|
12637 */ |
|
12638 case function_dt_to_real : |
|
12639 { |
|
12640 symbol_c *last_type_symbol = NULL; |
|
12641 |
|
12642 { |
|
12643 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12644 symbol_c *IN_param_value = &this->default_variable_name; |
|
12645 |
|
12646 symbol_c *IN_type_symbol = param_data_type; |
|
12647 last_type_symbol = param_data_type; |
|
12648 |
|
12649 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12650 { |
|
12651 |
|
12652 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12653 s4o.print("("); |
|
12654 return_type_symbol->accept(*this); |
|
12655 s4o.print(")time_to_real("); |
|
12656 IN_param_value->accept(*this); |
|
12657 s4o.print(")"); |
|
12658 return NULL; |
|
12659 |
|
12660 } |
|
12661 |
|
12662 ERROR; |
|
12663 } |
|
12664 |
|
12665 }/*function_dt_to_real*/ |
|
12666 break; |
|
12667 |
|
12668 /**** |
|
12669 *DT_TO_LREAL |
|
12670 */ |
|
12671 case function_dt_to_lreal : |
|
12672 { |
|
12673 symbol_c *last_type_symbol = NULL; |
|
12674 |
|
12675 { |
|
12676 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12677 symbol_c *IN_param_value = &this->default_variable_name; |
|
12678 |
|
12679 symbol_c *IN_type_symbol = param_data_type; |
|
12680 last_type_symbol = param_data_type; |
|
12681 |
|
12682 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12683 { |
|
12684 |
|
12685 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
12686 s4o.print("("); |
|
12687 return_type_symbol->accept(*this); |
|
12688 s4o.print(")time_to_real("); |
|
12689 IN_param_value->accept(*this); |
|
12690 s4o.print(")"); |
|
12691 return NULL; |
|
12692 |
|
12693 } |
|
12694 |
|
12695 ERROR; |
|
12696 } |
|
12697 |
|
12698 }/*function_dt_to_lreal*/ |
|
12699 break; |
|
12700 |
|
12701 /**** |
|
12702 *DT_TO_SINT |
|
12703 */ |
|
12704 case function_dt_to_sint : |
|
12705 { |
|
12706 symbol_c *last_type_symbol = NULL; |
|
12707 |
|
12708 { |
|
12709 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12710 symbol_c *IN_param_value = &this->default_variable_name; |
|
12711 |
|
12712 symbol_c *IN_type_symbol = param_data_type; |
|
12713 last_type_symbol = param_data_type; |
|
12714 |
|
12715 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12716 { |
|
12717 |
|
12718 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12719 s4o.print("("); |
|
12720 return_type_symbol->accept(*this); |
|
12721 s4o.print(")time_to_real("); |
|
12722 IN_param_value->accept(*this); |
|
12723 s4o.print(")"); |
|
12724 return NULL; |
|
12725 |
|
12726 } |
|
12727 |
|
12728 ERROR; |
|
12729 } |
|
12730 |
|
12731 }/*function_dt_to_sint*/ |
|
12732 break; |
|
12733 |
|
12734 /**** |
|
12735 *DT_TO_INT |
|
12736 */ |
|
12737 case function_dt_to_int : |
|
12738 { |
|
12739 symbol_c *last_type_symbol = NULL; |
|
12740 |
|
12741 { |
|
12742 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12743 symbol_c *IN_param_value = &this->default_variable_name; |
|
12744 |
|
12745 symbol_c *IN_type_symbol = param_data_type; |
|
12746 last_type_symbol = param_data_type; |
|
12747 |
|
12748 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12749 { |
|
12750 |
|
12751 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12752 s4o.print("("); |
|
12753 return_type_symbol->accept(*this); |
|
12754 s4o.print(")time_to_real("); |
|
12755 IN_param_value->accept(*this); |
|
12756 s4o.print(")"); |
|
12757 return NULL; |
|
12758 |
|
12759 } |
|
12760 |
|
12761 ERROR; |
|
12762 } |
|
12763 |
|
12764 }/*function_dt_to_int*/ |
|
12765 break; |
|
12766 |
|
12767 /**** |
|
12768 *DT_TO_DINT |
|
12769 */ |
|
12770 case function_dt_to_dint : |
|
12771 { |
|
12772 symbol_c *last_type_symbol = NULL; |
|
12773 |
|
12774 { |
|
12775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12776 symbol_c *IN_param_value = &this->default_variable_name; |
|
12777 |
|
12778 symbol_c *IN_type_symbol = param_data_type; |
|
12779 last_type_symbol = param_data_type; |
|
12780 |
|
12781 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12782 { |
|
12783 |
|
12784 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12785 s4o.print("("); |
|
12786 return_type_symbol->accept(*this); |
|
12787 s4o.print(")time_to_real("); |
|
12788 IN_param_value->accept(*this); |
|
12789 s4o.print(")"); |
|
12790 return NULL; |
|
12791 |
|
12792 } |
|
12793 |
|
12794 ERROR; |
|
12795 } |
|
12796 |
|
12797 }/*function_dt_to_dint*/ |
|
12798 break; |
|
12799 |
|
12800 /**** |
|
12801 *DT_TO_LINT |
|
12802 */ |
|
12803 case function_dt_to_lint : |
|
12804 { |
|
12805 symbol_c *last_type_symbol = NULL; |
|
12806 |
|
12807 { |
|
12808 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12809 symbol_c *IN_param_value = &this->default_variable_name; |
|
12810 |
|
12811 symbol_c *IN_type_symbol = param_data_type; |
|
12812 last_type_symbol = param_data_type; |
|
12813 |
|
12814 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12815 { |
|
12816 |
|
12817 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12818 s4o.print("("); |
|
12819 return_type_symbol->accept(*this); |
|
12820 s4o.print(")time_to_real("); |
|
12821 IN_param_value->accept(*this); |
|
12822 s4o.print(")"); |
|
12823 return NULL; |
|
12824 |
|
12825 } |
|
12826 |
|
12827 ERROR; |
|
12828 } |
|
12829 |
|
12830 }/*function_dt_to_lint*/ |
|
12831 break; |
|
12832 |
|
12833 /**** |
|
12834 *DT_TO_USINT |
|
12835 */ |
|
12836 case function_dt_to_usint : |
|
12837 { |
|
12838 symbol_c *last_type_symbol = NULL; |
|
12839 |
|
12840 { |
|
12841 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12842 symbol_c *IN_param_value = &this->default_variable_name; |
|
12843 |
|
12844 symbol_c *IN_type_symbol = param_data_type; |
|
12845 last_type_symbol = param_data_type; |
|
12846 |
|
12847 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12848 { |
|
12849 |
|
12850 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
12851 s4o.print("("); |
|
12852 return_type_symbol->accept(*this); |
|
12853 s4o.print(")time_to_real("); |
|
12854 IN_param_value->accept(*this); |
|
12855 s4o.print(")"); |
|
12856 return NULL; |
|
12857 |
|
12858 } |
|
12859 |
|
12860 ERROR; |
|
12861 } |
|
12862 |
|
12863 }/*function_dt_to_usint*/ |
|
12864 break; |
|
12865 |
|
12866 /**** |
|
12867 *DT_TO_UINT |
|
12868 */ |
|
12869 case function_dt_to_uint : |
|
12870 { |
|
12871 symbol_c *last_type_symbol = NULL; |
|
12872 |
|
12873 { |
|
12874 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12875 symbol_c *IN_param_value = &this->default_variable_name; |
|
12876 |
|
12877 symbol_c *IN_type_symbol = param_data_type; |
|
12878 last_type_symbol = param_data_type; |
|
12879 |
|
12880 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12881 { |
|
12882 |
|
12883 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
12884 s4o.print("("); |
|
12885 return_type_symbol->accept(*this); |
|
12886 s4o.print(")time_to_real("); |
|
12887 IN_param_value->accept(*this); |
|
12888 s4o.print(")"); |
|
12889 return NULL; |
|
12890 |
|
12891 } |
|
12892 |
|
12893 ERROR; |
|
12894 } |
|
12895 |
|
12896 }/*function_dt_to_uint*/ |
|
12897 break; |
|
12898 |
|
12899 /**** |
|
12900 *DT_TO_UDINT |
|
12901 */ |
|
12902 case function_dt_to_udint : |
|
12903 { |
|
12904 symbol_c *last_type_symbol = NULL; |
|
12905 |
|
12906 { |
|
12907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12908 symbol_c *IN_param_value = &this->default_variable_name; |
|
12909 |
|
12910 symbol_c *IN_type_symbol = param_data_type; |
|
12911 last_type_symbol = param_data_type; |
|
12912 |
|
12913 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12914 { |
|
12915 |
|
12916 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12917 s4o.print("("); |
|
12918 return_type_symbol->accept(*this); |
|
12919 s4o.print(")time_to_real("); |
|
12920 IN_param_value->accept(*this); |
|
12921 s4o.print(")"); |
|
12922 return NULL; |
|
12923 |
|
12924 } |
|
12925 |
|
12926 ERROR; |
|
12927 } |
|
12928 |
|
12929 }/*function_dt_to_udint*/ |
|
12930 break; |
|
12931 |
|
12932 /**** |
|
12933 *DT_TO_ULINT |
|
12934 */ |
|
12935 case function_dt_to_ulint : |
|
12936 { |
|
12937 symbol_c *last_type_symbol = NULL; |
|
12938 |
|
12939 { |
|
12940 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12941 symbol_c *IN_param_value = &this->default_variable_name; |
|
12942 |
|
12943 symbol_c *IN_type_symbol = param_data_type; |
|
12944 last_type_symbol = param_data_type; |
|
12945 |
|
12946 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12947 { |
|
12948 |
|
12949 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
12950 s4o.print("("); |
|
12951 return_type_symbol->accept(*this); |
|
12952 s4o.print(")time_to_real("); |
|
12953 IN_param_value->accept(*this); |
|
12954 s4o.print(")"); |
|
12955 return NULL; |
|
12956 |
|
12957 } |
|
12958 |
|
12959 ERROR; |
|
12960 } |
|
12961 |
|
12962 }/*function_dt_to_ulint*/ |
|
12963 break; |
|
12964 |
|
12965 /**** |
|
12966 *DT_TO_BOOL |
|
12967 */ |
|
12968 case function_dt_to_bool : |
|
12969 { |
|
12970 symbol_c *last_type_symbol = NULL; |
|
12971 |
|
12972 { |
|
12973 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12974 symbol_c *IN_param_value = &this->default_variable_name; |
|
12975 |
|
12976 symbol_c *IN_type_symbol = param_data_type; |
|
12977 last_type_symbol = param_data_type; |
|
12978 |
|
12979 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
12980 { |
|
12981 |
|
12982 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
12983 s4o.print("("); |
|
12984 return_type_symbol->accept(*this); |
|
12985 s4o.print(")time_to_real("); |
|
12986 IN_param_value->accept(*this); |
|
12987 s4o.print(")"); |
|
12988 return NULL; |
|
12989 |
|
12990 } |
|
12991 |
|
12992 ERROR; |
|
12993 } |
|
12994 |
|
12995 }/*function_dt_to_bool*/ |
|
12996 break; |
|
12997 |
|
12998 /**** |
|
12999 *DT_TO_BYTE |
|
13000 */ |
|
13001 case function_dt_to_byte : |
|
13002 { |
|
13003 symbol_c *last_type_symbol = NULL; |
|
13004 |
|
13005 { |
|
13006 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13007 symbol_c *IN_param_value = &this->default_variable_name; |
|
13008 |
|
13009 symbol_c *IN_type_symbol = param_data_type; |
|
13010 last_type_symbol = param_data_type; |
|
13011 |
|
13012 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13013 { |
|
13014 |
|
13015 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
13016 s4o.print("("); |
|
13017 return_type_symbol->accept(*this); |
|
13018 s4o.print(")time_to_real("); |
|
13019 IN_param_value->accept(*this); |
|
13020 s4o.print(")"); |
|
13021 return NULL; |
|
13022 |
|
13023 } |
|
13024 |
|
13025 ERROR; |
|
13026 } |
|
13027 |
|
13028 }/*function_dt_to_byte*/ |
|
13029 break; |
|
13030 |
|
13031 /**** |
|
13032 *DT_TO_WORD |
|
13033 */ |
|
13034 case function_dt_to_word : |
|
13035 { |
|
13036 symbol_c *last_type_symbol = NULL; |
|
13037 |
|
13038 { |
|
13039 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13040 symbol_c *IN_param_value = &this->default_variable_name; |
|
13041 |
|
13042 symbol_c *IN_type_symbol = param_data_type; |
|
13043 last_type_symbol = param_data_type; |
|
13044 |
|
13045 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13046 { |
|
13047 |
|
13048 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
13049 s4o.print("("); |
|
13050 return_type_symbol->accept(*this); |
|
13051 s4o.print(")time_to_real("); |
|
13052 IN_param_value->accept(*this); |
|
13053 s4o.print(")"); |
|
13054 return NULL; |
|
13055 |
|
13056 } |
|
13057 |
|
13058 ERROR; |
|
13059 } |
|
13060 |
|
13061 }/*function_dt_to_word*/ |
|
13062 break; |
|
13063 |
|
13064 /**** |
|
13065 *DT_TO_DWORD |
|
13066 */ |
|
13067 case function_dt_to_dword : |
|
13068 { |
|
13069 symbol_c *last_type_symbol = NULL; |
|
13070 |
|
13071 { |
|
13072 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13073 symbol_c *IN_param_value = &this->default_variable_name; |
|
13074 |
|
13075 symbol_c *IN_type_symbol = param_data_type; |
|
13076 last_type_symbol = param_data_type; |
|
13077 |
|
13078 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13079 { |
|
13080 |
|
13081 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
13082 s4o.print("("); |
|
13083 return_type_symbol->accept(*this); |
|
13084 s4o.print(")time_to_real("); |
|
13085 IN_param_value->accept(*this); |
|
13086 s4o.print(")"); |
|
13087 return NULL; |
|
13088 |
|
13089 } |
|
13090 |
|
13091 ERROR; |
|
13092 } |
|
13093 |
|
13094 }/*function_dt_to_dword*/ |
|
13095 break; |
|
13096 |
|
13097 /**** |
|
13098 *DT_TO_LWORD |
|
13099 */ |
|
13100 case function_dt_to_lword : |
|
13101 { |
|
13102 symbol_c *last_type_symbol = NULL; |
|
13103 |
|
13104 { |
|
13105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13106 symbol_c *IN_param_value = &this->default_variable_name; |
|
13107 |
|
13108 symbol_c *IN_type_symbol = param_data_type; |
|
13109 last_type_symbol = param_data_type; |
|
13110 |
|
13111 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13112 { |
|
13113 |
|
13114 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
13115 s4o.print("("); |
|
13116 return_type_symbol->accept(*this); |
|
13117 s4o.print(")time_to_real("); |
|
13118 IN_param_value->accept(*this); |
|
13119 s4o.print(")"); |
|
13120 return NULL; |
|
13121 |
|
13122 } |
|
13123 |
|
13124 ERROR; |
|
13125 } |
|
13126 |
|
13127 }/*function_dt_to_lword*/ |
|
13128 break; |
|
13129 |
|
13130 /**** |
|
13131 *DT_TO_STRING |
|
13132 */ |
|
13133 case function_dt_to_string : |
|
13134 { |
|
13135 symbol_c *last_type_symbol = NULL; |
|
13136 |
|
13137 { |
|
13138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13139 symbol_c *IN_param_value = &this->default_variable_name; |
|
13140 |
|
13141 symbol_c *IN_type_symbol = param_data_type; |
|
13142 last_type_symbol = param_data_type; |
|
13143 |
|
13144 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13145 { |
|
13146 |
|
13147 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
13148 s4o.print("("); |
|
13149 return_type_symbol->accept(*this); |
|
13150 s4o.print(")time_to_string("); |
|
13151 IN_param_value->accept(*this); |
11930 IN_param_value->accept(*this); |
13152 s4o.print(")"); |
11931 s4o.print(")"); |
13153 return NULL; |
11932 return NULL; |
13154 |
11933 |
13155 } |
11934 } |
13156 |
11935 |
13157 ERROR; |
11936 ERROR; |
13158 } |
11937 } |
13159 |
11938 |
13160 }/*function_dt_to_string*/ |
11939 }/*function_dt_to_string*/ |
13161 break; |
|
13162 |
|
13163 /**** |
|
13164 *DT_TO_WSTRING |
|
13165 */ |
|
13166 case function_dt_to_wstring : |
|
13167 { |
|
13168 symbol_c *last_type_symbol = NULL; |
|
13169 |
|
13170 { |
|
13171 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13172 symbol_c *IN_param_value = &this->default_variable_name; |
|
13173 |
|
13174 symbol_c *IN_type_symbol = param_data_type; |
|
13175 last_type_symbol = param_data_type; |
|
13176 |
|
13177 if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) |
|
13178 { |
|
13179 |
|
13180 symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; |
|
13181 s4o.print("("); |
|
13182 return_type_symbol->accept(*this); |
|
13183 s4o.print(")time_to_string("); |
|
13184 IN_param_value->accept(*this); |
|
13185 s4o.print(")"); |
|
13186 return NULL; |
|
13187 |
|
13188 } |
|
13189 |
|
13190 ERROR; |
|
13191 } |
|
13192 |
|
13193 }/*function_dt_to_wstring*/ |
|
13194 break; |
11940 break; |
13195 |
11941 |
13196 /**** |
11942 /**** |
13197 *TRUNC |
11943 *TRUNC |
13198 */ |
11944 */ |