29 /**** |
29 /**** |
30 *REAL_TO_SINT |
30 *REAL_TO_SINT |
31 */ |
31 */ |
32 case function_real_to_sint : |
32 case function_real_to_sint : |
33 { |
33 { |
|
34 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
35 |
|
36 { |
|
37 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
38 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
39 symbol_c *IN_param_value = &this->default_variable_name; |
|
40 |
|
41 symbol_c *IN_type_symbol = param_data_type; |
|
42 last_type_symbol = param_data_type; |
|
43 |
|
44 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
45 { |
|
46 |
|
47 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
48 |
|
49 if (IN_type_symbol == NULL) |
|
50 IN_type_symbol = last_type_symbol; |
|
51 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
52 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
53 function_type_prefix = return_type_symbol; |
|
54 break; |
|
55 |
|
56 } |
|
57 |
|
58 |
|
59 ERROR; |
|
60 } |
|
61 |
|
62 }/*function_real_to_sint*/ |
|
63 break; |
|
64 |
|
65 /**** |
|
66 *REAL_TO_LINT |
|
67 */ |
|
68 case function_real_to_lint : |
|
69 { |
|
70 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
71 |
|
72 { |
|
73 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
74 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
75 symbol_c *IN_param_value = &this->default_variable_name; |
|
76 |
|
77 symbol_c *IN_type_symbol = param_data_type; |
|
78 last_type_symbol = param_data_type; |
|
79 |
|
80 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
81 { |
|
82 |
|
83 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
84 |
|
85 if (IN_type_symbol == NULL) |
|
86 IN_type_symbol = last_type_symbol; |
|
87 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
88 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
89 function_type_prefix = return_type_symbol; |
|
90 break; |
|
91 |
|
92 } |
|
93 |
|
94 |
|
95 ERROR; |
|
96 } |
|
97 |
|
98 }/*function_real_to_lint*/ |
|
99 break; |
|
100 |
|
101 /**** |
|
102 *REAL_TO_DINT |
|
103 */ |
|
104 case function_real_to_dint : |
|
105 { |
|
106 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
107 |
|
108 { |
|
109 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
110 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
111 symbol_c *IN_param_value = &this->default_variable_name; |
|
112 |
|
113 symbol_c *IN_type_symbol = param_data_type; |
|
114 last_type_symbol = param_data_type; |
|
115 |
|
116 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
117 { |
|
118 |
|
119 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
120 |
|
121 if (IN_type_symbol == NULL) |
|
122 IN_type_symbol = last_type_symbol; |
|
123 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
124 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
125 function_type_prefix = return_type_symbol; |
|
126 break; |
|
127 |
|
128 } |
|
129 |
|
130 |
|
131 ERROR; |
|
132 } |
|
133 |
|
134 }/*function_real_to_dint*/ |
|
135 break; |
|
136 |
|
137 /**** |
|
138 *REAL_TO_DATE |
|
139 */ |
|
140 case function_real_to_date : |
|
141 { |
|
142 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
143 |
|
144 { |
|
145 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
146 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
147 symbol_c *IN_param_value = &this->default_variable_name; |
|
148 |
|
149 symbol_c *IN_type_symbol = param_data_type; |
|
150 last_type_symbol = param_data_type; |
|
151 |
|
152 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
153 { |
|
154 |
|
155 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
156 |
|
157 if (IN_type_symbol == NULL) |
|
158 IN_type_symbol = last_type_symbol; |
|
159 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
160 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
161 function_type_prefix = return_type_symbol; |
|
162 break; |
|
163 |
|
164 } |
|
165 |
|
166 |
|
167 ERROR; |
|
168 } |
|
169 |
|
170 }/*function_real_to_date*/ |
|
171 break; |
|
172 |
|
173 /**** |
|
174 *REAL_TO_DWORD |
|
175 */ |
|
176 case function_real_to_dword : |
|
177 { |
|
178 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
179 |
|
180 { |
|
181 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
182 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
183 symbol_c *IN_param_value = &this->default_variable_name; |
|
184 |
|
185 symbol_c *IN_type_symbol = param_data_type; |
|
186 last_type_symbol = param_data_type; |
|
187 |
|
188 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
189 { |
|
190 |
|
191 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
192 |
|
193 if (IN_type_symbol == NULL) |
|
194 IN_type_symbol = last_type_symbol; |
|
195 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
196 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
197 function_type_prefix = return_type_symbol; |
|
198 break; |
|
199 |
|
200 } |
|
201 |
|
202 |
|
203 ERROR; |
|
204 } |
|
205 |
|
206 }/*function_real_to_dword*/ |
|
207 break; |
|
208 |
|
209 /**** |
|
210 *REAL_TO_DT |
|
211 */ |
|
212 case function_real_to_dt : |
|
213 { |
|
214 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
215 |
|
216 { |
|
217 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
218 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
219 symbol_c *IN_param_value = &this->default_variable_name; |
|
220 |
|
221 symbol_c *IN_type_symbol = param_data_type; |
|
222 last_type_symbol = param_data_type; |
|
223 |
|
224 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
225 { |
|
226 |
|
227 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
228 |
|
229 if (IN_type_symbol == NULL) |
|
230 IN_type_symbol = last_type_symbol; |
|
231 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
232 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
233 function_type_prefix = return_type_symbol; |
|
234 break; |
|
235 |
|
236 } |
|
237 |
|
238 |
|
239 ERROR; |
|
240 } |
|
241 |
|
242 }/*function_real_to_dt*/ |
|
243 break; |
|
244 |
|
245 /**** |
|
246 *REAL_TO_TOD |
|
247 */ |
|
248 case function_real_to_tod : |
|
249 { |
|
250 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
251 |
|
252 { |
|
253 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
254 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
255 symbol_c *IN_param_value = &this->default_variable_name; |
|
256 |
|
257 symbol_c *IN_type_symbol = param_data_type; |
|
258 last_type_symbol = param_data_type; |
|
259 |
|
260 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
261 { |
|
262 |
|
263 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
264 |
|
265 if (IN_type_symbol == NULL) |
|
266 IN_type_symbol = last_type_symbol; |
|
267 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
268 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
269 function_type_prefix = return_type_symbol; |
|
270 break; |
|
271 |
|
272 } |
|
273 |
|
274 |
|
275 ERROR; |
|
276 } |
|
277 |
|
278 }/*function_real_to_tod*/ |
|
279 break; |
|
280 |
|
281 /**** |
|
282 *REAL_TO_UDINT |
|
283 */ |
|
284 case function_real_to_udint : |
|
285 { |
|
286 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
287 |
|
288 { |
|
289 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
291 symbol_c *IN_param_value = &this->default_variable_name; |
|
292 |
|
293 symbol_c *IN_type_symbol = param_data_type; |
|
294 last_type_symbol = param_data_type; |
|
295 |
|
296 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
297 { |
|
298 |
|
299 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
300 |
|
301 if (IN_type_symbol == NULL) |
|
302 IN_type_symbol = last_type_symbol; |
|
303 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
304 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
305 function_type_prefix = return_type_symbol; |
|
306 break; |
|
307 |
|
308 } |
|
309 |
|
310 |
|
311 ERROR; |
|
312 } |
|
313 |
|
314 }/*function_real_to_udint*/ |
|
315 break; |
|
316 |
|
317 /**** |
|
318 *REAL_TO_WORD |
|
319 */ |
|
320 case function_real_to_word : |
|
321 { |
|
322 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
323 |
|
324 { |
|
325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
327 symbol_c *IN_param_value = &this->default_variable_name; |
|
328 |
|
329 symbol_c *IN_type_symbol = param_data_type; |
|
330 last_type_symbol = param_data_type; |
|
331 |
|
332 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
333 { |
|
334 |
|
335 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
336 |
|
337 if (IN_type_symbol == NULL) |
|
338 IN_type_symbol = last_type_symbol; |
|
339 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
340 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
341 function_type_prefix = return_type_symbol; |
|
342 break; |
|
343 |
|
344 } |
|
345 |
|
346 |
|
347 ERROR; |
|
348 } |
|
349 |
|
350 }/*function_real_to_word*/ |
|
351 break; |
|
352 |
|
353 /**** |
|
354 *REAL_TO_STRING |
|
355 */ |
|
356 case function_real_to_string : |
|
357 { |
|
358 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
359 |
|
360 { |
|
361 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
362 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
363 symbol_c *IN_param_value = &this->default_variable_name; |
|
364 |
|
365 symbol_c *IN_type_symbol = param_data_type; |
|
366 last_type_symbol = param_data_type; |
|
367 |
|
368 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
369 { |
|
370 |
|
371 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
372 |
|
373 if (IN_type_symbol == NULL) |
|
374 IN_type_symbol = last_type_symbol; |
|
375 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
376 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
377 function_type_prefix = return_type_symbol; |
|
378 break; |
|
379 |
|
380 } |
|
381 |
|
382 |
|
383 ERROR; |
|
384 } |
|
385 |
|
386 }/*function_real_to_string*/ |
|
387 break; |
|
388 |
|
389 /**** |
|
390 *REAL_TO_LWORD |
|
391 */ |
|
392 case function_real_to_lword : |
|
393 { |
|
394 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
395 |
|
396 { |
|
397 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
398 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
399 symbol_c *IN_param_value = &this->default_variable_name; |
|
400 |
|
401 symbol_c *IN_type_symbol = param_data_type; |
|
402 last_type_symbol = param_data_type; |
|
403 |
|
404 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
405 { |
|
406 |
|
407 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
408 |
|
409 if (IN_type_symbol == NULL) |
|
410 IN_type_symbol = last_type_symbol; |
|
411 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
412 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
413 function_type_prefix = return_type_symbol; |
|
414 break; |
|
415 |
|
416 } |
|
417 |
|
418 |
|
419 ERROR; |
|
420 } |
|
421 |
|
422 }/*function_real_to_lword*/ |
|
423 break; |
|
424 |
|
425 /**** |
|
426 *REAL_TO_UINT |
|
427 */ |
|
428 case function_real_to_uint : |
|
429 { |
|
430 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
431 |
|
432 { |
|
433 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
434 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
435 symbol_c *IN_param_value = &this->default_variable_name; |
|
436 |
|
437 symbol_c *IN_type_symbol = param_data_type; |
|
438 last_type_symbol = param_data_type; |
|
439 |
|
440 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
441 { |
|
442 |
|
443 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
444 |
|
445 if (IN_type_symbol == NULL) |
|
446 IN_type_symbol = last_type_symbol; |
|
447 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
448 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
449 function_type_prefix = return_type_symbol; |
|
450 break; |
|
451 |
|
452 } |
|
453 |
|
454 |
|
455 ERROR; |
|
456 } |
|
457 |
|
458 }/*function_real_to_uint*/ |
|
459 break; |
|
460 |
|
461 /**** |
|
462 *REAL_TO_LREAL |
|
463 */ |
|
464 case function_real_to_lreal : |
|
465 { |
|
466 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
467 |
|
468 { |
|
469 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
470 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
471 symbol_c *IN_param_value = &this->default_variable_name; |
|
472 |
|
473 symbol_c *IN_type_symbol = param_data_type; |
|
474 last_type_symbol = param_data_type; |
|
475 |
|
476 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
477 { |
|
478 |
|
479 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
480 |
|
481 if (IN_type_symbol == NULL) |
|
482 IN_type_symbol = last_type_symbol; |
|
483 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
484 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
485 function_type_prefix = return_type_symbol; |
|
486 function_type_suffix = IN_type_symbol; |
|
487 break; |
|
488 |
|
489 } |
|
490 |
|
491 |
|
492 ERROR; |
|
493 } |
|
494 |
|
495 }/*function_real_to_lreal*/ |
|
496 break; |
|
497 |
|
498 /**** |
|
499 *REAL_TO_BYTE |
|
500 */ |
|
501 case function_real_to_byte : |
|
502 { |
|
503 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
504 |
|
505 { |
|
506 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
507 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
508 symbol_c *IN_param_value = &this->default_variable_name; |
|
509 |
|
510 symbol_c *IN_type_symbol = param_data_type; |
|
511 last_type_symbol = param_data_type; |
|
512 |
|
513 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
514 { |
|
515 |
|
516 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
517 |
|
518 if (IN_type_symbol == NULL) |
|
519 IN_type_symbol = last_type_symbol; |
|
520 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
521 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
522 function_type_prefix = return_type_symbol; |
|
523 break; |
|
524 |
|
525 } |
|
526 |
|
527 |
|
528 ERROR; |
|
529 } |
|
530 |
|
531 }/*function_real_to_byte*/ |
|
532 break; |
|
533 |
|
534 /**** |
|
535 *REAL_TO_USINT |
|
536 */ |
|
537 case function_real_to_usint : |
|
538 { |
|
539 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
540 |
|
541 { |
|
542 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
543 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
544 symbol_c *IN_param_value = &this->default_variable_name; |
|
545 |
|
546 symbol_c *IN_type_symbol = param_data_type; |
|
547 last_type_symbol = param_data_type; |
|
548 |
|
549 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
550 { |
|
551 |
|
552 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
553 |
|
554 if (IN_type_symbol == NULL) |
|
555 IN_type_symbol = last_type_symbol; |
|
556 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
557 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
558 function_type_prefix = return_type_symbol; |
|
559 break; |
|
560 |
|
561 } |
|
562 |
|
563 |
|
564 ERROR; |
|
565 } |
|
566 |
|
567 }/*function_real_to_usint*/ |
|
568 break; |
|
569 |
|
570 /**** |
|
571 *REAL_TO_ULINT |
|
572 */ |
|
573 case function_real_to_ulint : |
|
574 { |
|
575 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
576 |
|
577 { |
|
578 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
579 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
580 symbol_c *IN_param_value = &this->default_variable_name; |
|
581 |
|
582 symbol_c *IN_type_symbol = param_data_type; |
|
583 last_type_symbol = param_data_type; |
|
584 |
|
585 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
586 { |
|
587 |
|
588 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
589 |
|
590 if (IN_type_symbol == NULL) |
|
591 IN_type_symbol = last_type_symbol; |
|
592 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
593 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
594 function_type_prefix = return_type_symbol; |
|
595 break; |
|
596 |
|
597 } |
|
598 |
|
599 |
|
600 ERROR; |
|
601 } |
|
602 |
|
603 }/*function_real_to_ulint*/ |
|
604 break; |
|
605 |
|
606 /**** |
|
607 *REAL_TO_BOOL |
|
608 */ |
|
609 case function_real_to_bool : |
|
610 { |
|
611 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
612 |
|
613 { |
|
614 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
615 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
616 symbol_c *IN_param_value = &this->default_variable_name; |
|
617 |
|
618 symbol_c *IN_type_symbol = param_data_type; |
|
619 last_type_symbol = param_data_type; |
|
620 |
|
621 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
622 { |
|
623 |
|
624 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
625 |
|
626 if (IN_type_symbol == NULL) |
|
627 IN_type_symbol = last_type_symbol; |
|
628 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
629 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
630 function_type_prefix = return_type_symbol; |
|
631 break; |
|
632 |
|
633 } |
|
634 |
|
635 |
|
636 ERROR; |
|
637 } |
|
638 |
|
639 }/*function_real_to_bool*/ |
|
640 break; |
|
641 |
|
642 /**** |
|
643 *REAL_TO_TIME |
|
644 */ |
|
645 case function_real_to_time : |
|
646 { |
|
647 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
648 |
|
649 { |
|
650 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
652 symbol_c *IN_param_value = &this->default_variable_name; |
|
653 |
|
654 symbol_c *IN_type_symbol = param_data_type; |
|
655 last_type_symbol = param_data_type; |
|
656 |
|
657 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
658 { |
|
659 |
|
660 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
661 |
|
662 if (IN_type_symbol == NULL) |
|
663 IN_type_symbol = last_type_symbol; |
|
664 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
665 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
666 function_type_prefix = return_type_symbol; |
|
667 break; |
|
668 |
|
669 } |
|
670 |
|
671 |
|
672 ERROR; |
|
673 } |
|
674 |
|
675 }/*function_real_to_time*/ |
|
676 break; |
|
677 |
|
678 /**** |
|
679 *REAL_TO_INT |
|
680 */ |
|
681 case function_real_to_int : |
|
682 { |
|
683 symbol_c *last_type_symbol = &search_constant_type_c::real_type_name; |
|
684 |
|
685 { |
|
686 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
688 symbol_c *IN_param_value = &this->default_variable_name; |
|
689 |
|
690 symbol_c *IN_type_symbol = param_data_type; |
|
691 last_type_symbol = param_data_type; |
|
692 |
|
693 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
694 { |
|
695 |
|
696 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
697 |
|
698 if (IN_type_symbol == NULL) |
|
699 IN_type_symbol = last_type_symbol; |
|
700 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
701 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
702 function_type_prefix = return_type_symbol; |
|
703 break; |
|
704 |
|
705 } |
|
706 |
|
707 |
|
708 ERROR; |
|
709 } |
|
710 |
|
711 }/*function_real_to_int*/ |
|
712 break; |
|
713 |
|
714 /**** |
|
715 *SINT_TO_REAL |
|
716 */ |
|
717 case function_sint_to_real : |
|
718 { |
|
719 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
720 |
|
721 { |
|
722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
724 symbol_c *IN_param_value = &this->default_variable_name; |
|
725 |
|
726 symbol_c *IN_type_symbol = param_data_type; |
|
727 last_type_symbol = param_data_type; |
|
728 |
|
729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
730 { |
|
731 |
|
732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
733 |
|
734 if (IN_type_symbol == NULL) |
|
735 IN_type_symbol = last_type_symbol; |
|
736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
737 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
738 function_type_prefix = return_type_symbol; |
|
739 function_type_suffix = IN_type_symbol; |
|
740 break; |
|
741 |
|
742 } |
|
743 |
|
744 |
|
745 ERROR; |
|
746 } |
|
747 |
|
748 }/*function_sint_to_real*/ |
|
749 break; |
|
750 |
|
751 /**** |
|
752 *SINT_TO_LINT |
|
753 */ |
|
754 case function_sint_to_lint : |
|
755 { |
|
756 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
757 |
|
758 { |
|
759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
761 symbol_c *IN_param_value = &this->default_variable_name; |
|
762 |
|
763 symbol_c *IN_type_symbol = param_data_type; |
|
764 last_type_symbol = param_data_type; |
|
765 |
|
766 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
767 { |
|
768 |
|
769 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
770 |
|
771 if (IN_type_symbol == NULL) |
|
772 IN_type_symbol = last_type_symbol; |
|
773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
774 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
775 function_type_prefix = return_type_symbol; |
|
776 function_type_suffix = IN_type_symbol; |
|
777 break; |
|
778 |
|
779 } |
|
780 |
|
781 |
|
782 ERROR; |
|
783 } |
|
784 |
|
785 }/*function_sint_to_lint*/ |
|
786 break; |
|
787 |
|
788 /**** |
|
789 *SINT_TO_DINT |
|
790 */ |
|
791 case function_sint_to_dint : |
|
792 { |
|
793 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
794 |
|
795 { |
|
796 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
798 symbol_c *IN_param_value = &this->default_variable_name; |
|
799 |
|
800 symbol_c *IN_type_symbol = param_data_type; |
|
801 last_type_symbol = param_data_type; |
|
802 |
|
803 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
804 { |
|
805 |
|
806 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
807 |
|
808 if (IN_type_symbol == NULL) |
|
809 IN_type_symbol = last_type_symbol; |
|
810 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
811 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
812 function_type_prefix = return_type_symbol; |
|
813 function_type_suffix = IN_type_symbol; |
|
814 break; |
|
815 |
|
816 } |
|
817 |
|
818 |
|
819 ERROR; |
|
820 } |
|
821 |
|
822 }/*function_sint_to_dint*/ |
|
823 break; |
|
824 |
|
825 /**** |
|
826 *SINT_TO_DATE |
|
827 */ |
|
828 case function_sint_to_date : |
|
829 { |
|
830 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
831 |
|
832 { |
|
833 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
834 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
835 symbol_c *IN_param_value = &this->default_variable_name; |
|
836 |
|
837 symbol_c *IN_type_symbol = param_data_type; |
|
838 last_type_symbol = param_data_type; |
|
839 |
|
840 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
841 { |
|
842 |
|
843 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
844 |
|
845 if (IN_type_symbol == NULL) |
|
846 IN_type_symbol = last_type_symbol; |
|
847 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
848 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
849 function_type_prefix = return_type_symbol; |
|
850 break; |
|
851 |
|
852 } |
|
853 |
|
854 |
|
855 ERROR; |
|
856 } |
|
857 |
|
858 }/*function_sint_to_date*/ |
|
859 break; |
|
860 |
|
861 /**** |
|
862 *SINT_TO_DWORD |
|
863 */ |
|
864 case function_sint_to_dword : |
|
865 { |
|
866 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
867 |
|
868 { |
|
869 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
871 symbol_c *IN_param_value = &this->default_variable_name; |
|
872 |
|
873 symbol_c *IN_type_symbol = param_data_type; |
|
874 last_type_symbol = param_data_type; |
|
875 |
|
876 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
877 { |
|
878 |
|
879 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
880 |
|
881 if (IN_type_symbol == NULL) |
|
882 IN_type_symbol = last_type_symbol; |
|
883 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
884 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
885 function_type_prefix = return_type_symbol; |
|
886 function_type_suffix = IN_type_symbol; |
|
887 break; |
|
888 |
|
889 } |
|
890 |
|
891 |
|
892 ERROR; |
|
893 } |
|
894 |
|
895 }/*function_sint_to_dword*/ |
|
896 break; |
|
897 |
|
898 /**** |
|
899 *SINT_TO_DT |
|
900 */ |
|
901 case function_sint_to_dt : |
|
902 { |
|
903 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
904 |
|
905 { |
|
906 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
908 symbol_c *IN_param_value = &this->default_variable_name; |
|
909 |
|
910 symbol_c *IN_type_symbol = param_data_type; |
|
911 last_type_symbol = param_data_type; |
|
912 |
|
913 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
914 { |
|
915 |
|
916 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
917 |
|
918 if (IN_type_symbol == NULL) |
|
919 IN_type_symbol = last_type_symbol; |
|
920 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
921 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
922 function_type_prefix = return_type_symbol; |
|
923 break; |
|
924 |
|
925 } |
|
926 |
|
927 |
|
928 ERROR; |
|
929 } |
|
930 |
|
931 }/*function_sint_to_dt*/ |
|
932 break; |
|
933 |
|
934 /**** |
|
935 *SINT_TO_TOD |
|
936 */ |
|
937 case function_sint_to_tod : |
|
938 { |
|
939 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
940 |
|
941 { |
|
942 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
943 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
944 symbol_c *IN_param_value = &this->default_variable_name; |
|
945 |
|
946 symbol_c *IN_type_symbol = param_data_type; |
|
947 last_type_symbol = param_data_type; |
|
948 |
|
949 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
950 { |
|
951 |
|
952 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
953 |
|
954 if (IN_type_symbol == NULL) |
|
955 IN_type_symbol = last_type_symbol; |
|
956 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
957 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
958 function_type_prefix = return_type_symbol; |
|
959 break; |
|
960 |
|
961 } |
|
962 |
|
963 |
|
964 ERROR; |
|
965 } |
|
966 |
|
967 }/*function_sint_to_tod*/ |
|
968 break; |
|
969 |
|
970 /**** |
|
971 *SINT_TO_UDINT |
|
972 */ |
|
973 case function_sint_to_udint : |
|
974 { |
|
975 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
976 |
|
977 { |
|
978 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
979 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
980 symbol_c *IN_param_value = &this->default_variable_name; |
|
981 |
|
982 symbol_c *IN_type_symbol = param_data_type; |
|
983 last_type_symbol = param_data_type; |
|
984 |
|
985 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
986 { |
|
987 |
|
988 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
989 |
|
990 if (IN_type_symbol == NULL) |
|
991 IN_type_symbol = last_type_symbol; |
|
992 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
993 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
994 function_type_prefix = return_type_symbol; |
|
995 function_type_suffix = IN_type_symbol; |
|
996 break; |
|
997 |
|
998 } |
|
999 |
|
1000 |
|
1001 ERROR; |
|
1002 } |
|
1003 |
|
1004 }/*function_sint_to_udint*/ |
|
1005 break; |
|
1006 |
|
1007 /**** |
|
1008 *SINT_TO_WORD |
|
1009 */ |
|
1010 case function_sint_to_word : |
|
1011 { |
|
1012 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1013 |
|
1014 { |
|
1015 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1016 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1017 symbol_c *IN_param_value = &this->default_variable_name; |
|
1018 |
|
1019 symbol_c *IN_type_symbol = param_data_type; |
|
1020 last_type_symbol = param_data_type; |
|
1021 |
|
1022 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1023 { |
|
1024 |
|
1025 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1026 |
|
1027 if (IN_type_symbol == NULL) |
|
1028 IN_type_symbol = last_type_symbol; |
|
1029 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1030 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1031 function_type_prefix = return_type_symbol; |
|
1032 function_type_suffix = IN_type_symbol; |
|
1033 break; |
|
1034 |
|
1035 } |
|
1036 |
|
1037 |
|
1038 ERROR; |
|
1039 } |
|
1040 |
|
1041 }/*function_sint_to_word*/ |
|
1042 break; |
|
1043 |
|
1044 /**** |
|
1045 *SINT_TO_STRING |
|
1046 */ |
|
1047 case function_sint_to_string : |
|
1048 { |
|
1049 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1050 |
|
1051 { |
|
1052 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1053 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1054 symbol_c *IN_param_value = &this->default_variable_name; |
|
1055 |
|
1056 symbol_c *IN_type_symbol = param_data_type; |
|
1057 last_type_symbol = param_data_type; |
|
1058 |
|
1059 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1060 { |
|
1061 |
|
1062 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1063 |
|
1064 if (IN_type_symbol == NULL) |
|
1065 IN_type_symbol = last_type_symbol; |
|
1066 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1067 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1068 function_type_prefix = return_type_symbol; |
|
1069 break; |
|
1070 |
|
1071 } |
|
1072 |
|
1073 |
|
1074 ERROR; |
|
1075 } |
|
1076 |
|
1077 }/*function_sint_to_string*/ |
|
1078 break; |
|
1079 |
|
1080 /**** |
|
1081 *SINT_TO_LWORD |
|
1082 */ |
|
1083 case function_sint_to_lword : |
|
1084 { |
|
1085 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1086 |
|
1087 { |
|
1088 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1089 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1090 symbol_c *IN_param_value = &this->default_variable_name; |
|
1091 |
|
1092 symbol_c *IN_type_symbol = param_data_type; |
|
1093 last_type_symbol = param_data_type; |
|
1094 |
|
1095 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1096 { |
|
1097 |
|
1098 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1099 |
|
1100 if (IN_type_symbol == NULL) |
|
1101 IN_type_symbol = last_type_symbol; |
|
1102 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1103 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1104 function_type_prefix = return_type_symbol; |
|
1105 function_type_suffix = IN_type_symbol; |
|
1106 break; |
|
1107 |
|
1108 } |
|
1109 |
|
1110 |
|
1111 ERROR; |
|
1112 } |
|
1113 |
|
1114 }/*function_sint_to_lword*/ |
|
1115 break; |
|
1116 |
|
1117 /**** |
|
1118 *SINT_TO_UINT |
|
1119 */ |
|
1120 case function_sint_to_uint : |
|
1121 { |
|
1122 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1123 |
|
1124 { |
|
1125 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1127 symbol_c *IN_param_value = &this->default_variable_name; |
|
1128 |
|
1129 symbol_c *IN_type_symbol = param_data_type; |
|
1130 last_type_symbol = param_data_type; |
|
1131 |
|
1132 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1133 { |
|
1134 |
|
1135 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1136 |
|
1137 if (IN_type_symbol == NULL) |
|
1138 IN_type_symbol = last_type_symbol; |
|
1139 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1140 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1141 function_type_prefix = return_type_symbol; |
|
1142 function_type_suffix = IN_type_symbol; |
|
1143 break; |
|
1144 |
|
1145 } |
|
1146 |
|
1147 |
|
1148 ERROR; |
|
1149 } |
|
1150 |
|
1151 }/*function_sint_to_uint*/ |
|
1152 break; |
|
1153 |
|
1154 /**** |
|
1155 *SINT_TO_LREAL |
|
1156 */ |
|
1157 case function_sint_to_lreal : |
|
1158 { |
|
1159 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1160 |
|
1161 { |
|
1162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1164 symbol_c *IN_param_value = &this->default_variable_name; |
|
1165 |
|
1166 symbol_c *IN_type_symbol = param_data_type; |
|
1167 last_type_symbol = param_data_type; |
|
1168 |
|
1169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1170 { |
|
1171 |
|
1172 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1173 |
|
1174 if (IN_type_symbol == NULL) |
|
1175 IN_type_symbol = last_type_symbol; |
|
1176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1177 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1178 function_type_prefix = return_type_symbol; |
|
1179 function_type_suffix = IN_type_symbol; |
|
1180 break; |
|
1181 |
|
1182 } |
|
1183 |
|
1184 |
|
1185 ERROR; |
|
1186 } |
|
1187 |
|
1188 }/*function_sint_to_lreal*/ |
|
1189 break; |
|
1190 |
|
1191 /**** |
|
1192 *SINT_TO_BYTE |
|
1193 */ |
|
1194 case function_sint_to_byte : |
|
1195 { |
|
1196 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1197 |
|
1198 { |
|
1199 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1201 symbol_c *IN_param_value = &this->default_variable_name; |
|
1202 |
|
1203 symbol_c *IN_type_symbol = param_data_type; |
|
1204 last_type_symbol = param_data_type; |
|
1205 |
|
1206 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1207 { |
|
1208 |
|
1209 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1210 |
|
1211 if (IN_type_symbol == NULL) |
|
1212 IN_type_symbol = last_type_symbol; |
|
1213 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1214 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1215 function_type_prefix = return_type_symbol; |
|
1216 function_type_suffix = IN_type_symbol; |
|
1217 break; |
|
1218 |
|
1219 } |
|
1220 |
|
1221 |
|
1222 ERROR; |
|
1223 } |
|
1224 |
|
1225 }/*function_sint_to_byte*/ |
|
1226 break; |
|
1227 |
|
1228 /**** |
|
1229 *SINT_TO_USINT |
|
1230 */ |
|
1231 case function_sint_to_usint : |
|
1232 { |
|
1233 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1234 |
|
1235 { |
|
1236 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1237 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1238 symbol_c *IN_param_value = &this->default_variable_name; |
|
1239 |
|
1240 symbol_c *IN_type_symbol = param_data_type; |
|
1241 last_type_symbol = param_data_type; |
|
1242 |
|
1243 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1244 { |
|
1245 |
|
1246 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1247 |
|
1248 if (IN_type_symbol == NULL) |
|
1249 IN_type_symbol = last_type_symbol; |
|
1250 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1251 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1252 function_type_prefix = return_type_symbol; |
|
1253 function_type_suffix = IN_type_symbol; |
|
1254 break; |
|
1255 |
|
1256 } |
|
1257 |
|
1258 |
|
1259 ERROR; |
|
1260 } |
|
1261 |
|
1262 }/*function_sint_to_usint*/ |
|
1263 break; |
|
1264 |
|
1265 /**** |
|
1266 *SINT_TO_ULINT |
|
1267 */ |
|
1268 case function_sint_to_ulint : |
|
1269 { |
|
1270 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1271 |
|
1272 { |
|
1273 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1274 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1275 symbol_c *IN_param_value = &this->default_variable_name; |
|
1276 |
|
1277 symbol_c *IN_type_symbol = param_data_type; |
|
1278 last_type_symbol = param_data_type; |
|
1279 |
|
1280 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1281 { |
|
1282 |
|
1283 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1284 |
|
1285 if (IN_type_symbol == NULL) |
|
1286 IN_type_symbol = last_type_symbol; |
|
1287 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1288 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1289 function_type_prefix = return_type_symbol; |
|
1290 function_type_suffix = IN_type_symbol; |
|
1291 break; |
|
1292 |
|
1293 } |
|
1294 |
|
1295 |
|
1296 ERROR; |
|
1297 } |
|
1298 |
|
1299 }/*function_sint_to_ulint*/ |
|
1300 break; |
|
1301 |
|
1302 /**** |
|
1303 *SINT_TO_BOOL |
|
1304 */ |
|
1305 case function_sint_to_bool : |
|
1306 { |
|
1307 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1308 |
|
1309 { |
|
1310 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1312 symbol_c *IN_param_value = &this->default_variable_name; |
|
1313 |
|
1314 symbol_c *IN_type_symbol = param_data_type; |
|
1315 last_type_symbol = param_data_type; |
|
1316 |
|
1317 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1318 { |
|
1319 |
|
1320 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1321 |
|
1322 if (IN_type_symbol == NULL) |
|
1323 IN_type_symbol = last_type_symbol; |
|
1324 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1325 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1326 function_type_prefix = return_type_symbol; |
|
1327 function_type_suffix = IN_type_symbol; |
|
1328 break; |
|
1329 |
|
1330 } |
|
1331 |
|
1332 |
|
1333 ERROR; |
|
1334 } |
|
1335 |
|
1336 }/*function_sint_to_bool*/ |
|
1337 break; |
|
1338 |
|
1339 /**** |
|
1340 *SINT_TO_TIME |
|
1341 */ |
|
1342 case function_sint_to_time : |
|
1343 { |
|
1344 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1345 |
|
1346 { |
|
1347 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1348 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1349 symbol_c *IN_param_value = &this->default_variable_name; |
|
1350 |
|
1351 symbol_c *IN_type_symbol = param_data_type; |
|
1352 last_type_symbol = param_data_type; |
|
1353 |
|
1354 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1355 { |
|
1356 |
|
1357 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1358 |
|
1359 if (IN_type_symbol == NULL) |
|
1360 IN_type_symbol = last_type_symbol; |
|
1361 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1362 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1363 function_type_prefix = return_type_symbol; |
|
1364 break; |
|
1365 |
|
1366 } |
|
1367 |
|
1368 |
|
1369 ERROR; |
|
1370 } |
|
1371 |
|
1372 }/*function_sint_to_time*/ |
|
1373 break; |
|
1374 |
|
1375 /**** |
|
1376 *SINT_TO_INT |
|
1377 */ |
|
1378 case function_sint_to_int : |
|
1379 { |
|
1380 symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name; |
|
1381 |
|
1382 { |
|
1383 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1384 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1385 symbol_c *IN_param_value = &this->default_variable_name; |
|
1386 |
|
1387 symbol_c *IN_type_symbol = param_data_type; |
|
1388 last_type_symbol = param_data_type; |
|
1389 |
|
1390 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1391 { |
|
1392 |
|
1393 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1394 |
|
1395 if (IN_type_symbol == NULL) |
|
1396 IN_type_symbol = last_type_symbol; |
|
1397 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1398 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
1399 function_type_prefix = return_type_symbol; |
|
1400 function_type_suffix = IN_type_symbol; |
|
1401 break; |
|
1402 |
|
1403 } |
|
1404 |
|
1405 |
|
1406 ERROR; |
|
1407 } |
|
1408 |
|
1409 }/*function_sint_to_int*/ |
|
1410 break; |
|
1411 |
|
1412 /**** |
|
1413 *LINT_TO_REAL |
|
1414 */ |
|
1415 case function_lint_to_real : |
|
1416 { |
|
1417 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1418 |
|
1419 { |
|
1420 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1422 symbol_c *IN_param_value = &this->default_variable_name; |
|
1423 |
|
1424 symbol_c *IN_type_symbol = param_data_type; |
|
1425 last_type_symbol = param_data_type; |
|
1426 |
|
1427 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1428 { |
|
1429 |
|
1430 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1431 |
|
1432 if (IN_type_symbol == NULL) |
|
1433 IN_type_symbol = last_type_symbol; |
|
1434 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1435 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
1436 function_type_prefix = return_type_symbol; |
|
1437 function_type_suffix = IN_type_symbol; |
|
1438 break; |
|
1439 |
|
1440 } |
|
1441 |
|
1442 |
|
1443 ERROR; |
|
1444 } |
|
1445 |
|
1446 }/*function_lint_to_real*/ |
|
1447 break; |
|
1448 |
|
1449 /**** |
|
1450 *LINT_TO_SINT |
|
1451 */ |
|
1452 case function_lint_to_sint : |
|
1453 { |
|
1454 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1455 |
|
1456 { |
|
1457 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1459 symbol_c *IN_param_value = &this->default_variable_name; |
|
1460 |
|
1461 symbol_c *IN_type_symbol = param_data_type; |
|
1462 last_type_symbol = param_data_type; |
|
1463 |
|
1464 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1465 { |
|
1466 |
|
1467 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1468 |
|
1469 if (IN_type_symbol == NULL) |
|
1470 IN_type_symbol = last_type_symbol; |
|
1471 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1472 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1473 function_type_prefix = return_type_symbol; |
|
1474 function_type_suffix = IN_type_symbol; |
|
1475 break; |
|
1476 |
|
1477 } |
|
1478 |
|
1479 |
|
1480 ERROR; |
|
1481 } |
|
1482 |
|
1483 }/*function_lint_to_sint*/ |
|
1484 break; |
|
1485 |
|
1486 /**** |
|
1487 *LINT_TO_DINT |
|
1488 */ |
|
1489 case function_lint_to_dint : |
|
1490 { |
|
1491 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1492 |
|
1493 { |
|
1494 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1495 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1496 symbol_c *IN_param_value = &this->default_variable_name; |
|
1497 |
|
1498 symbol_c *IN_type_symbol = param_data_type; |
|
1499 last_type_symbol = param_data_type; |
|
1500 |
|
1501 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1502 { |
|
1503 |
|
1504 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1505 |
|
1506 if (IN_type_symbol == NULL) |
|
1507 IN_type_symbol = last_type_symbol; |
|
1508 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1509 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
1510 function_type_prefix = return_type_symbol; |
|
1511 function_type_suffix = IN_type_symbol; |
|
1512 break; |
|
1513 |
|
1514 } |
|
1515 |
|
1516 |
|
1517 ERROR; |
|
1518 } |
|
1519 |
|
1520 }/*function_lint_to_dint*/ |
|
1521 break; |
|
1522 |
|
1523 /**** |
|
1524 *LINT_TO_DATE |
|
1525 */ |
|
1526 case function_lint_to_date : |
|
1527 { |
|
1528 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1529 |
|
1530 { |
|
1531 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1532 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1533 symbol_c *IN_param_value = &this->default_variable_name; |
|
1534 |
|
1535 symbol_c *IN_type_symbol = param_data_type; |
|
1536 last_type_symbol = param_data_type; |
|
1537 |
|
1538 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1539 { |
|
1540 |
|
1541 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1542 |
|
1543 if (IN_type_symbol == NULL) |
|
1544 IN_type_symbol = last_type_symbol; |
|
1545 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1546 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1547 function_type_prefix = return_type_symbol; |
|
1548 break; |
|
1549 |
|
1550 } |
|
1551 |
|
1552 |
|
1553 ERROR; |
|
1554 } |
|
1555 |
|
1556 }/*function_lint_to_date*/ |
|
1557 break; |
|
1558 |
|
1559 /**** |
|
1560 *LINT_TO_DWORD |
|
1561 */ |
|
1562 case function_lint_to_dword : |
|
1563 { |
|
1564 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1565 |
|
1566 { |
|
1567 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1568 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1569 symbol_c *IN_param_value = &this->default_variable_name; |
|
1570 |
|
1571 symbol_c *IN_type_symbol = param_data_type; |
|
1572 last_type_symbol = param_data_type; |
|
1573 |
|
1574 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1575 { |
|
1576 |
|
1577 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1578 |
|
1579 if (IN_type_symbol == NULL) |
|
1580 IN_type_symbol = last_type_symbol; |
|
1581 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1582 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1583 function_type_prefix = return_type_symbol; |
|
1584 function_type_suffix = IN_type_symbol; |
|
1585 break; |
|
1586 |
|
1587 } |
|
1588 |
|
1589 |
|
1590 ERROR; |
|
1591 } |
|
1592 |
|
1593 }/*function_lint_to_dword*/ |
|
1594 break; |
|
1595 |
|
1596 /**** |
|
1597 *LINT_TO_DT |
|
1598 */ |
|
1599 case function_lint_to_dt : |
|
1600 { |
|
1601 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1602 |
|
1603 { |
|
1604 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1605 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1606 symbol_c *IN_param_value = &this->default_variable_name; |
|
1607 |
|
1608 symbol_c *IN_type_symbol = param_data_type; |
|
1609 last_type_symbol = param_data_type; |
|
1610 |
|
1611 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1612 { |
|
1613 |
|
1614 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1615 |
|
1616 if (IN_type_symbol == NULL) |
|
1617 IN_type_symbol = last_type_symbol; |
|
1618 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1619 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1620 function_type_prefix = return_type_symbol; |
|
1621 break; |
|
1622 |
|
1623 } |
|
1624 |
|
1625 |
|
1626 ERROR; |
|
1627 } |
|
1628 |
|
1629 }/*function_lint_to_dt*/ |
|
1630 break; |
|
1631 |
|
1632 /**** |
|
1633 *LINT_TO_TOD |
|
1634 */ |
|
1635 case function_lint_to_tod : |
|
1636 { |
|
1637 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1638 |
|
1639 { |
|
1640 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1642 symbol_c *IN_param_value = &this->default_variable_name; |
|
1643 |
|
1644 symbol_c *IN_type_symbol = param_data_type; |
|
1645 last_type_symbol = param_data_type; |
|
1646 |
|
1647 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1648 { |
|
1649 |
|
1650 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1651 |
|
1652 if (IN_type_symbol == NULL) |
|
1653 IN_type_symbol = last_type_symbol; |
|
1654 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1655 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1656 function_type_prefix = return_type_symbol; |
|
1657 break; |
|
1658 |
|
1659 } |
|
1660 |
|
1661 |
|
1662 ERROR; |
|
1663 } |
|
1664 |
|
1665 }/*function_lint_to_tod*/ |
|
1666 break; |
|
1667 |
|
1668 /**** |
|
1669 *LINT_TO_UDINT |
|
1670 */ |
|
1671 case function_lint_to_udint : |
|
1672 { |
|
1673 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1674 |
|
1675 { |
|
1676 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1677 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1678 symbol_c *IN_param_value = &this->default_variable_name; |
|
1679 |
|
1680 symbol_c *IN_type_symbol = param_data_type; |
|
1681 last_type_symbol = param_data_type; |
|
1682 |
|
1683 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1684 { |
|
1685 |
|
1686 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1687 |
|
1688 if (IN_type_symbol == NULL) |
|
1689 IN_type_symbol = last_type_symbol; |
|
1690 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1691 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
1692 function_type_prefix = return_type_symbol; |
|
1693 function_type_suffix = IN_type_symbol; |
|
1694 break; |
|
1695 |
|
1696 } |
|
1697 |
|
1698 |
|
1699 ERROR; |
|
1700 } |
|
1701 |
|
1702 }/*function_lint_to_udint*/ |
|
1703 break; |
|
1704 |
|
1705 /**** |
|
1706 *LINT_TO_WORD |
|
1707 */ |
|
1708 case function_lint_to_word : |
|
1709 { |
|
1710 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1711 |
|
1712 { |
|
1713 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1714 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1715 symbol_c *IN_param_value = &this->default_variable_name; |
|
1716 |
|
1717 symbol_c *IN_type_symbol = param_data_type; |
|
1718 last_type_symbol = param_data_type; |
|
1719 |
|
1720 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1721 { |
|
1722 |
|
1723 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1724 |
|
1725 if (IN_type_symbol == NULL) |
|
1726 IN_type_symbol = last_type_symbol; |
|
1727 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1728 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1729 function_type_prefix = return_type_symbol; |
|
1730 function_type_suffix = IN_type_symbol; |
|
1731 break; |
|
1732 |
|
1733 } |
|
1734 |
|
1735 |
|
1736 ERROR; |
|
1737 } |
|
1738 |
|
1739 }/*function_lint_to_word*/ |
|
1740 break; |
|
1741 |
|
1742 /**** |
|
1743 *LINT_TO_STRING |
|
1744 */ |
|
1745 case function_lint_to_string : |
|
1746 { |
|
1747 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1748 |
|
1749 { |
|
1750 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1751 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1752 symbol_c *IN_param_value = &this->default_variable_name; |
|
1753 |
|
1754 symbol_c *IN_type_symbol = param_data_type; |
|
1755 last_type_symbol = param_data_type; |
|
1756 |
|
1757 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1758 { |
|
1759 |
|
1760 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1761 |
|
1762 if (IN_type_symbol == NULL) |
|
1763 IN_type_symbol = last_type_symbol; |
|
1764 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1765 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1766 function_type_prefix = return_type_symbol; |
|
1767 break; |
|
1768 |
|
1769 } |
|
1770 |
|
1771 |
|
1772 ERROR; |
|
1773 } |
|
1774 |
|
1775 }/*function_lint_to_string*/ |
|
1776 break; |
|
1777 |
|
1778 /**** |
|
1779 *LINT_TO_LWORD |
|
1780 */ |
|
1781 case function_lint_to_lword : |
|
1782 { |
|
1783 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1784 |
|
1785 { |
|
1786 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1787 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1788 symbol_c *IN_param_value = &this->default_variable_name; |
|
1789 |
|
1790 symbol_c *IN_type_symbol = param_data_type; |
|
1791 last_type_symbol = param_data_type; |
|
1792 |
|
1793 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1794 { |
|
1795 |
|
1796 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1797 |
|
1798 if (IN_type_symbol == NULL) |
|
1799 IN_type_symbol = last_type_symbol; |
|
1800 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1801 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1802 function_type_prefix = return_type_symbol; |
|
1803 function_type_suffix = IN_type_symbol; |
|
1804 break; |
|
1805 |
|
1806 } |
|
1807 |
|
1808 |
|
1809 ERROR; |
|
1810 } |
|
1811 |
|
1812 }/*function_lint_to_lword*/ |
|
1813 break; |
|
1814 |
|
1815 /**** |
|
1816 *LINT_TO_UINT |
|
1817 */ |
|
1818 case function_lint_to_uint : |
|
1819 { |
|
1820 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1821 |
|
1822 { |
|
1823 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1824 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1825 symbol_c *IN_param_value = &this->default_variable_name; |
|
1826 |
|
1827 symbol_c *IN_type_symbol = param_data_type; |
|
1828 last_type_symbol = param_data_type; |
|
1829 |
|
1830 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1831 { |
|
1832 |
|
1833 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1834 |
|
1835 if (IN_type_symbol == NULL) |
|
1836 IN_type_symbol = last_type_symbol; |
|
1837 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1838 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1839 function_type_prefix = return_type_symbol; |
|
1840 function_type_suffix = IN_type_symbol; |
|
1841 break; |
|
1842 |
|
1843 } |
|
1844 |
|
1845 |
|
1846 ERROR; |
|
1847 } |
|
1848 |
|
1849 }/*function_lint_to_uint*/ |
|
1850 break; |
|
1851 |
|
1852 /**** |
|
1853 *LINT_TO_LREAL |
|
1854 */ |
|
1855 case function_lint_to_lreal : |
|
1856 { |
|
1857 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1858 |
|
1859 { |
|
1860 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1861 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1862 symbol_c *IN_param_value = &this->default_variable_name; |
|
1863 |
|
1864 symbol_c *IN_type_symbol = param_data_type; |
|
1865 last_type_symbol = param_data_type; |
|
1866 |
|
1867 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1868 { |
|
1869 |
|
1870 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1871 |
|
1872 if (IN_type_symbol == NULL) |
|
1873 IN_type_symbol = last_type_symbol; |
|
1874 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1875 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1876 function_type_prefix = return_type_symbol; |
|
1877 function_type_suffix = IN_type_symbol; |
|
1878 break; |
|
1879 |
|
1880 } |
|
1881 |
|
1882 |
|
1883 ERROR; |
|
1884 } |
|
1885 |
|
1886 }/*function_lint_to_lreal*/ |
|
1887 break; |
|
1888 |
|
1889 /**** |
|
1890 *LINT_TO_BYTE |
|
1891 */ |
|
1892 case function_lint_to_byte : |
|
1893 { |
|
1894 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1895 |
|
1896 { |
|
1897 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1898 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1899 symbol_c *IN_param_value = &this->default_variable_name; |
|
1900 |
|
1901 symbol_c *IN_type_symbol = param_data_type; |
|
1902 last_type_symbol = param_data_type; |
|
1903 |
|
1904 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1905 { |
|
1906 |
|
1907 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1908 |
|
1909 if (IN_type_symbol == NULL) |
|
1910 IN_type_symbol = last_type_symbol; |
|
1911 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1912 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1913 function_type_prefix = return_type_symbol; |
|
1914 function_type_suffix = IN_type_symbol; |
|
1915 break; |
|
1916 |
|
1917 } |
|
1918 |
|
1919 |
|
1920 ERROR; |
|
1921 } |
|
1922 |
|
1923 }/*function_lint_to_byte*/ |
|
1924 break; |
|
1925 |
|
1926 /**** |
|
1927 *LINT_TO_USINT |
|
1928 */ |
|
1929 case function_lint_to_usint : |
|
1930 { |
|
1931 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1932 |
|
1933 { |
|
1934 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1935 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1936 symbol_c *IN_param_value = &this->default_variable_name; |
|
1937 |
|
1938 symbol_c *IN_type_symbol = param_data_type; |
|
1939 last_type_symbol = param_data_type; |
|
1940 |
|
1941 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1942 { |
|
1943 |
|
1944 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1945 |
|
1946 if (IN_type_symbol == NULL) |
|
1947 IN_type_symbol = last_type_symbol; |
|
1948 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1949 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1950 function_type_prefix = return_type_symbol; |
|
1951 function_type_suffix = IN_type_symbol; |
|
1952 break; |
|
1953 |
|
1954 } |
|
1955 |
|
1956 |
|
1957 ERROR; |
|
1958 } |
|
1959 |
|
1960 }/*function_lint_to_usint*/ |
|
1961 break; |
|
1962 |
|
1963 /**** |
|
1964 *LINT_TO_ULINT |
|
1965 */ |
|
1966 case function_lint_to_ulint : |
|
1967 { |
|
1968 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
1969 |
|
1970 { |
|
1971 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1973 symbol_c *IN_param_value = &this->default_variable_name; |
|
1974 |
|
1975 symbol_c *IN_type_symbol = param_data_type; |
|
1976 last_type_symbol = param_data_type; |
|
1977 |
|
1978 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1979 { |
|
1980 |
|
1981 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1982 |
|
1983 if (IN_type_symbol == NULL) |
|
1984 IN_type_symbol = last_type_symbol; |
|
1985 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1986 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1987 function_type_prefix = return_type_symbol; |
|
1988 function_type_suffix = IN_type_symbol; |
|
1989 break; |
|
1990 |
|
1991 } |
|
1992 |
|
1993 |
|
1994 ERROR; |
|
1995 } |
|
1996 |
|
1997 }/*function_lint_to_ulint*/ |
|
1998 break; |
|
1999 |
|
2000 /**** |
|
2001 *LINT_TO_BOOL |
|
2002 */ |
|
2003 case function_lint_to_bool : |
|
2004 { |
|
2005 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
2006 |
|
2007 { |
|
2008 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2009 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2010 symbol_c *IN_param_value = &this->default_variable_name; |
|
2011 |
|
2012 symbol_c *IN_type_symbol = param_data_type; |
|
2013 last_type_symbol = param_data_type; |
|
2014 |
|
2015 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2016 { |
|
2017 |
|
2018 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2019 |
|
2020 if (IN_type_symbol == NULL) |
|
2021 IN_type_symbol = last_type_symbol; |
|
2022 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2023 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2024 function_type_prefix = return_type_symbol; |
|
2025 function_type_suffix = IN_type_symbol; |
|
2026 break; |
|
2027 |
|
2028 } |
|
2029 |
|
2030 |
|
2031 ERROR; |
|
2032 } |
|
2033 |
|
2034 }/*function_lint_to_bool*/ |
|
2035 break; |
|
2036 |
|
2037 /**** |
|
2038 *LINT_TO_TIME |
|
2039 */ |
|
2040 case function_lint_to_time : |
|
2041 { |
|
2042 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
2043 |
|
2044 { |
|
2045 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2046 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2047 symbol_c *IN_param_value = &this->default_variable_name; |
|
2048 |
|
2049 symbol_c *IN_type_symbol = param_data_type; |
|
2050 last_type_symbol = param_data_type; |
|
2051 |
|
2052 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2053 { |
|
2054 |
|
2055 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2056 |
|
2057 if (IN_type_symbol == NULL) |
|
2058 IN_type_symbol = last_type_symbol; |
|
2059 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2060 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2061 function_type_prefix = return_type_symbol; |
|
2062 break; |
|
2063 |
|
2064 } |
|
2065 |
|
2066 |
|
2067 ERROR; |
|
2068 } |
|
2069 |
|
2070 }/*function_lint_to_time*/ |
|
2071 break; |
|
2072 |
|
2073 /**** |
|
2074 *LINT_TO_INT |
|
2075 */ |
|
2076 case function_lint_to_int : |
|
2077 { |
|
2078 symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name; |
|
2079 |
|
2080 { |
|
2081 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2083 symbol_c *IN_param_value = &this->default_variable_name; |
|
2084 |
|
2085 symbol_c *IN_type_symbol = param_data_type; |
|
2086 last_type_symbol = param_data_type; |
|
2087 |
|
2088 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2089 { |
|
2090 |
|
2091 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2092 |
|
2093 if (IN_type_symbol == NULL) |
|
2094 IN_type_symbol = last_type_symbol; |
|
2095 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2096 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2097 function_type_prefix = return_type_symbol; |
|
2098 function_type_suffix = IN_type_symbol; |
|
2099 break; |
|
2100 |
|
2101 } |
|
2102 |
|
2103 |
|
2104 ERROR; |
|
2105 } |
|
2106 |
|
2107 }/*function_lint_to_int*/ |
|
2108 break; |
|
2109 |
|
2110 /**** |
|
2111 *DINT_TO_REAL |
|
2112 */ |
|
2113 case function_dint_to_real : |
|
2114 { |
|
2115 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2116 |
|
2117 { |
|
2118 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2119 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2120 symbol_c *IN_param_value = &this->default_variable_name; |
|
2121 |
|
2122 symbol_c *IN_type_symbol = param_data_type; |
|
2123 last_type_symbol = param_data_type; |
|
2124 |
|
2125 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2126 { |
|
2127 |
|
2128 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2129 |
|
2130 if (IN_type_symbol == NULL) |
|
2131 IN_type_symbol = last_type_symbol; |
|
2132 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2133 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2134 function_type_prefix = return_type_symbol; |
|
2135 function_type_suffix = IN_type_symbol; |
|
2136 break; |
|
2137 |
|
2138 } |
|
2139 |
|
2140 |
|
2141 ERROR; |
|
2142 } |
|
2143 |
|
2144 }/*function_dint_to_real*/ |
|
2145 break; |
|
2146 |
|
2147 /**** |
|
2148 *DINT_TO_SINT |
|
2149 */ |
|
2150 case function_dint_to_sint : |
|
2151 { |
|
2152 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2153 |
|
2154 { |
|
2155 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2156 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2157 symbol_c *IN_param_value = &this->default_variable_name; |
|
2158 |
|
2159 symbol_c *IN_type_symbol = param_data_type; |
|
2160 last_type_symbol = param_data_type; |
|
2161 |
|
2162 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2163 { |
|
2164 |
|
2165 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2166 |
|
2167 if (IN_type_symbol == NULL) |
|
2168 IN_type_symbol = last_type_symbol; |
|
2169 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2170 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2171 function_type_prefix = return_type_symbol; |
|
2172 function_type_suffix = IN_type_symbol; |
|
2173 break; |
|
2174 |
|
2175 } |
|
2176 |
|
2177 |
|
2178 ERROR; |
|
2179 } |
|
2180 |
|
2181 }/*function_dint_to_sint*/ |
|
2182 break; |
|
2183 |
|
2184 /**** |
|
2185 *DINT_TO_LINT |
|
2186 */ |
|
2187 case function_dint_to_lint : |
|
2188 { |
|
2189 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2190 |
|
2191 { |
|
2192 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2193 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2194 symbol_c *IN_param_value = &this->default_variable_name; |
|
2195 |
|
2196 symbol_c *IN_type_symbol = param_data_type; |
|
2197 last_type_symbol = param_data_type; |
|
2198 |
|
2199 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2200 { |
|
2201 |
|
2202 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2203 |
|
2204 if (IN_type_symbol == NULL) |
|
2205 IN_type_symbol = last_type_symbol; |
|
2206 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2207 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2208 function_type_prefix = return_type_symbol; |
|
2209 function_type_suffix = IN_type_symbol; |
|
2210 break; |
|
2211 |
|
2212 } |
|
2213 |
|
2214 |
|
2215 ERROR; |
|
2216 } |
|
2217 |
|
2218 }/*function_dint_to_lint*/ |
|
2219 break; |
|
2220 |
|
2221 /**** |
|
2222 *DINT_TO_DATE |
|
2223 */ |
|
2224 case function_dint_to_date : |
|
2225 { |
|
2226 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2227 |
|
2228 { |
|
2229 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2231 symbol_c *IN_param_value = &this->default_variable_name; |
|
2232 |
|
2233 symbol_c *IN_type_symbol = param_data_type; |
|
2234 last_type_symbol = param_data_type; |
|
2235 |
|
2236 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2237 { |
|
2238 |
|
2239 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2240 |
|
2241 if (IN_type_symbol == NULL) |
|
2242 IN_type_symbol = last_type_symbol; |
|
2243 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2244 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
2245 function_type_prefix = return_type_symbol; |
|
2246 break; |
|
2247 |
|
2248 } |
|
2249 |
|
2250 |
|
2251 ERROR; |
|
2252 } |
|
2253 |
|
2254 }/*function_dint_to_date*/ |
|
2255 break; |
|
2256 |
|
2257 /**** |
|
2258 *DINT_TO_DWORD |
|
2259 */ |
|
2260 case function_dint_to_dword : |
|
2261 { |
|
2262 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2263 |
|
2264 { |
|
2265 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2267 symbol_c *IN_param_value = &this->default_variable_name; |
|
2268 |
|
2269 symbol_c *IN_type_symbol = param_data_type; |
|
2270 last_type_symbol = param_data_type; |
|
2271 |
|
2272 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2273 { |
|
2274 |
|
2275 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2276 |
|
2277 if (IN_type_symbol == NULL) |
|
2278 IN_type_symbol = last_type_symbol; |
|
2279 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2280 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2281 function_type_prefix = return_type_symbol; |
|
2282 function_type_suffix = IN_type_symbol; |
|
2283 break; |
|
2284 |
|
2285 } |
|
2286 |
|
2287 |
|
2288 ERROR; |
|
2289 } |
|
2290 |
|
2291 }/*function_dint_to_dword*/ |
|
2292 break; |
|
2293 |
|
2294 /**** |
|
2295 *DINT_TO_DT |
|
2296 */ |
|
2297 case function_dint_to_dt : |
|
2298 { |
|
2299 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2300 |
|
2301 { |
|
2302 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2303 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2304 symbol_c *IN_param_value = &this->default_variable_name; |
|
2305 |
|
2306 symbol_c *IN_type_symbol = param_data_type; |
|
2307 last_type_symbol = param_data_type; |
|
2308 |
|
2309 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2310 { |
|
2311 |
|
2312 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2313 |
|
2314 if (IN_type_symbol == NULL) |
|
2315 IN_type_symbol = last_type_symbol; |
|
2316 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2317 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
2318 function_type_prefix = return_type_symbol; |
|
2319 break; |
|
2320 |
|
2321 } |
|
2322 |
|
2323 |
|
2324 ERROR; |
|
2325 } |
|
2326 |
|
2327 }/*function_dint_to_dt*/ |
|
2328 break; |
|
2329 |
|
2330 /**** |
|
2331 *DINT_TO_TOD |
|
2332 */ |
|
2333 case function_dint_to_tod : |
|
2334 { |
|
2335 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2336 |
|
2337 { |
|
2338 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2339 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2340 symbol_c *IN_param_value = &this->default_variable_name; |
|
2341 |
|
2342 symbol_c *IN_type_symbol = param_data_type; |
|
2343 last_type_symbol = param_data_type; |
|
2344 |
|
2345 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2346 { |
|
2347 |
|
2348 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2349 |
|
2350 if (IN_type_symbol == NULL) |
|
2351 IN_type_symbol = last_type_symbol; |
|
2352 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2353 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2354 function_type_prefix = return_type_symbol; |
|
2355 break; |
|
2356 |
|
2357 } |
|
2358 |
|
2359 |
|
2360 ERROR; |
|
2361 } |
|
2362 |
|
2363 }/*function_dint_to_tod*/ |
|
2364 break; |
|
2365 |
|
2366 /**** |
|
2367 *DINT_TO_UDINT |
|
2368 */ |
|
2369 case function_dint_to_udint : |
|
2370 { |
|
2371 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2372 |
|
2373 { |
|
2374 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2375 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2376 symbol_c *IN_param_value = &this->default_variable_name; |
|
2377 |
|
2378 symbol_c *IN_type_symbol = param_data_type; |
|
2379 last_type_symbol = param_data_type; |
|
2380 |
|
2381 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2382 { |
|
2383 |
|
2384 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2385 |
|
2386 if (IN_type_symbol == NULL) |
|
2387 IN_type_symbol = last_type_symbol; |
|
2388 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2389 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2390 function_type_prefix = return_type_symbol; |
|
2391 function_type_suffix = IN_type_symbol; |
|
2392 break; |
|
2393 |
|
2394 } |
|
2395 |
|
2396 |
|
2397 ERROR; |
|
2398 } |
|
2399 |
|
2400 }/*function_dint_to_udint*/ |
|
2401 break; |
|
2402 |
|
2403 /**** |
|
2404 *DINT_TO_WORD |
|
2405 */ |
|
2406 case function_dint_to_word : |
|
2407 { |
|
2408 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2409 |
|
2410 { |
|
2411 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2412 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2413 symbol_c *IN_param_value = &this->default_variable_name; |
|
2414 |
|
2415 symbol_c *IN_type_symbol = param_data_type; |
|
2416 last_type_symbol = param_data_type; |
|
2417 |
|
2418 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2419 { |
|
2420 |
|
2421 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2422 |
|
2423 if (IN_type_symbol == NULL) |
|
2424 IN_type_symbol = last_type_symbol; |
|
2425 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2426 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2427 function_type_prefix = return_type_symbol; |
|
2428 function_type_suffix = IN_type_symbol; |
|
2429 break; |
|
2430 |
|
2431 } |
|
2432 |
|
2433 |
|
2434 ERROR; |
|
2435 } |
|
2436 |
|
2437 }/*function_dint_to_word*/ |
|
2438 break; |
|
2439 |
|
2440 /**** |
|
2441 *DINT_TO_STRING |
|
2442 */ |
|
2443 case function_dint_to_string : |
|
2444 { |
|
2445 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2446 |
|
2447 { |
|
2448 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2449 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2450 symbol_c *IN_param_value = &this->default_variable_name; |
|
2451 |
|
2452 symbol_c *IN_type_symbol = param_data_type; |
|
2453 last_type_symbol = param_data_type; |
|
2454 |
|
2455 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2456 { |
|
2457 |
|
2458 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
2459 |
|
2460 if (IN_type_symbol == NULL) |
|
2461 IN_type_symbol = last_type_symbol; |
|
2462 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2463 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2464 function_type_prefix = return_type_symbol; |
|
2465 break; |
|
2466 |
|
2467 } |
|
2468 |
|
2469 |
|
2470 ERROR; |
|
2471 } |
|
2472 |
|
2473 }/*function_dint_to_string*/ |
|
2474 break; |
|
2475 |
|
2476 /**** |
|
2477 *DINT_TO_LWORD |
|
2478 */ |
|
2479 case function_dint_to_lword : |
|
2480 { |
|
2481 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2482 |
|
2483 { |
|
2484 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2485 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2486 symbol_c *IN_param_value = &this->default_variable_name; |
|
2487 |
|
2488 symbol_c *IN_type_symbol = param_data_type; |
|
2489 last_type_symbol = param_data_type; |
|
2490 |
|
2491 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2492 { |
|
2493 |
|
2494 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2495 |
|
2496 if (IN_type_symbol == NULL) |
|
2497 IN_type_symbol = last_type_symbol; |
|
2498 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2499 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
2500 function_type_prefix = return_type_symbol; |
|
2501 function_type_suffix = IN_type_symbol; |
|
2502 break; |
|
2503 |
|
2504 } |
|
2505 |
|
2506 |
|
2507 ERROR; |
|
2508 } |
|
2509 |
|
2510 }/*function_dint_to_lword*/ |
|
2511 break; |
|
2512 |
|
2513 /**** |
|
2514 *DINT_TO_UINT |
|
2515 */ |
|
2516 case function_dint_to_uint : |
|
2517 { |
|
2518 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2519 |
|
2520 { |
|
2521 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2522 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2523 symbol_c *IN_param_value = &this->default_variable_name; |
|
2524 |
|
2525 symbol_c *IN_type_symbol = param_data_type; |
|
2526 last_type_symbol = param_data_type; |
|
2527 |
|
2528 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2529 { |
|
2530 |
|
2531 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2532 |
|
2533 if (IN_type_symbol == NULL) |
|
2534 IN_type_symbol = last_type_symbol; |
|
2535 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2536 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2537 function_type_prefix = return_type_symbol; |
|
2538 function_type_suffix = IN_type_symbol; |
|
2539 break; |
|
2540 |
|
2541 } |
|
2542 |
|
2543 |
|
2544 ERROR; |
|
2545 } |
|
2546 |
|
2547 }/*function_dint_to_uint*/ |
|
2548 break; |
|
2549 |
|
2550 /**** |
|
2551 *DINT_TO_LREAL |
|
2552 */ |
|
2553 case function_dint_to_lreal : |
|
2554 { |
|
2555 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2556 |
|
2557 { |
|
2558 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2560 symbol_c *IN_param_value = &this->default_variable_name; |
|
2561 |
|
2562 symbol_c *IN_type_symbol = param_data_type; |
|
2563 last_type_symbol = param_data_type; |
|
2564 |
|
2565 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2566 { |
|
2567 |
|
2568 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2569 |
|
2570 if (IN_type_symbol == NULL) |
|
2571 IN_type_symbol = last_type_symbol; |
|
2572 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2573 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2574 function_type_prefix = return_type_symbol; |
|
2575 function_type_suffix = IN_type_symbol; |
|
2576 break; |
|
2577 |
|
2578 } |
|
2579 |
|
2580 |
|
2581 ERROR; |
|
2582 } |
|
2583 |
|
2584 }/*function_dint_to_lreal*/ |
|
2585 break; |
|
2586 |
|
2587 /**** |
|
2588 *DINT_TO_BYTE |
|
2589 */ |
|
2590 case function_dint_to_byte : |
|
2591 { |
|
2592 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2593 |
|
2594 { |
|
2595 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2596 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2597 symbol_c *IN_param_value = &this->default_variable_name; |
|
2598 |
|
2599 symbol_c *IN_type_symbol = param_data_type; |
|
2600 last_type_symbol = param_data_type; |
|
2601 |
|
2602 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2603 { |
|
2604 |
|
2605 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2606 |
|
2607 if (IN_type_symbol == NULL) |
|
2608 IN_type_symbol = last_type_symbol; |
|
2609 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2610 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2611 function_type_prefix = return_type_symbol; |
|
2612 function_type_suffix = IN_type_symbol; |
|
2613 break; |
|
2614 |
|
2615 } |
|
2616 |
|
2617 |
|
2618 ERROR; |
|
2619 } |
|
2620 |
|
2621 }/*function_dint_to_byte*/ |
|
2622 break; |
|
2623 |
|
2624 /**** |
|
2625 *DINT_TO_USINT |
|
2626 */ |
|
2627 case function_dint_to_usint : |
|
2628 { |
|
2629 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2630 |
|
2631 { |
|
2632 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2633 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2634 symbol_c *IN_param_value = &this->default_variable_name; |
|
2635 |
|
2636 symbol_c *IN_type_symbol = param_data_type; |
|
2637 last_type_symbol = param_data_type; |
|
2638 |
|
2639 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2640 { |
|
2641 |
|
2642 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2643 |
|
2644 if (IN_type_symbol == NULL) |
|
2645 IN_type_symbol = last_type_symbol; |
|
2646 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2647 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2648 function_type_prefix = return_type_symbol; |
|
2649 function_type_suffix = IN_type_symbol; |
|
2650 break; |
|
2651 |
|
2652 } |
|
2653 |
|
2654 |
|
2655 ERROR; |
|
2656 } |
|
2657 |
|
2658 }/*function_dint_to_usint*/ |
|
2659 break; |
|
2660 |
|
2661 /**** |
|
2662 *DINT_TO_ULINT |
|
2663 */ |
|
2664 case function_dint_to_ulint : |
|
2665 { |
|
2666 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2667 |
|
2668 { |
|
2669 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2670 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2671 symbol_c *IN_param_value = &this->default_variable_name; |
|
2672 |
|
2673 symbol_c *IN_type_symbol = param_data_type; |
|
2674 last_type_symbol = param_data_type; |
|
2675 |
|
2676 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2677 { |
|
2678 |
|
2679 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2680 |
|
2681 if (IN_type_symbol == NULL) |
|
2682 IN_type_symbol = last_type_symbol; |
|
2683 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2684 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2685 function_type_prefix = return_type_symbol; |
|
2686 function_type_suffix = IN_type_symbol; |
|
2687 break; |
|
2688 |
|
2689 } |
|
2690 |
|
2691 |
|
2692 ERROR; |
|
2693 } |
|
2694 |
|
2695 }/*function_dint_to_ulint*/ |
|
2696 break; |
|
2697 |
|
2698 /**** |
|
2699 *DINT_TO_BOOL |
|
2700 */ |
|
2701 case function_dint_to_bool : |
|
2702 { |
|
2703 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2704 |
|
2705 { |
|
2706 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2707 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2708 symbol_c *IN_param_value = &this->default_variable_name; |
|
2709 |
|
2710 symbol_c *IN_type_symbol = param_data_type; |
|
2711 last_type_symbol = param_data_type; |
|
2712 |
|
2713 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2714 { |
|
2715 |
|
2716 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2717 |
|
2718 if (IN_type_symbol == NULL) |
|
2719 IN_type_symbol = last_type_symbol; |
|
2720 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2721 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2722 function_type_prefix = return_type_symbol; |
|
2723 function_type_suffix = IN_type_symbol; |
|
2724 break; |
|
2725 |
|
2726 } |
|
2727 |
|
2728 |
|
2729 ERROR; |
|
2730 } |
|
2731 |
|
2732 }/*function_dint_to_bool*/ |
|
2733 break; |
|
2734 |
|
2735 /**** |
|
2736 *DINT_TO_TIME |
|
2737 */ |
|
2738 case function_dint_to_time : |
|
2739 { |
|
2740 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2741 |
|
2742 { |
|
2743 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2744 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2745 symbol_c *IN_param_value = &this->default_variable_name; |
|
2746 |
|
2747 symbol_c *IN_type_symbol = param_data_type; |
|
2748 last_type_symbol = param_data_type; |
|
2749 |
|
2750 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2751 { |
|
2752 |
|
2753 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2754 |
|
2755 if (IN_type_symbol == NULL) |
|
2756 IN_type_symbol = last_type_symbol; |
|
2757 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2758 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2759 function_type_prefix = return_type_symbol; |
|
2760 break; |
|
2761 |
|
2762 } |
|
2763 |
|
2764 |
|
2765 ERROR; |
|
2766 } |
|
2767 |
|
2768 }/*function_dint_to_time*/ |
|
2769 break; |
|
2770 |
|
2771 /**** |
|
2772 *DINT_TO_INT |
|
2773 */ |
|
2774 case function_dint_to_int : |
|
2775 { |
|
2776 symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name; |
|
2777 |
|
2778 { |
|
2779 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2780 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2781 symbol_c *IN_param_value = &this->default_variable_name; |
|
2782 |
|
2783 symbol_c *IN_type_symbol = param_data_type; |
|
2784 last_type_symbol = param_data_type; |
|
2785 |
|
2786 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2787 { |
|
2788 |
|
2789 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2790 |
|
2791 if (IN_type_symbol == NULL) |
|
2792 IN_type_symbol = last_type_symbol; |
|
2793 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2794 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2795 function_type_prefix = return_type_symbol; |
|
2796 function_type_suffix = IN_type_symbol; |
|
2797 break; |
|
2798 |
|
2799 } |
|
2800 |
|
2801 |
|
2802 ERROR; |
|
2803 } |
|
2804 |
|
2805 }/*function_dint_to_int*/ |
|
2806 break; |
|
2807 |
|
2808 /**** |
|
2809 *DATE_TO_REAL |
|
2810 */ |
|
2811 case function_date_to_real : |
|
2812 { |
|
2813 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2814 |
|
2815 { |
|
2816 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2817 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2818 symbol_c *IN_param_value = &this->default_variable_name; |
|
2819 |
|
2820 symbol_c *IN_type_symbol = param_data_type; |
|
2821 last_type_symbol = param_data_type; |
|
2822 |
|
2823 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2824 { |
|
2825 |
|
2826 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
2827 |
|
2828 if (IN_type_symbol == NULL) |
|
2829 IN_type_symbol = last_type_symbol; |
|
2830 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2831 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2832 function_type_prefix = return_type_symbol; |
|
2833 break; |
|
2834 |
|
2835 } |
|
2836 |
|
2837 |
|
2838 ERROR; |
|
2839 } |
|
2840 |
|
2841 }/*function_date_to_real*/ |
|
2842 break; |
|
2843 |
|
2844 /**** |
|
2845 *DATE_TO_SINT |
|
2846 */ |
|
2847 case function_date_to_sint : |
|
2848 { |
|
2849 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2850 |
|
2851 { |
|
2852 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2853 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2854 symbol_c *IN_param_value = &this->default_variable_name; |
|
2855 |
|
2856 symbol_c *IN_type_symbol = param_data_type; |
|
2857 last_type_symbol = param_data_type; |
|
2858 |
|
2859 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2860 { |
|
2861 |
|
2862 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2863 |
|
2864 if (IN_type_symbol == NULL) |
|
2865 IN_type_symbol = last_type_symbol; |
|
2866 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2867 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2868 function_type_prefix = return_type_symbol; |
|
2869 break; |
|
2870 |
|
2871 } |
|
2872 |
|
2873 |
|
2874 ERROR; |
|
2875 } |
|
2876 |
|
2877 }/*function_date_to_sint*/ |
|
2878 break; |
|
2879 |
|
2880 /**** |
|
2881 *DATE_TO_LINT |
|
2882 */ |
|
2883 case function_date_to_lint : |
|
2884 { |
|
2885 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2886 |
|
2887 { |
|
2888 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2889 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2890 symbol_c *IN_param_value = &this->default_variable_name; |
|
2891 |
|
2892 symbol_c *IN_type_symbol = param_data_type; |
|
2893 last_type_symbol = param_data_type; |
|
2894 |
|
2895 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2896 { |
|
2897 |
|
2898 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2899 |
|
2900 if (IN_type_symbol == NULL) |
|
2901 IN_type_symbol = last_type_symbol; |
|
2902 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2903 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2904 function_type_prefix = return_type_symbol; |
|
2905 break; |
|
2906 |
|
2907 } |
|
2908 |
|
2909 |
|
2910 ERROR; |
|
2911 } |
|
2912 |
|
2913 }/*function_date_to_lint*/ |
|
2914 break; |
|
2915 |
|
2916 /**** |
|
2917 *DATE_TO_DINT |
|
2918 */ |
|
2919 case function_date_to_dint : |
|
2920 { |
|
2921 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2922 |
|
2923 { |
|
2924 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2925 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2926 symbol_c *IN_param_value = &this->default_variable_name; |
|
2927 |
|
2928 symbol_c *IN_type_symbol = param_data_type; |
|
2929 last_type_symbol = param_data_type; |
|
2930 |
|
2931 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2932 { |
|
2933 |
|
2934 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2935 |
|
2936 if (IN_type_symbol == NULL) |
|
2937 IN_type_symbol = last_type_symbol; |
|
2938 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2939 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
2940 function_type_prefix = return_type_symbol; |
|
2941 break; |
|
2942 |
|
2943 } |
|
2944 |
|
2945 |
|
2946 ERROR; |
|
2947 } |
|
2948 |
|
2949 }/*function_date_to_dint*/ |
|
2950 break; |
|
2951 |
|
2952 /**** |
|
2953 *DATE_TO_DWORD |
|
2954 */ |
|
2955 case function_date_to_dword : |
|
2956 { |
|
2957 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2958 |
|
2959 { |
|
2960 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2961 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2962 symbol_c *IN_param_value = &this->default_variable_name; |
|
2963 |
|
2964 symbol_c *IN_type_symbol = param_data_type; |
|
2965 last_type_symbol = param_data_type; |
|
2966 |
|
2967 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2968 { |
|
2969 |
|
2970 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2971 |
|
2972 if (IN_type_symbol == NULL) |
|
2973 IN_type_symbol = last_type_symbol; |
|
2974 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2975 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2976 function_type_prefix = return_type_symbol; |
|
2977 break; |
|
2978 |
|
2979 } |
|
2980 |
|
2981 |
|
2982 ERROR; |
|
2983 } |
|
2984 |
|
2985 }/*function_date_to_dword*/ |
|
2986 break; |
|
2987 |
|
2988 /**** |
|
2989 *DATE_TO_UDINT |
|
2990 */ |
|
2991 case function_date_to_udint : |
|
2992 { |
|
2993 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
2994 |
|
2995 { |
|
2996 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2997 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2998 symbol_c *IN_param_value = &this->default_variable_name; |
|
2999 |
|
3000 symbol_c *IN_type_symbol = param_data_type; |
|
3001 last_type_symbol = param_data_type; |
|
3002 |
|
3003 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3004 { |
|
3005 |
|
3006 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3007 |
|
3008 if (IN_type_symbol == NULL) |
|
3009 IN_type_symbol = last_type_symbol; |
|
3010 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3011 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3012 function_type_prefix = return_type_symbol; |
|
3013 break; |
|
3014 |
|
3015 } |
|
3016 |
|
3017 |
|
3018 ERROR; |
|
3019 } |
|
3020 |
|
3021 }/*function_date_to_udint*/ |
|
3022 break; |
|
3023 |
|
3024 /**** |
|
3025 *DATE_TO_WORD |
|
3026 */ |
|
3027 case function_date_to_word : |
|
3028 { |
|
3029 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3030 |
|
3031 { |
|
3032 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3033 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3034 symbol_c *IN_param_value = &this->default_variable_name; |
|
3035 |
|
3036 symbol_c *IN_type_symbol = param_data_type; |
|
3037 last_type_symbol = param_data_type; |
|
3038 |
|
3039 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3040 { |
|
3041 |
|
3042 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3043 |
|
3044 if (IN_type_symbol == NULL) |
|
3045 IN_type_symbol = last_type_symbol; |
|
3046 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3047 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3048 function_type_prefix = return_type_symbol; |
|
3049 break; |
|
3050 |
|
3051 } |
|
3052 |
|
3053 |
|
3054 ERROR; |
|
3055 } |
|
3056 |
|
3057 }/*function_date_to_word*/ |
|
3058 break; |
|
3059 |
|
3060 /**** |
|
3061 *DATE_TO_STRING |
|
3062 */ |
|
3063 case function_date_to_string : |
|
3064 { |
|
3065 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3066 |
|
3067 { |
|
3068 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3069 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3070 symbol_c *IN_param_value = &this->default_variable_name; |
|
3071 |
|
3072 symbol_c *IN_type_symbol = param_data_type; |
|
3073 last_type_symbol = param_data_type; |
|
3074 |
|
3075 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3076 { |
|
3077 |
|
3078 function_name = (symbol_c*)(new pragma_c("__date_to_string")); |
|
3079 |
|
3080 if (IN_type_symbol == NULL) |
|
3081 IN_type_symbol = last_type_symbol; |
|
3082 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3083 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3084 function_type_prefix = return_type_symbol; |
|
3085 break; |
|
3086 |
|
3087 } |
|
3088 |
|
3089 |
|
3090 ERROR; |
|
3091 } |
|
3092 |
|
3093 }/*function_date_to_string*/ |
|
3094 break; |
|
3095 |
|
3096 /**** |
|
3097 *DATE_TO_LWORD |
|
3098 */ |
|
3099 case function_date_to_lword : |
|
3100 { |
|
3101 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3102 |
|
3103 { |
|
3104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3106 symbol_c *IN_param_value = &this->default_variable_name; |
|
3107 |
|
3108 symbol_c *IN_type_symbol = param_data_type; |
|
3109 last_type_symbol = param_data_type; |
|
3110 |
|
3111 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3112 { |
|
3113 |
|
3114 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3115 |
|
3116 if (IN_type_symbol == NULL) |
|
3117 IN_type_symbol = last_type_symbol; |
|
3118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3119 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3120 function_type_prefix = return_type_symbol; |
|
3121 break; |
|
3122 |
|
3123 } |
|
3124 |
|
3125 |
|
3126 ERROR; |
|
3127 } |
|
3128 |
|
3129 }/*function_date_to_lword*/ |
|
3130 break; |
|
3131 |
|
3132 /**** |
|
3133 *DATE_TO_UINT |
|
3134 */ |
|
3135 case function_date_to_uint : |
|
3136 { |
|
3137 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3138 |
|
3139 { |
|
3140 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3141 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3142 symbol_c *IN_param_value = &this->default_variable_name; |
|
3143 |
|
3144 symbol_c *IN_type_symbol = param_data_type; |
|
3145 last_type_symbol = param_data_type; |
|
3146 |
|
3147 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3148 { |
|
3149 |
|
3150 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3151 |
|
3152 if (IN_type_symbol == NULL) |
|
3153 IN_type_symbol = last_type_symbol; |
|
3154 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3155 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3156 function_type_prefix = return_type_symbol; |
|
3157 break; |
|
3158 |
|
3159 } |
|
3160 |
|
3161 |
|
3162 ERROR; |
|
3163 } |
|
3164 |
|
3165 }/*function_date_to_uint*/ |
|
3166 break; |
|
3167 |
|
3168 /**** |
|
3169 *DATE_TO_LREAL |
|
3170 */ |
|
3171 case function_date_to_lreal : |
|
3172 { |
|
3173 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3174 |
|
3175 { |
|
3176 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3177 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3178 symbol_c *IN_param_value = &this->default_variable_name; |
|
3179 |
|
3180 symbol_c *IN_type_symbol = param_data_type; |
|
3181 last_type_symbol = param_data_type; |
|
3182 |
|
3183 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3184 { |
|
3185 |
|
3186 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3187 |
|
3188 if (IN_type_symbol == NULL) |
|
3189 IN_type_symbol = last_type_symbol; |
|
3190 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3191 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3192 function_type_prefix = return_type_symbol; |
|
3193 break; |
|
3194 |
|
3195 } |
|
3196 |
|
3197 |
|
3198 ERROR; |
|
3199 } |
|
3200 |
|
3201 }/*function_date_to_lreal*/ |
|
3202 break; |
|
3203 |
|
3204 /**** |
|
3205 *DATE_TO_BYTE |
|
3206 */ |
|
3207 case function_date_to_byte : |
|
3208 { |
|
3209 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3210 |
|
3211 { |
|
3212 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3220 { |
|
3221 |
|
3222 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3223 |
|
3224 if (IN_type_symbol == NULL) |
|
3225 IN_type_symbol = last_type_symbol; |
|
3226 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3227 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3228 function_type_prefix = return_type_symbol; |
|
3229 break; |
|
3230 |
|
3231 } |
|
3232 |
|
3233 |
|
3234 ERROR; |
|
3235 } |
|
3236 |
|
3237 }/*function_date_to_byte*/ |
|
3238 break; |
|
3239 |
|
3240 /**** |
|
3241 *DATE_TO_USINT |
|
3242 */ |
|
3243 case function_date_to_usint : |
|
3244 { |
|
3245 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3246 |
|
3247 { |
|
3248 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3249 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3250 symbol_c *IN_param_value = &this->default_variable_name; |
|
3251 |
|
3252 symbol_c *IN_type_symbol = param_data_type; |
|
3253 last_type_symbol = param_data_type; |
|
3254 |
|
3255 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3256 { |
|
3257 |
|
3258 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3259 |
|
3260 if (IN_type_symbol == NULL) |
|
3261 IN_type_symbol = last_type_symbol; |
|
3262 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3263 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3264 function_type_prefix = return_type_symbol; |
|
3265 break; |
|
3266 |
|
3267 } |
|
3268 |
|
3269 |
|
3270 ERROR; |
|
3271 } |
|
3272 |
|
3273 }/*function_date_to_usint*/ |
|
3274 break; |
|
3275 |
|
3276 /**** |
|
3277 *DATE_TO_ULINT |
|
3278 */ |
|
3279 case function_date_to_ulint : |
|
3280 { |
|
3281 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3282 |
|
3283 { |
|
3284 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3285 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3286 symbol_c *IN_param_value = &this->default_variable_name; |
|
3287 |
|
3288 symbol_c *IN_type_symbol = param_data_type; |
|
3289 last_type_symbol = param_data_type; |
|
3290 |
|
3291 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3292 { |
|
3293 |
|
3294 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3295 |
|
3296 if (IN_type_symbol == NULL) |
|
3297 IN_type_symbol = last_type_symbol; |
|
3298 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3299 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3300 function_type_prefix = return_type_symbol; |
|
3301 break; |
|
3302 |
|
3303 } |
|
3304 |
|
3305 |
|
3306 ERROR; |
|
3307 } |
|
3308 |
|
3309 }/*function_date_to_ulint*/ |
|
3310 break; |
|
3311 |
|
3312 /**** |
|
3313 *DATE_TO_INT |
|
3314 */ |
|
3315 case function_date_to_int : |
|
3316 { |
|
3317 symbol_c *last_type_symbol = &search_constant_type_c::date_type_name; |
|
3318 |
|
3319 { |
|
3320 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3321 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3322 symbol_c *IN_param_value = &this->default_variable_name; |
|
3323 |
|
3324 symbol_c *IN_type_symbol = param_data_type; |
|
3325 last_type_symbol = param_data_type; |
|
3326 |
|
3327 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3328 { |
|
3329 |
|
3330 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3331 |
|
3332 if (IN_type_symbol == NULL) |
|
3333 IN_type_symbol = last_type_symbol; |
|
3334 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3335 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3336 function_type_prefix = return_type_symbol; |
|
3337 break; |
|
3338 |
|
3339 } |
|
3340 |
|
3341 |
|
3342 ERROR; |
|
3343 } |
|
3344 |
|
3345 }/*function_date_to_int*/ |
|
3346 break; |
|
3347 |
|
3348 /**** |
|
3349 *DWORD_TO_REAL |
|
3350 */ |
|
3351 case function_dword_to_real : |
|
3352 { |
|
3353 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3354 |
|
3355 { |
|
3356 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3357 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3358 symbol_c *IN_param_value = &this->default_variable_name; |
|
3359 |
|
3360 symbol_c *IN_type_symbol = param_data_type; |
|
3361 last_type_symbol = param_data_type; |
|
3362 |
|
3363 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3364 { |
|
3365 |
|
3366 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3367 |
|
3368 if (IN_type_symbol == NULL) |
|
3369 IN_type_symbol = last_type_symbol; |
|
3370 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3371 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3372 function_type_prefix = return_type_symbol; |
|
3373 function_type_suffix = IN_type_symbol; |
|
3374 break; |
|
3375 |
|
3376 } |
|
3377 |
|
3378 |
|
3379 ERROR; |
|
3380 } |
|
3381 |
|
3382 }/*function_dword_to_real*/ |
|
3383 break; |
|
3384 |
|
3385 /**** |
|
3386 *DWORD_TO_SINT |
|
3387 */ |
|
3388 case function_dword_to_sint : |
|
3389 { |
|
3390 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3391 |
|
3392 { |
|
3393 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3394 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3395 symbol_c *IN_param_value = &this->default_variable_name; |
|
3396 |
|
3397 symbol_c *IN_type_symbol = param_data_type; |
|
3398 last_type_symbol = param_data_type; |
|
3399 |
|
3400 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3401 { |
|
3402 |
|
3403 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3404 |
|
3405 if (IN_type_symbol == NULL) |
|
3406 IN_type_symbol = last_type_symbol; |
|
3407 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3408 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3409 function_type_prefix = return_type_symbol; |
|
3410 function_type_suffix = IN_type_symbol; |
|
3411 break; |
|
3412 |
|
3413 } |
|
3414 |
|
3415 |
|
3416 ERROR; |
|
3417 } |
|
3418 |
|
3419 }/*function_dword_to_sint*/ |
|
3420 break; |
|
3421 |
|
3422 /**** |
|
3423 *DWORD_TO_LINT |
|
3424 */ |
|
3425 case function_dword_to_lint : |
|
3426 { |
|
3427 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3428 |
|
3429 { |
|
3430 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3431 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3432 symbol_c *IN_param_value = &this->default_variable_name; |
|
3433 |
|
3434 symbol_c *IN_type_symbol = param_data_type; |
|
3435 last_type_symbol = param_data_type; |
|
3436 |
|
3437 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3438 { |
|
3439 |
|
3440 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3441 |
|
3442 if (IN_type_symbol == NULL) |
|
3443 IN_type_symbol = last_type_symbol; |
|
3444 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3445 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
3446 function_type_prefix = return_type_symbol; |
|
3447 function_type_suffix = IN_type_symbol; |
|
3448 break; |
|
3449 |
|
3450 } |
|
3451 |
|
3452 |
|
3453 ERROR; |
|
3454 } |
|
3455 |
|
3456 }/*function_dword_to_lint*/ |
|
3457 break; |
|
3458 |
|
3459 /**** |
|
3460 *DWORD_TO_DINT |
|
3461 */ |
|
3462 case function_dword_to_dint : |
|
3463 { |
|
3464 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3465 |
|
3466 { |
|
3467 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3469 symbol_c *IN_param_value = &this->default_variable_name; |
|
3470 |
|
3471 symbol_c *IN_type_symbol = param_data_type; |
|
3472 last_type_symbol = param_data_type; |
|
3473 |
|
3474 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3475 { |
|
3476 |
|
3477 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3478 |
|
3479 if (IN_type_symbol == NULL) |
|
3480 IN_type_symbol = last_type_symbol; |
|
3481 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3482 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3483 function_type_prefix = return_type_symbol; |
|
3484 function_type_suffix = IN_type_symbol; |
|
3485 break; |
|
3486 |
|
3487 } |
|
3488 |
|
3489 |
|
3490 ERROR; |
|
3491 } |
|
3492 |
|
3493 }/*function_dword_to_dint*/ |
|
3494 break; |
|
3495 |
|
3496 /**** |
|
3497 *DWORD_TO_DATE |
|
3498 */ |
|
3499 case function_dword_to_date : |
|
3500 { |
|
3501 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3502 |
|
3503 { |
|
3504 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3505 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3506 symbol_c *IN_param_value = &this->default_variable_name; |
|
3507 |
|
3508 symbol_c *IN_type_symbol = param_data_type; |
|
3509 last_type_symbol = param_data_type; |
|
3510 |
|
3511 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3512 { |
|
3513 |
|
3514 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3515 |
|
3516 if (IN_type_symbol == NULL) |
|
3517 IN_type_symbol = last_type_symbol; |
|
3518 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3519 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3520 function_type_prefix = return_type_symbol; |
|
3521 break; |
|
3522 |
|
3523 } |
|
3524 |
|
3525 |
|
3526 ERROR; |
|
3527 } |
|
3528 |
|
3529 }/*function_dword_to_date*/ |
|
3530 break; |
|
3531 |
|
3532 /**** |
|
3533 *DWORD_TO_DT |
|
3534 */ |
|
3535 case function_dword_to_dt : |
|
3536 { |
|
3537 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3538 |
|
3539 { |
|
3540 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3541 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3542 symbol_c *IN_param_value = &this->default_variable_name; |
|
3543 |
|
3544 symbol_c *IN_type_symbol = param_data_type; |
|
3545 last_type_symbol = param_data_type; |
|
3546 |
|
3547 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3548 { |
|
3549 |
|
3550 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3551 |
|
3552 if (IN_type_symbol == NULL) |
|
3553 IN_type_symbol = last_type_symbol; |
|
3554 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3555 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3556 function_type_prefix = return_type_symbol; |
|
3557 break; |
|
3558 |
|
3559 } |
|
3560 |
|
3561 |
|
3562 ERROR; |
|
3563 } |
|
3564 |
|
3565 }/*function_dword_to_dt*/ |
|
3566 break; |
|
3567 |
|
3568 /**** |
|
3569 *DWORD_TO_TOD |
|
3570 */ |
|
3571 case function_dword_to_tod : |
|
3572 { |
|
3573 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3574 |
|
3575 { |
|
3576 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3577 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3578 symbol_c *IN_param_value = &this->default_variable_name; |
|
3579 |
|
3580 symbol_c *IN_type_symbol = param_data_type; |
|
3581 last_type_symbol = param_data_type; |
|
3582 |
|
3583 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3584 { |
|
3585 |
|
3586 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3587 |
|
3588 if (IN_type_symbol == NULL) |
|
3589 IN_type_symbol = last_type_symbol; |
|
3590 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3591 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3592 function_type_prefix = return_type_symbol; |
|
3593 break; |
|
3594 |
|
3595 } |
|
3596 |
|
3597 |
|
3598 ERROR; |
|
3599 } |
|
3600 |
|
3601 }/*function_dword_to_tod*/ |
|
3602 break; |
|
3603 |
|
3604 /**** |
|
3605 *DWORD_TO_UDINT |
|
3606 */ |
|
3607 case function_dword_to_udint : |
|
3608 { |
|
3609 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3610 |
|
3611 { |
|
3612 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3613 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3614 symbol_c *IN_param_value = &this->default_variable_name; |
|
3615 |
|
3616 symbol_c *IN_type_symbol = param_data_type; |
|
3617 last_type_symbol = param_data_type; |
|
3618 |
|
3619 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3620 { |
|
3621 |
|
3622 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3623 |
|
3624 if (IN_type_symbol == NULL) |
|
3625 IN_type_symbol = last_type_symbol; |
|
3626 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3627 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3628 function_type_prefix = return_type_symbol; |
|
3629 function_type_suffix = IN_type_symbol; |
|
3630 break; |
|
3631 |
|
3632 } |
|
3633 |
|
3634 |
|
3635 ERROR; |
|
3636 } |
|
3637 |
|
3638 }/*function_dword_to_udint*/ |
|
3639 break; |
|
3640 |
|
3641 /**** |
|
3642 *DWORD_TO_WORD |
|
3643 */ |
|
3644 case function_dword_to_word : |
|
3645 { |
|
3646 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3647 |
|
3648 { |
|
3649 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3650 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3651 symbol_c *IN_param_value = &this->default_variable_name; |
|
3652 |
|
3653 symbol_c *IN_type_symbol = param_data_type; |
|
3654 last_type_symbol = param_data_type; |
|
3655 |
|
3656 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3657 { |
|
3658 |
|
3659 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3660 |
|
3661 if (IN_type_symbol == NULL) |
|
3662 IN_type_symbol = last_type_symbol; |
|
3663 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3664 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3665 function_type_prefix = return_type_symbol; |
|
3666 function_type_suffix = IN_type_symbol; |
|
3667 break; |
|
3668 |
|
3669 } |
|
3670 |
|
3671 |
|
3672 ERROR; |
|
3673 } |
|
3674 |
|
3675 }/*function_dword_to_word*/ |
|
3676 break; |
|
3677 |
|
3678 /**** |
|
3679 *DWORD_TO_STRING |
|
3680 */ |
|
3681 case function_dword_to_string : |
|
3682 { |
|
3683 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3684 |
|
3685 { |
|
3686 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3688 symbol_c *IN_param_value = &this->default_variable_name; |
|
3689 |
|
3690 symbol_c *IN_type_symbol = param_data_type; |
|
3691 last_type_symbol = param_data_type; |
|
3692 |
|
3693 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3694 { |
|
3695 |
|
3696 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
3697 |
|
3698 if (IN_type_symbol == NULL) |
|
3699 IN_type_symbol = last_type_symbol; |
|
3700 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3701 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3702 function_type_prefix = return_type_symbol; |
|
3703 break; |
|
3704 |
|
3705 } |
|
3706 |
|
3707 |
|
3708 ERROR; |
|
3709 } |
|
3710 |
|
3711 }/*function_dword_to_string*/ |
|
3712 break; |
|
3713 |
|
3714 /**** |
|
3715 *DWORD_TO_LWORD |
|
3716 */ |
|
3717 case function_dword_to_lword : |
|
3718 { |
|
3719 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3720 |
|
3721 { |
|
3722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3724 symbol_c *IN_param_value = &this->default_variable_name; |
|
3725 |
|
3726 symbol_c *IN_type_symbol = param_data_type; |
|
3727 last_type_symbol = param_data_type; |
|
3728 |
|
3729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3730 { |
|
3731 |
|
3732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3733 |
|
3734 if (IN_type_symbol == NULL) |
|
3735 IN_type_symbol = last_type_symbol; |
|
3736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3737 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3738 function_type_prefix = return_type_symbol; |
|
3739 function_type_suffix = IN_type_symbol; |
|
3740 break; |
|
3741 |
|
3742 } |
|
3743 |
|
3744 |
|
3745 ERROR; |
|
3746 } |
|
3747 |
|
3748 }/*function_dword_to_lword*/ |
|
3749 break; |
|
3750 |
|
3751 /**** |
|
3752 *DWORD_TO_UINT |
|
3753 */ |
|
3754 case function_dword_to_uint : |
|
3755 { |
|
3756 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3757 |
|
3758 { |
|
3759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3767 { |
|
3768 |
|
3769 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3770 |
|
3771 if (IN_type_symbol == NULL) |
|
3772 IN_type_symbol = last_type_symbol; |
|
3773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3774 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3775 function_type_prefix = return_type_symbol; |
|
3776 function_type_suffix = IN_type_symbol; |
|
3777 break; |
|
3778 |
|
3779 } |
|
3780 |
|
3781 |
|
3782 ERROR; |
|
3783 } |
|
3784 |
|
3785 }/*function_dword_to_uint*/ |
|
3786 break; |
|
3787 |
|
3788 /**** |
|
3789 *DWORD_TO_LREAL |
|
3790 */ |
|
3791 case function_dword_to_lreal : |
|
3792 { |
|
3793 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3794 |
|
3795 { |
|
3796 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3798 symbol_c *IN_param_value = &this->default_variable_name; |
|
3799 |
|
3800 symbol_c *IN_type_symbol = param_data_type; |
|
3801 last_type_symbol = param_data_type; |
|
3802 |
|
3803 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3804 { |
|
3805 |
|
3806 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3807 |
|
3808 if (IN_type_symbol == NULL) |
|
3809 IN_type_symbol = last_type_symbol; |
|
3810 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3811 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3812 function_type_prefix = return_type_symbol; |
|
3813 function_type_suffix = IN_type_symbol; |
|
3814 break; |
|
3815 |
|
3816 } |
|
3817 |
|
3818 |
|
3819 ERROR; |
|
3820 } |
|
3821 |
|
3822 }/*function_dword_to_lreal*/ |
|
3823 break; |
|
3824 |
|
3825 /**** |
|
3826 *DWORD_TO_BYTE |
|
3827 */ |
|
3828 case function_dword_to_byte : |
|
3829 { |
|
3830 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3831 |
|
3832 { |
|
3833 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3834 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3835 symbol_c *IN_param_value = &this->default_variable_name; |
|
3836 |
|
3837 symbol_c *IN_type_symbol = param_data_type; |
|
3838 last_type_symbol = param_data_type; |
|
3839 |
|
3840 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3841 { |
|
3842 |
|
3843 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3844 |
|
3845 if (IN_type_symbol == NULL) |
|
3846 IN_type_symbol = last_type_symbol; |
|
3847 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3848 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3849 function_type_prefix = return_type_symbol; |
|
3850 function_type_suffix = IN_type_symbol; |
|
3851 break; |
|
3852 |
|
3853 } |
|
3854 |
|
3855 |
|
3856 ERROR; |
|
3857 } |
|
3858 |
|
3859 }/*function_dword_to_byte*/ |
|
3860 break; |
|
3861 |
|
3862 /**** |
|
3863 *DWORD_TO_USINT |
|
3864 */ |
|
3865 case function_dword_to_usint : |
|
3866 { |
|
3867 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3868 |
|
3869 { |
|
3870 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3871 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3872 symbol_c *IN_param_value = &this->default_variable_name; |
|
3873 |
|
3874 symbol_c *IN_type_symbol = param_data_type; |
|
3875 last_type_symbol = param_data_type; |
|
3876 |
|
3877 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3878 { |
|
3879 |
|
3880 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3881 |
|
3882 if (IN_type_symbol == NULL) |
|
3883 IN_type_symbol = last_type_symbol; |
|
3884 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3885 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3886 function_type_prefix = return_type_symbol; |
|
3887 function_type_suffix = IN_type_symbol; |
|
3888 break; |
|
3889 |
|
3890 } |
|
3891 |
|
3892 |
|
3893 ERROR; |
|
3894 } |
|
3895 |
|
3896 }/*function_dword_to_usint*/ |
|
3897 break; |
|
3898 |
|
3899 /**** |
|
3900 *DWORD_TO_ULINT |
|
3901 */ |
|
3902 case function_dword_to_ulint : |
|
3903 { |
|
3904 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3905 |
|
3906 { |
|
3907 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3908 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3909 symbol_c *IN_param_value = &this->default_variable_name; |
|
3910 |
|
3911 symbol_c *IN_type_symbol = param_data_type; |
|
3912 last_type_symbol = param_data_type; |
|
3913 |
|
3914 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3915 { |
|
3916 |
|
3917 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3918 |
|
3919 if (IN_type_symbol == NULL) |
|
3920 IN_type_symbol = last_type_symbol; |
|
3921 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3922 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3923 function_type_prefix = return_type_symbol; |
|
3924 function_type_suffix = IN_type_symbol; |
|
3925 break; |
|
3926 |
|
3927 } |
|
3928 |
|
3929 |
|
3930 ERROR; |
|
3931 } |
|
3932 |
|
3933 }/*function_dword_to_ulint*/ |
|
3934 break; |
|
3935 |
|
3936 /**** |
|
3937 *DWORD_TO_BOOL |
|
3938 */ |
|
3939 case function_dword_to_bool : |
|
3940 { |
|
3941 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3942 |
|
3943 { |
|
3944 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3945 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3946 symbol_c *IN_param_value = &this->default_variable_name; |
|
3947 |
|
3948 symbol_c *IN_type_symbol = param_data_type; |
|
3949 last_type_symbol = param_data_type; |
|
3950 |
|
3951 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3952 { |
|
3953 |
|
3954 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3955 |
|
3956 if (IN_type_symbol == NULL) |
|
3957 IN_type_symbol = last_type_symbol; |
|
3958 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3959 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3960 function_type_prefix = return_type_symbol; |
|
3961 function_type_suffix = IN_type_symbol; |
|
3962 break; |
|
3963 |
|
3964 } |
|
3965 |
|
3966 |
|
3967 ERROR; |
|
3968 } |
|
3969 |
|
3970 }/*function_dword_to_bool*/ |
|
3971 break; |
|
3972 |
|
3973 /**** |
|
3974 *DWORD_TO_TIME |
|
3975 */ |
|
3976 case function_dword_to_time : |
|
3977 { |
|
3978 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
3979 |
|
3980 { |
|
3981 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3982 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3983 symbol_c *IN_param_value = &this->default_variable_name; |
|
3984 |
|
3985 symbol_c *IN_type_symbol = param_data_type; |
|
3986 last_type_symbol = param_data_type; |
|
3987 |
|
3988 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3989 { |
|
3990 |
|
3991 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3992 |
|
3993 if (IN_type_symbol == NULL) |
|
3994 IN_type_symbol = last_type_symbol; |
|
3995 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3996 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
3997 function_type_prefix = return_type_symbol; |
|
3998 break; |
|
3999 |
|
4000 } |
|
4001 |
|
4002 |
|
4003 ERROR; |
|
4004 } |
|
4005 |
|
4006 }/*function_dword_to_time*/ |
|
4007 break; |
|
4008 |
|
4009 /**** |
|
4010 *DWORD_TO_INT |
|
4011 */ |
|
4012 case function_dword_to_int : |
|
4013 { |
|
4014 symbol_c *last_type_symbol = &search_constant_type_c::dword_type_name; |
|
4015 |
|
4016 { |
|
4017 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4018 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4019 symbol_c *IN_param_value = &this->default_variable_name; |
|
4020 |
|
4021 symbol_c *IN_type_symbol = param_data_type; |
|
4022 last_type_symbol = param_data_type; |
|
4023 |
|
4024 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4025 { |
|
4026 |
|
4027 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
4028 |
|
4029 if (IN_type_symbol == NULL) |
|
4030 IN_type_symbol = last_type_symbol; |
|
4031 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4032 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4033 function_type_prefix = return_type_symbol; |
|
4034 function_type_suffix = IN_type_symbol; |
|
4035 break; |
|
4036 |
|
4037 } |
|
4038 |
|
4039 |
|
4040 ERROR; |
|
4041 } |
|
4042 |
|
4043 }/*function_dword_to_int*/ |
|
4044 break; |
|
4045 |
|
4046 /**** |
|
4047 *DT_TO_REAL |
|
4048 */ |
|
4049 case function_dt_to_real : |
|
4050 { |
|
4051 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4052 |
|
4053 { |
|
4054 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4055 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4056 symbol_c *IN_param_value = &this->default_variable_name; |
|
4057 |
|
4058 symbol_c *IN_type_symbol = param_data_type; |
|
4059 last_type_symbol = param_data_type; |
|
4060 |
|
4061 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4062 { |
|
4063 |
|
4064 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4065 |
|
4066 if (IN_type_symbol == NULL) |
|
4067 IN_type_symbol = last_type_symbol; |
|
4068 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4069 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4070 function_type_prefix = return_type_symbol; |
|
4071 break; |
|
4072 |
|
4073 } |
|
4074 |
|
4075 |
|
4076 ERROR; |
|
4077 } |
|
4078 |
|
4079 }/*function_dt_to_real*/ |
|
4080 break; |
|
4081 |
|
4082 /**** |
|
4083 *DT_TO_SINT |
|
4084 */ |
|
4085 case function_dt_to_sint : |
|
4086 { |
|
4087 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4088 |
|
4089 { |
|
4090 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4092 symbol_c *IN_param_value = &this->default_variable_name; |
|
4093 |
|
4094 symbol_c *IN_type_symbol = param_data_type; |
|
4095 last_type_symbol = param_data_type; |
|
4096 |
|
4097 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4098 { |
|
4099 |
|
4100 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4101 |
|
4102 if (IN_type_symbol == NULL) |
|
4103 IN_type_symbol = last_type_symbol; |
|
4104 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4105 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4106 function_type_prefix = return_type_symbol; |
|
4107 break; |
|
4108 |
|
4109 } |
|
4110 |
|
4111 |
|
4112 ERROR; |
|
4113 } |
|
4114 |
|
4115 }/*function_dt_to_sint*/ |
|
4116 break; |
|
4117 |
|
4118 /**** |
|
4119 *DT_TO_LINT |
|
4120 */ |
|
4121 case function_dt_to_lint : |
|
4122 { |
|
4123 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4124 |
|
4125 { |
|
4126 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4127 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4128 symbol_c *IN_param_value = &this->default_variable_name; |
|
4129 |
|
4130 symbol_c *IN_type_symbol = param_data_type; |
|
4131 last_type_symbol = param_data_type; |
|
4132 |
|
4133 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4134 { |
|
4135 |
|
4136 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4137 |
|
4138 if (IN_type_symbol == NULL) |
|
4139 IN_type_symbol = last_type_symbol; |
|
4140 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4141 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4142 function_type_prefix = return_type_symbol; |
|
4143 break; |
|
4144 |
|
4145 } |
|
4146 |
|
4147 |
|
4148 ERROR; |
|
4149 } |
|
4150 |
|
4151 }/*function_dt_to_lint*/ |
|
4152 break; |
|
4153 |
|
4154 /**** |
|
4155 *DT_TO_DINT |
|
4156 */ |
|
4157 case function_dt_to_dint : |
|
4158 { |
|
4159 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4160 |
|
4161 { |
|
4162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4164 symbol_c *IN_param_value = &this->default_variable_name; |
|
4165 |
|
4166 symbol_c *IN_type_symbol = param_data_type; |
|
4167 last_type_symbol = param_data_type; |
|
4168 |
|
4169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4170 { |
|
4171 |
|
4172 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4173 |
|
4174 if (IN_type_symbol == NULL) |
|
4175 IN_type_symbol = last_type_symbol; |
|
4176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4177 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4178 function_type_prefix = return_type_symbol; |
|
4179 break; |
|
4180 |
|
4181 } |
|
4182 |
|
4183 |
|
4184 ERROR; |
|
4185 } |
|
4186 |
|
4187 }/*function_dt_to_dint*/ |
|
4188 break; |
|
4189 |
|
4190 /**** |
|
4191 *DT_TO_DWORD |
|
4192 */ |
|
4193 case function_dt_to_dword : |
|
4194 { |
|
4195 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4196 |
|
4197 { |
|
4198 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4200 symbol_c *IN_param_value = &this->default_variable_name; |
|
4201 |
|
4202 symbol_c *IN_type_symbol = param_data_type; |
|
4203 last_type_symbol = param_data_type; |
|
4204 |
|
4205 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4206 { |
|
4207 |
|
4208 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4209 |
|
4210 if (IN_type_symbol == NULL) |
|
4211 IN_type_symbol = last_type_symbol; |
|
4212 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4213 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4214 function_type_prefix = return_type_symbol; |
|
4215 break; |
|
4216 |
|
4217 } |
|
4218 |
|
4219 |
|
4220 ERROR; |
|
4221 } |
|
4222 |
|
4223 }/*function_dt_to_dword*/ |
|
4224 break; |
|
4225 |
|
4226 /**** |
|
4227 *DT_TO_UDINT |
|
4228 */ |
|
4229 case function_dt_to_udint : |
|
4230 { |
|
4231 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4232 |
|
4233 { |
|
4234 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4235 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4236 symbol_c *IN_param_value = &this->default_variable_name; |
|
4237 |
|
4238 symbol_c *IN_type_symbol = param_data_type; |
|
4239 last_type_symbol = param_data_type; |
|
4240 |
|
4241 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4242 { |
|
4243 |
|
4244 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4245 |
|
4246 if (IN_type_symbol == NULL) |
|
4247 IN_type_symbol = last_type_symbol; |
|
4248 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4249 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4250 function_type_prefix = return_type_symbol; |
|
4251 break; |
|
4252 |
|
4253 } |
|
4254 |
|
4255 |
|
4256 ERROR; |
|
4257 } |
|
4258 |
|
4259 }/*function_dt_to_udint*/ |
|
4260 break; |
|
4261 |
|
4262 /**** |
|
4263 *DT_TO_WORD |
|
4264 */ |
|
4265 case function_dt_to_word : |
|
4266 { |
|
4267 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4268 |
|
4269 { |
|
4270 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4271 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4272 symbol_c *IN_param_value = &this->default_variable_name; |
|
4273 |
|
4274 symbol_c *IN_type_symbol = param_data_type; |
|
4275 last_type_symbol = param_data_type; |
|
4276 |
|
4277 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4278 { |
|
4279 |
|
4280 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4281 |
|
4282 if (IN_type_symbol == NULL) |
|
4283 IN_type_symbol = last_type_symbol; |
|
4284 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4285 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4286 function_type_prefix = return_type_symbol; |
|
4287 break; |
|
4288 |
|
4289 } |
|
4290 |
|
4291 |
|
4292 ERROR; |
|
4293 } |
|
4294 |
|
4295 }/*function_dt_to_word*/ |
|
4296 break; |
|
4297 |
|
4298 /**** |
|
4299 *DT_TO_STRING |
|
4300 */ |
|
4301 case function_dt_to_string : |
|
4302 { |
|
4303 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4304 |
|
4305 { |
|
4306 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4307 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4308 symbol_c *IN_param_value = &this->default_variable_name; |
|
4309 |
|
4310 symbol_c *IN_type_symbol = param_data_type; |
|
4311 last_type_symbol = param_data_type; |
|
4312 |
|
4313 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4314 { |
|
4315 |
|
4316 function_name = (symbol_c*)(new pragma_c("__dt_to_string")); |
|
4317 |
|
4318 if (IN_type_symbol == NULL) |
|
4319 IN_type_symbol = last_type_symbol; |
|
4320 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4321 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4322 function_type_prefix = return_type_symbol; |
|
4323 break; |
|
4324 |
|
4325 } |
|
4326 |
|
4327 |
|
4328 ERROR; |
|
4329 } |
|
4330 |
|
4331 }/*function_dt_to_string*/ |
|
4332 break; |
|
4333 |
|
4334 /**** |
|
4335 *DT_TO_LWORD |
|
4336 */ |
|
4337 case function_dt_to_lword : |
|
4338 { |
|
4339 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4340 |
|
4341 { |
|
4342 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4343 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4344 symbol_c *IN_param_value = &this->default_variable_name; |
|
4345 |
|
4346 symbol_c *IN_type_symbol = param_data_type; |
|
4347 last_type_symbol = param_data_type; |
|
4348 |
|
4349 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4350 { |
|
4351 |
|
4352 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4353 |
|
4354 if (IN_type_symbol == NULL) |
|
4355 IN_type_symbol = last_type_symbol; |
|
4356 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4357 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4358 function_type_prefix = return_type_symbol; |
|
4359 break; |
|
4360 |
|
4361 } |
|
4362 |
|
4363 |
|
4364 ERROR; |
|
4365 } |
|
4366 |
|
4367 }/*function_dt_to_lword*/ |
|
4368 break; |
|
4369 |
|
4370 /**** |
|
4371 *DT_TO_UINT |
|
4372 */ |
|
4373 case function_dt_to_uint : |
|
4374 { |
|
4375 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4376 |
|
4377 { |
|
4378 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4379 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4380 symbol_c *IN_param_value = &this->default_variable_name; |
|
4381 |
|
4382 symbol_c *IN_type_symbol = param_data_type; |
|
4383 last_type_symbol = param_data_type; |
|
4384 |
|
4385 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4386 { |
|
4387 |
|
4388 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4389 |
|
4390 if (IN_type_symbol == NULL) |
|
4391 IN_type_symbol = last_type_symbol; |
|
4392 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4393 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4394 function_type_prefix = return_type_symbol; |
|
4395 break; |
|
4396 |
|
4397 } |
|
4398 |
|
4399 |
|
4400 ERROR; |
|
4401 } |
|
4402 |
|
4403 }/*function_dt_to_uint*/ |
|
4404 break; |
|
4405 |
|
4406 /**** |
|
4407 *DT_TO_LREAL |
|
4408 */ |
|
4409 case function_dt_to_lreal : |
|
4410 { |
|
4411 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4412 |
|
4413 { |
|
4414 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4415 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4416 symbol_c *IN_param_value = &this->default_variable_name; |
|
4417 |
|
4418 symbol_c *IN_type_symbol = param_data_type; |
|
4419 last_type_symbol = param_data_type; |
|
4420 |
|
4421 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4422 { |
|
4423 |
|
4424 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4425 |
|
4426 if (IN_type_symbol == NULL) |
|
4427 IN_type_symbol = last_type_symbol; |
|
4428 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4429 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4430 function_type_prefix = return_type_symbol; |
|
4431 break; |
|
4432 |
|
4433 } |
|
4434 |
|
4435 |
|
4436 ERROR; |
|
4437 } |
|
4438 |
|
4439 }/*function_dt_to_lreal*/ |
|
4440 break; |
|
4441 |
|
4442 /**** |
|
4443 *DT_TO_BYTE |
|
4444 */ |
|
4445 case function_dt_to_byte : |
|
4446 { |
|
4447 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4448 |
|
4449 { |
|
4450 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4451 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4452 symbol_c *IN_param_value = &this->default_variable_name; |
|
4453 |
|
4454 symbol_c *IN_type_symbol = param_data_type; |
|
4455 last_type_symbol = param_data_type; |
|
4456 |
|
4457 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4458 { |
|
4459 |
|
4460 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4461 |
|
4462 if (IN_type_symbol == NULL) |
|
4463 IN_type_symbol = last_type_symbol; |
|
4464 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4465 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4466 function_type_prefix = return_type_symbol; |
|
4467 break; |
|
4468 |
|
4469 } |
|
4470 |
|
4471 |
|
4472 ERROR; |
|
4473 } |
|
4474 |
|
4475 }/*function_dt_to_byte*/ |
|
4476 break; |
|
4477 |
|
4478 /**** |
|
4479 *DT_TO_USINT |
|
4480 */ |
|
4481 case function_dt_to_usint : |
|
4482 { |
|
4483 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4484 |
|
4485 { |
|
4486 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4488 symbol_c *IN_param_value = &this->default_variable_name; |
|
4489 |
|
4490 symbol_c *IN_type_symbol = param_data_type; |
|
4491 last_type_symbol = param_data_type; |
|
4492 |
|
4493 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4494 { |
|
4495 |
|
4496 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4497 |
|
4498 if (IN_type_symbol == NULL) |
|
4499 IN_type_symbol = last_type_symbol; |
|
4500 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4501 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4502 function_type_prefix = return_type_symbol; |
|
4503 break; |
|
4504 |
|
4505 } |
|
4506 |
|
4507 |
|
4508 ERROR; |
|
4509 } |
|
4510 |
|
4511 }/*function_dt_to_usint*/ |
|
4512 break; |
|
4513 |
|
4514 /**** |
|
4515 *DT_TO_ULINT |
|
4516 */ |
|
4517 case function_dt_to_ulint : |
|
4518 { |
|
4519 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4520 |
|
4521 { |
|
4522 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4523 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4524 symbol_c *IN_param_value = &this->default_variable_name; |
|
4525 |
|
4526 symbol_c *IN_type_symbol = param_data_type; |
|
4527 last_type_symbol = param_data_type; |
|
4528 |
|
4529 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4530 { |
|
4531 |
|
4532 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4533 |
|
4534 if (IN_type_symbol == NULL) |
|
4535 IN_type_symbol = last_type_symbol; |
|
4536 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4537 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4538 function_type_prefix = return_type_symbol; |
|
4539 break; |
|
4540 |
|
4541 } |
|
4542 |
|
4543 |
|
4544 ERROR; |
|
4545 } |
|
4546 |
|
4547 }/*function_dt_to_ulint*/ |
|
4548 break; |
|
4549 |
|
4550 /**** |
|
4551 *DT_TO_INT |
|
4552 */ |
|
4553 case function_dt_to_int : |
|
4554 { |
|
4555 symbol_c *last_type_symbol = &search_constant_type_c::dt_type_name; |
|
4556 |
|
4557 { |
|
4558 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4560 symbol_c *IN_param_value = &this->default_variable_name; |
|
4561 |
|
4562 symbol_c *IN_type_symbol = param_data_type; |
|
4563 last_type_symbol = param_data_type; |
|
4564 |
|
4565 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4566 { |
|
4567 |
|
4568 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4569 |
|
4570 if (IN_type_symbol == NULL) |
|
4571 IN_type_symbol = last_type_symbol; |
|
4572 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4573 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4574 function_type_prefix = return_type_symbol; |
|
4575 break; |
|
4576 |
|
4577 } |
|
4578 |
|
4579 |
|
4580 ERROR; |
|
4581 } |
|
4582 |
|
4583 }/*function_dt_to_int*/ |
|
4584 break; |
|
4585 |
|
4586 /**** |
|
4587 *TOD_TO_REAL |
|
4588 */ |
|
4589 case function_tod_to_real : |
|
4590 { |
|
4591 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4592 |
|
4593 { |
|
4594 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4595 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4596 symbol_c *IN_param_value = &this->default_variable_name; |
|
4597 |
|
4598 symbol_c *IN_type_symbol = param_data_type; |
|
4599 last_type_symbol = param_data_type; |
|
4600 |
|
4601 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4602 { |
|
4603 |
|
4604 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4605 |
|
4606 if (IN_type_symbol == NULL) |
|
4607 IN_type_symbol = last_type_symbol; |
|
4608 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4609 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4610 function_type_prefix = return_type_symbol; |
|
4611 break; |
|
4612 |
|
4613 } |
|
4614 |
|
4615 |
|
4616 ERROR; |
|
4617 } |
|
4618 |
|
4619 }/*function_tod_to_real*/ |
|
4620 break; |
|
4621 |
|
4622 /**** |
|
4623 *TOD_TO_SINT |
|
4624 */ |
|
4625 case function_tod_to_sint : |
|
4626 { |
|
4627 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4628 |
|
4629 { |
|
4630 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4631 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4632 symbol_c *IN_param_value = &this->default_variable_name; |
|
4633 |
|
4634 symbol_c *IN_type_symbol = param_data_type; |
|
4635 last_type_symbol = param_data_type; |
|
4636 |
|
4637 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4638 { |
|
4639 |
|
4640 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4641 |
|
4642 if (IN_type_symbol == NULL) |
|
4643 IN_type_symbol = last_type_symbol; |
|
4644 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4645 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4646 function_type_prefix = return_type_symbol; |
|
4647 break; |
|
4648 |
|
4649 } |
|
4650 |
|
4651 |
|
4652 ERROR; |
|
4653 } |
|
4654 |
|
4655 }/*function_tod_to_sint*/ |
|
4656 break; |
|
4657 |
|
4658 /**** |
|
4659 *TOD_TO_LINT |
|
4660 */ |
|
4661 case function_tod_to_lint : |
|
4662 { |
|
4663 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4664 |
|
4665 { |
|
4666 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4667 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4668 symbol_c *IN_param_value = &this->default_variable_name; |
|
4669 |
|
4670 symbol_c *IN_type_symbol = param_data_type; |
|
4671 last_type_symbol = param_data_type; |
|
4672 |
|
4673 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4674 { |
|
4675 |
|
4676 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4677 |
|
4678 if (IN_type_symbol == NULL) |
|
4679 IN_type_symbol = last_type_symbol; |
|
4680 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4681 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4682 function_type_prefix = return_type_symbol; |
|
4683 break; |
|
4684 |
|
4685 } |
|
4686 |
|
4687 |
|
4688 ERROR; |
|
4689 } |
|
4690 |
|
4691 }/*function_tod_to_lint*/ |
|
4692 break; |
|
4693 |
|
4694 /**** |
|
4695 *TOD_TO_DINT |
|
4696 */ |
|
4697 case function_tod_to_dint : |
|
4698 { |
|
4699 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4700 |
|
4701 { |
|
4702 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4703 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4704 symbol_c *IN_param_value = &this->default_variable_name; |
|
4705 |
|
4706 symbol_c *IN_type_symbol = param_data_type; |
|
4707 last_type_symbol = param_data_type; |
|
4708 |
|
4709 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4710 { |
|
4711 |
|
4712 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4713 |
|
4714 if (IN_type_symbol == NULL) |
|
4715 IN_type_symbol = last_type_symbol; |
|
4716 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4717 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4718 function_type_prefix = return_type_symbol; |
|
4719 break; |
|
4720 |
|
4721 } |
|
4722 |
|
4723 |
|
4724 ERROR; |
|
4725 } |
|
4726 |
|
4727 }/*function_tod_to_dint*/ |
|
4728 break; |
|
4729 |
|
4730 /**** |
|
4731 *TOD_TO_DWORD |
|
4732 */ |
|
4733 case function_tod_to_dword : |
|
4734 { |
|
4735 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4736 |
|
4737 { |
|
4738 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4740 symbol_c *IN_param_value = &this->default_variable_name; |
|
4741 |
|
4742 symbol_c *IN_type_symbol = param_data_type; |
|
4743 last_type_symbol = param_data_type; |
|
4744 |
|
4745 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4746 { |
|
4747 |
|
4748 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4749 |
|
4750 if (IN_type_symbol == NULL) |
|
4751 IN_type_symbol = last_type_symbol; |
|
4752 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4753 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4754 function_type_prefix = return_type_symbol; |
|
4755 break; |
|
4756 |
|
4757 } |
|
4758 |
|
4759 |
|
4760 ERROR; |
|
4761 } |
|
4762 |
|
4763 }/*function_tod_to_dword*/ |
|
4764 break; |
|
4765 |
|
4766 /**** |
|
4767 *TOD_TO_UDINT |
|
4768 */ |
|
4769 case function_tod_to_udint : |
|
4770 { |
|
4771 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4772 |
|
4773 { |
|
4774 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4776 symbol_c *IN_param_value = &this->default_variable_name; |
|
4777 |
|
4778 symbol_c *IN_type_symbol = param_data_type; |
|
4779 last_type_symbol = param_data_type; |
|
4780 |
|
4781 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4782 { |
|
4783 |
|
4784 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4785 |
|
4786 if (IN_type_symbol == NULL) |
|
4787 IN_type_symbol = last_type_symbol; |
|
4788 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4789 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4790 function_type_prefix = return_type_symbol; |
|
4791 break; |
|
4792 |
|
4793 } |
|
4794 |
|
4795 |
|
4796 ERROR; |
|
4797 } |
|
4798 |
|
4799 }/*function_tod_to_udint*/ |
|
4800 break; |
|
4801 |
|
4802 /**** |
|
4803 *TOD_TO_WORD |
|
4804 */ |
|
4805 case function_tod_to_word : |
|
4806 { |
|
4807 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4808 |
|
4809 { |
|
4810 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4812 symbol_c *IN_param_value = &this->default_variable_name; |
|
4813 |
|
4814 symbol_c *IN_type_symbol = param_data_type; |
|
4815 last_type_symbol = param_data_type; |
|
4816 |
|
4817 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4818 { |
|
4819 |
|
4820 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4821 |
|
4822 if (IN_type_symbol == NULL) |
|
4823 IN_type_symbol = last_type_symbol; |
|
4824 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4825 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4826 function_type_prefix = return_type_symbol; |
|
4827 break; |
|
4828 |
|
4829 } |
|
4830 |
|
4831 |
|
4832 ERROR; |
|
4833 } |
|
4834 |
|
4835 }/*function_tod_to_word*/ |
|
4836 break; |
|
4837 |
|
4838 /**** |
|
4839 *TOD_TO_STRING |
|
4840 */ |
|
4841 case function_tod_to_string : |
|
4842 { |
|
4843 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4844 |
|
4845 { |
|
4846 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4847 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4848 symbol_c *IN_param_value = &this->default_variable_name; |
|
4849 |
|
4850 symbol_c *IN_type_symbol = param_data_type; |
|
4851 last_type_symbol = param_data_type; |
|
4852 |
|
4853 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4854 { |
|
4855 |
|
4856 function_name = (symbol_c*)(new pragma_c("__tod_to_string")); |
|
4857 |
|
4858 if (IN_type_symbol == NULL) |
|
4859 IN_type_symbol = last_type_symbol; |
|
4860 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4861 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4862 function_type_prefix = return_type_symbol; |
|
4863 break; |
|
4864 |
|
4865 } |
|
4866 |
|
4867 |
|
4868 ERROR; |
|
4869 } |
|
4870 |
|
4871 }/*function_tod_to_string*/ |
|
4872 break; |
|
4873 |
|
4874 /**** |
|
4875 *TOD_TO_LWORD |
|
4876 */ |
|
4877 case function_tod_to_lword : |
|
4878 { |
|
4879 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4880 |
|
4881 { |
|
4882 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4883 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4884 symbol_c *IN_param_value = &this->default_variable_name; |
|
4885 |
|
4886 symbol_c *IN_type_symbol = param_data_type; |
|
4887 last_type_symbol = param_data_type; |
|
4888 |
|
4889 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4890 { |
|
4891 |
|
4892 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4893 |
|
4894 if (IN_type_symbol == NULL) |
|
4895 IN_type_symbol = last_type_symbol; |
|
4896 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4897 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4898 function_type_prefix = return_type_symbol; |
|
4899 break; |
|
4900 |
|
4901 } |
|
4902 |
|
4903 |
|
4904 ERROR; |
|
4905 } |
|
4906 |
|
4907 }/*function_tod_to_lword*/ |
|
4908 break; |
|
4909 |
|
4910 /**** |
|
4911 *TOD_TO_UINT |
|
4912 */ |
|
4913 case function_tod_to_uint : |
|
4914 { |
|
4915 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4916 |
|
4917 { |
|
4918 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4919 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4920 symbol_c *IN_param_value = &this->default_variable_name; |
|
4921 |
|
4922 symbol_c *IN_type_symbol = param_data_type; |
|
4923 last_type_symbol = param_data_type; |
|
4924 |
|
4925 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4926 { |
|
4927 |
|
4928 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4929 |
|
4930 if (IN_type_symbol == NULL) |
|
4931 IN_type_symbol = last_type_symbol; |
|
4932 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4933 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4934 function_type_prefix = return_type_symbol; |
|
4935 break; |
|
4936 |
|
4937 } |
|
4938 |
|
4939 |
|
4940 ERROR; |
|
4941 } |
|
4942 |
|
4943 }/*function_tod_to_uint*/ |
|
4944 break; |
|
4945 |
|
4946 /**** |
|
4947 *TOD_TO_LREAL |
|
4948 */ |
|
4949 case function_tod_to_lreal : |
|
4950 { |
|
4951 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4952 |
|
4953 { |
|
4954 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4962 { |
|
4963 |
|
4964 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4965 |
|
4966 if (IN_type_symbol == NULL) |
|
4967 IN_type_symbol = last_type_symbol; |
|
4968 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4969 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4970 function_type_prefix = return_type_symbol; |
|
4971 break; |
|
4972 |
|
4973 } |
|
4974 |
|
4975 |
|
4976 ERROR; |
|
4977 } |
|
4978 |
|
4979 }/*function_tod_to_lreal*/ |
|
4980 break; |
|
4981 |
|
4982 /**** |
|
4983 *TOD_TO_BYTE |
|
4984 */ |
|
4985 case function_tod_to_byte : |
|
4986 { |
|
4987 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
4988 |
|
4989 { |
|
4990 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4991 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4992 symbol_c *IN_param_value = &this->default_variable_name; |
|
4993 |
|
4994 symbol_c *IN_type_symbol = param_data_type; |
|
4995 last_type_symbol = param_data_type; |
|
4996 |
|
4997 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4998 { |
|
4999 |
|
5000 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5001 |
|
5002 if (IN_type_symbol == NULL) |
|
5003 IN_type_symbol = last_type_symbol; |
|
5004 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5005 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5006 function_type_prefix = return_type_symbol; |
|
5007 break; |
|
5008 |
|
5009 } |
|
5010 |
|
5011 |
|
5012 ERROR; |
|
5013 } |
|
5014 |
|
5015 }/*function_tod_to_byte*/ |
|
5016 break; |
|
5017 |
|
5018 /**** |
|
5019 *TOD_TO_USINT |
|
5020 */ |
|
5021 case function_tod_to_usint : |
|
5022 { |
|
5023 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
5024 |
|
5025 { |
|
5026 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5027 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5028 symbol_c *IN_param_value = &this->default_variable_name; |
|
5029 |
|
5030 symbol_c *IN_type_symbol = param_data_type; |
|
5031 last_type_symbol = param_data_type; |
|
5032 |
|
5033 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5034 { |
|
5035 |
|
5036 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5037 |
|
5038 if (IN_type_symbol == NULL) |
|
5039 IN_type_symbol = last_type_symbol; |
|
5040 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5041 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5042 function_type_prefix = return_type_symbol; |
|
5043 break; |
|
5044 |
|
5045 } |
|
5046 |
|
5047 |
|
5048 ERROR; |
|
5049 } |
|
5050 |
|
5051 }/*function_tod_to_usint*/ |
|
5052 break; |
|
5053 |
|
5054 /**** |
|
5055 *TOD_TO_ULINT |
|
5056 */ |
|
5057 case function_tod_to_ulint : |
|
5058 { |
|
5059 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
5060 |
|
5061 { |
|
5062 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5063 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5064 symbol_c *IN_param_value = &this->default_variable_name; |
|
5065 |
|
5066 symbol_c *IN_type_symbol = param_data_type; |
|
5067 last_type_symbol = param_data_type; |
|
5068 |
|
5069 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5070 { |
|
5071 |
|
5072 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5073 |
|
5074 if (IN_type_symbol == NULL) |
|
5075 IN_type_symbol = last_type_symbol; |
|
5076 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5077 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5078 function_type_prefix = return_type_symbol; |
|
5079 break; |
|
5080 |
|
5081 } |
|
5082 |
|
5083 |
|
5084 ERROR; |
|
5085 } |
|
5086 |
|
5087 }/*function_tod_to_ulint*/ |
|
5088 break; |
|
5089 |
|
5090 /**** |
|
5091 *TOD_TO_INT |
|
5092 */ |
|
5093 case function_tod_to_int : |
|
5094 { |
|
5095 symbol_c *last_type_symbol = &search_constant_type_c::tod_type_name; |
|
5096 |
|
5097 { |
|
5098 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5099 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5100 symbol_c *IN_param_value = &this->default_variable_name; |
|
5101 |
|
5102 symbol_c *IN_type_symbol = param_data_type; |
|
5103 last_type_symbol = param_data_type; |
|
5104 |
|
5105 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5106 { |
|
5107 |
|
5108 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5109 |
|
5110 if (IN_type_symbol == NULL) |
|
5111 IN_type_symbol = last_type_symbol; |
|
5112 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5113 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5114 function_type_prefix = return_type_symbol; |
|
5115 break; |
|
5116 |
|
5117 } |
|
5118 |
|
5119 |
|
5120 ERROR; |
|
5121 } |
|
5122 |
|
5123 }/*function_tod_to_int*/ |
|
5124 break; |
|
5125 |
|
5126 /**** |
|
5127 *UDINT_TO_REAL |
|
5128 */ |
|
5129 case function_udint_to_real : |
|
5130 { |
|
5131 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5132 |
|
5133 { |
|
5134 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5136 symbol_c *IN_param_value = &this->default_variable_name; |
|
5137 |
|
5138 symbol_c *IN_type_symbol = param_data_type; |
|
5139 last_type_symbol = param_data_type; |
|
5140 |
|
5141 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5142 { |
|
5143 |
|
5144 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5145 |
|
5146 if (IN_type_symbol == NULL) |
|
5147 IN_type_symbol = last_type_symbol; |
|
5148 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5149 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5150 function_type_prefix = return_type_symbol; |
|
5151 function_type_suffix = IN_type_symbol; |
|
5152 break; |
|
5153 |
|
5154 } |
|
5155 |
|
5156 |
|
5157 ERROR; |
|
5158 } |
|
5159 |
|
5160 }/*function_udint_to_real*/ |
|
5161 break; |
|
5162 |
|
5163 /**** |
|
5164 *UDINT_TO_SINT |
|
5165 */ |
|
5166 case function_udint_to_sint : |
|
5167 { |
|
5168 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5169 |
|
5170 { |
|
5171 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5172 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5173 symbol_c *IN_param_value = &this->default_variable_name; |
|
5174 |
|
5175 symbol_c *IN_type_symbol = param_data_type; |
|
5176 last_type_symbol = param_data_type; |
|
5177 |
|
5178 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5179 { |
|
5180 |
|
5181 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5182 |
|
5183 if (IN_type_symbol == NULL) |
|
5184 IN_type_symbol = last_type_symbol; |
|
5185 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5186 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5187 function_type_prefix = return_type_symbol; |
|
5188 function_type_suffix = IN_type_symbol; |
|
5189 break; |
|
5190 |
|
5191 } |
|
5192 |
|
5193 |
|
5194 ERROR; |
|
5195 } |
|
5196 |
|
5197 }/*function_udint_to_sint*/ |
|
5198 break; |
|
5199 |
|
5200 /**** |
|
5201 *UDINT_TO_LINT |
|
5202 */ |
|
5203 case function_udint_to_lint : |
|
5204 { |
|
5205 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5206 |
|
5207 { |
|
5208 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5209 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5210 symbol_c *IN_param_value = &this->default_variable_name; |
|
5211 |
|
5212 symbol_c *IN_type_symbol = param_data_type; |
|
5213 last_type_symbol = param_data_type; |
|
5214 |
|
5215 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5216 { |
|
5217 |
|
5218 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5219 |
|
5220 if (IN_type_symbol == NULL) |
|
5221 IN_type_symbol = last_type_symbol; |
|
5222 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5223 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5224 function_type_prefix = return_type_symbol; |
|
5225 function_type_suffix = IN_type_symbol; |
|
5226 break; |
|
5227 |
|
5228 } |
|
5229 |
|
5230 |
|
5231 ERROR; |
|
5232 } |
|
5233 |
|
5234 }/*function_udint_to_lint*/ |
|
5235 break; |
|
5236 |
|
5237 /**** |
|
5238 *UDINT_TO_DINT |
|
5239 */ |
|
5240 case function_udint_to_dint : |
|
5241 { |
|
5242 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5243 |
|
5244 { |
|
5245 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5246 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5247 symbol_c *IN_param_value = &this->default_variable_name; |
|
5248 |
|
5249 symbol_c *IN_type_symbol = param_data_type; |
|
5250 last_type_symbol = param_data_type; |
|
5251 |
|
5252 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5253 { |
|
5254 |
|
5255 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5256 |
|
5257 if (IN_type_symbol == NULL) |
|
5258 IN_type_symbol = last_type_symbol; |
|
5259 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5260 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5261 function_type_prefix = return_type_symbol; |
|
5262 function_type_suffix = IN_type_symbol; |
|
5263 break; |
|
5264 |
|
5265 } |
|
5266 |
|
5267 |
|
5268 ERROR; |
|
5269 } |
|
5270 |
|
5271 }/*function_udint_to_dint*/ |
|
5272 break; |
|
5273 |
|
5274 /**** |
|
5275 *UDINT_TO_DATE |
|
5276 */ |
|
5277 case function_udint_to_date : |
|
5278 { |
|
5279 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5280 |
|
5281 { |
|
5282 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5283 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5284 symbol_c *IN_param_value = &this->default_variable_name; |
|
5285 |
|
5286 symbol_c *IN_type_symbol = param_data_type; |
|
5287 last_type_symbol = param_data_type; |
|
5288 |
|
5289 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5290 { |
|
5291 |
|
5292 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5293 |
|
5294 if (IN_type_symbol == NULL) |
|
5295 IN_type_symbol = last_type_symbol; |
|
5296 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5297 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5298 function_type_prefix = return_type_symbol; |
|
5299 break; |
|
5300 |
|
5301 } |
|
5302 |
|
5303 |
|
5304 ERROR; |
|
5305 } |
|
5306 |
|
5307 }/*function_udint_to_date*/ |
|
5308 break; |
|
5309 |
|
5310 /**** |
|
5311 *UDINT_TO_DWORD |
|
5312 */ |
|
5313 case function_udint_to_dword : |
|
5314 { |
|
5315 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5316 |
|
5317 { |
|
5318 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5319 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5320 symbol_c *IN_param_value = &this->default_variable_name; |
|
5321 |
|
5322 symbol_c *IN_type_symbol = param_data_type; |
|
5323 last_type_symbol = param_data_type; |
|
5324 |
|
5325 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5326 { |
|
5327 |
|
5328 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5329 |
|
5330 if (IN_type_symbol == NULL) |
|
5331 IN_type_symbol = last_type_symbol; |
|
5332 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5333 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5334 function_type_prefix = return_type_symbol; |
|
5335 function_type_suffix = IN_type_symbol; |
|
5336 break; |
|
5337 |
|
5338 } |
|
5339 |
|
5340 |
|
5341 ERROR; |
|
5342 } |
|
5343 |
|
5344 }/*function_udint_to_dword*/ |
|
5345 break; |
|
5346 |
|
5347 /**** |
|
5348 *UDINT_TO_DT |
|
5349 */ |
|
5350 case function_udint_to_dt : |
|
5351 { |
|
5352 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5353 |
|
5354 { |
|
5355 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5356 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5357 symbol_c *IN_param_value = &this->default_variable_name; |
|
5358 |
|
5359 symbol_c *IN_type_symbol = param_data_type; |
|
5360 last_type_symbol = param_data_type; |
|
5361 |
|
5362 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5363 { |
|
5364 |
|
5365 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5366 |
|
5367 if (IN_type_symbol == NULL) |
|
5368 IN_type_symbol = last_type_symbol; |
|
5369 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5370 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5371 function_type_prefix = return_type_symbol; |
|
5372 break; |
|
5373 |
|
5374 } |
|
5375 |
|
5376 |
|
5377 ERROR; |
|
5378 } |
|
5379 |
|
5380 }/*function_udint_to_dt*/ |
|
5381 break; |
|
5382 |
|
5383 /**** |
|
5384 *UDINT_TO_TOD |
|
5385 */ |
|
5386 case function_udint_to_tod : |
|
5387 { |
|
5388 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5389 |
|
5390 { |
|
5391 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5392 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5393 symbol_c *IN_param_value = &this->default_variable_name; |
|
5394 |
|
5395 symbol_c *IN_type_symbol = param_data_type; |
|
5396 last_type_symbol = param_data_type; |
|
5397 |
|
5398 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5399 { |
|
5400 |
|
5401 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5402 |
|
5403 if (IN_type_symbol == NULL) |
|
5404 IN_type_symbol = last_type_symbol; |
|
5405 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5406 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5407 function_type_prefix = return_type_symbol; |
|
5408 break; |
|
5409 |
|
5410 } |
|
5411 |
|
5412 |
|
5413 ERROR; |
|
5414 } |
|
5415 |
|
5416 }/*function_udint_to_tod*/ |
|
5417 break; |
|
5418 |
|
5419 /**** |
|
5420 *UDINT_TO_WORD |
|
5421 */ |
|
5422 case function_udint_to_word : |
|
5423 { |
|
5424 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5425 |
|
5426 { |
|
5427 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5428 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5429 symbol_c *IN_param_value = &this->default_variable_name; |
|
5430 |
|
5431 symbol_c *IN_type_symbol = param_data_type; |
|
5432 last_type_symbol = param_data_type; |
|
5433 |
|
5434 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5435 { |
|
5436 |
|
5437 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5438 |
|
5439 if (IN_type_symbol == NULL) |
|
5440 IN_type_symbol = last_type_symbol; |
|
5441 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5442 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
5443 function_type_prefix = return_type_symbol; |
|
5444 function_type_suffix = IN_type_symbol; |
|
5445 break; |
|
5446 |
|
5447 } |
|
5448 |
|
5449 |
|
5450 ERROR; |
|
5451 } |
|
5452 |
|
5453 }/*function_udint_to_word*/ |
|
5454 break; |
|
5455 |
|
5456 /**** |
|
5457 *UDINT_TO_STRING |
|
5458 */ |
|
5459 case function_udint_to_string : |
|
5460 { |
|
5461 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5462 |
|
5463 { |
|
5464 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5465 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5466 symbol_c *IN_param_value = &this->default_variable_name; |
|
5467 |
|
5468 symbol_c *IN_type_symbol = param_data_type; |
|
5469 last_type_symbol = param_data_type; |
|
5470 |
|
5471 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5472 { |
|
5473 |
|
5474 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
5475 |
|
5476 if (IN_type_symbol == NULL) |
|
5477 IN_type_symbol = last_type_symbol; |
|
5478 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5479 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5480 function_type_prefix = return_type_symbol; |
|
5481 break; |
|
5482 |
|
5483 } |
|
5484 |
|
5485 |
|
5486 ERROR; |
|
5487 } |
|
5488 |
|
5489 }/*function_udint_to_string*/ |
|
5490 break; |
|
5491 |
|
5492 /**** |
|
5493 *UDINT_TO_LWORD |
|
5494 */ |
|
5495 case function_udint_to_lword : |
|
5496 { |
|
5497 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5498 |
|
5499 { |
|
5500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5502 symbol_c *IN_param_value = &this->default_variable_name; |
|
5503 |
|
5504 symbol_c *IN_type_symbol = param_data_type; |
|
5505 last_type_symbol = param_data_type; |
|
5506 |
|
5507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5508 { |
|
5509 |
|
5510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5511 |
|
5512 if (IN_type_symbol == NULL) |
|
5513 IN_type_symbol = last_type_symbol; |
|
5514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5515 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5516 function_type_prefix = return_type_symbol; |
|
5517 function_type_suffix = IN_type_symbol; |
|
5518 break; |
|
5519 |
|
5520 } |
|
5521 |
|
5522 |
|
5523 ERROR; |
|
5524 } |
|
5525 |
|
5526 }/*function_udint_to_lword*/ |
|
5527 break; |
|
5528 |
|
5529 /**** |
|
5530 *UDINT_TO_UINT |
|
5531 */ |
|
5532 case function_udint_to_uint : |
|
5533 { |
|
5534 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5535 |
|
5536 { |
|
5537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5539 symbol_c *IN_param_value = &this->default_variable_name; |
|
5540 |
|
5541 symbol_c *IN_type_symbol = param_data_type; |
|
5542 last_type_symbol = param_data_type; |
|
5543 |
|
5544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5545 { |
|
5546 |
|
5547 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5548 |
|
5549 if (IN_type_symbol == NULL) |
|
5550 IN_type_symbol = last_type_symbol; |
|
5551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5552 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5553 function_type_prefix = return_type_symbol; |
|
5554 function_type_suffix = IN_type_symbol; |
|
5555 break; |
|
5556 |
|
5557 } |
|
5558 |
|
5559 |
|
5560 ERROR; |
|
5561 } |
|
5562 |
|
5563 }/*function_udint_to_uint*/ |
|
5564 break; |
|
5565 |
|
5566 /**** |
|
5567 *UDINT_TO_LREAL |
|
5568 */ |
|
5569 case function_udint_to_lreal : |
|
5570 { |
|
5571 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5572 |
|
5573 { |
|
5574 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5576 symbol_c *IN_param_value = &this->default_variable_name; |
|
5577 |
|
5578 symbol_c *IN_type_symbol = param_data_type; |
|
5579 last_type_symbol = param_data_type; |
|
5580 |
|
5581 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5582 { |
|
5583 |
|
5584 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5585 |
|
5586 if (IN_type_symbol == NULL) |
|
5587 IN_type_symbol = last_type_symbol; |
|
5588 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5589 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5590 function_type_prefix = return_type_symbol; |
|
5591 function_type_suffix = IN_type_symbol; |
|
5592 break; |
|
5593 |
|
5594 } |
|
5595 |
|
5596 |
|
5597 ERROR; |
|
5598 } |
|
5599 |
|
5600 }/*function_udint_to_lreal*/ |
|
5601 break; |
|
5602 |
|
5603 /**** |
|
5604 *UDINT_TO_BYTE |
|
5605 */ |
|
5606 case function_udint_to_byte : |
|
5607 { |
|
5608 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5609 |
|
5610 { |
|
5611 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5612 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5613 symbol_c *IN_param_value = &this->default_variable_name; |
|
5614 |
|
5615 symbol_c *IN_type_symbol = param_data_type; |
|
5616 last_type_symbol = param_data_type; |
|
5617 |
|
5618 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5619 { |
|
5620 |
|
5621 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5622 |
|
5623 if (IN_type_symbol == NULL) |
|
5624 IN_type_symbol = last_type_symbol; |
|
5625 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5626 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5627 function_type_prefix = return_type_symbol; |
|
5628 function_type_suffix = IN_type_symbol; |
|
5629 break; |
|
5630 |
|
5631 } |
|
5632 |
|
5633 |
|
5634 ERROR; |
|
5635 } |
|
5636 |
|
5637 }/*function_udint_to_byte*/ |
|
5638 break; |
|
5639 |
|
5640 /**** |
|
5641 *UDINT_TO_USINT |
|
5642 */ |
|
5643 case function_udint_to_usint : |
|
5644 { |
|
5645 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5646 |
|
5647 { |
|
5648 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5649 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5650 symbol_c *IN_param_value = &this->default_variable_name; |
|
5651 |
|
5652 symbol_c *IN_type_symbol = param_data_type; |
|
5653 last_type_symbol = param_data_type; |
|
5654 |
|
5655 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5656 { |
|
5657 |
|
5658 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5659 |
|
5660 if (IN_type_symbol == NULL) |
|
5661 IN_type_symbol = last_type_symbol; |
|
5662 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5663 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5664 function_type_prefix = return_type_symbol; |
|
5665 function_type_suffix = IN_type_symbol; |
|
5666 break; |
|
5667 |
|
5668 } |
|
5669 |
|
5670 |
|
5671 ERROR; |
|
5672 } |
|
5673 |
|
5674 }/*function_udint_to_usint*/ |
|
5675 break; |
|
5676 |
|
5677 /**** |
|
5678 *UDINT_TO_ULINT |
|
5679 */ |
|
5680 case function_udint_to_ulint : |
|
5681 { |
|
5682 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5683 |
|
5684 { |
|
5685 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5687 symbol_c *IN_param_value = &this->default_variable_name; |
|
5688 |
|
5689 symbol_c *IN_type_symbol = param_data_type; |
|
5690 last_type_symbol = param_data_type; |
|
5691 |
|
5692 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5693 { |
|
5694 |
|
5695 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5696 |
|
5697 if (IN_type_symbol == NULL) |
|
5698 IN_type_symbol = last_type_symbol; |
|
5699 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5700 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5701 function_type_prefix = return_type_symbol; |
|
5702 function_type_suffix = IN_type_symbol; |
|
5703 break; |
|
5704 |
|
5705 } |
|
5706 |
|
5707 |
|
5708 ERROR; |
|
5709 } |
|
5710 |
|
5711 }/*function_udint_to_ulint*/ |
|
5712 break; |
|
5713 |
|
5714 /**** |
|
5715 *UDINT_TO_BOOL |
|
5716 */ |
|
5717 case function_udint_to_bool : |
|
5718 { |
|
5719 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5720 |
|
5721 { |
|
5722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5724 symbol_c *IN_param_value = &this->default_variable_name; |
|
5725 |
|
5726 symbol_c *IN_type_symbol = param_data_type; |
|
5727 last_type_symbol = param_data_type; |
|
5728 |
|
5729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5730 { |
|
5731 |
|
5732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5733 |
|
5734 if (IN_type_symbol == NULL) |
|
5735 IN_type_symbol = last_type_symbol; |
|
5736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5737 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
5738 function_type_prefix = return_type_symbol; |
|
5739 function_type_suffix = IN_type_symbol; |
|
5740 break; |
|
5741 |
|
5742 } |
|
5743 |
|
5744 |
|
5745 ERROR; |
|
5746 } |
|
5747 |
|
5748 }/*function_udint_to_bool*/ |
|
5749 break; |
|
5750 |
|
5751 /**** |
|
5752 *UDINT_TO_TIME |
|
5753 */ |
|
5754 case function_udint_to_time : |
|
5755 { |
|
5756 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5757 |
|
5758 { |
|
5759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5761 symbol_c *IN_param_value = &this->default_variable_name; |
|
5762 |
|
5763 symbol_c *IN_type_symbol = param_data_type; |
|
5764 last_type_symbol = param_data_type; |
|
5765 |
|
5766 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5767 { |
|
5768 |
|
5769 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5770 |
|
5771 if (IN_type_symbol == NULL) |
|
5772 IN_type_symbol = last_type_symbol; |
|
5773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5774 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5775 function_type_prefix = return_type_symbol; |
|
5776 break; |
|
5777 |
|
5778 } |
|
5779 |
|
5780 |
|
5781 ERROR; |
|
5782 } |
|
5783 |
|
5784 }/*function_udint_to_time*/ |
|
5785 break; |
|
5786 |
|
5787 /**** |
|
5788 *UDINT_TO_INT |
|
5789 */ |
|
5790 case function_udint_to_int : |
|
5791 { |
|
5792 symbol_c *last_type_symbol = &search_constant_type_c::udint_type_name; |
|
5793 |
|
5794 { |
|
5795 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5797 symbol_c *IN_param_value = &this->default_variable_name; |
|
5798 |
|
5799 symbol_c *IN_type_symbol = param_data_type; |
|
5800 last_type_symbol = param_data_type; |
|
5801 |
|
5802 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5803 { |
|
5804 |
|
5805 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5806 |
|
5807 if (IN_type_symbol == NULL) |
|
5808 IN_type_symbol = last_type_symbol; |
|
5809 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5810 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5811 function_type_prefix = return_type_symbol; |
|
5812 function_type_suffix = IN_type_symbol; |
|
5813 break; |
|
5814 |
|
5815 } |
|
5816 |
|
5817 |
|
5818 ERROR; |
|
5819 } |
|
5820 |
|
5821 }/*function_udint_to_int*/ |
|
5822 break; |
|
5823 |
|
5824 /**** |
|
5825 *WORD_TO_REAL |
|
5826 */ |
|
5827 case function_word_to_real : |
|
5828 { |
|
5829 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
5830 |
|
5831 { |
|
5832 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5833 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5834 symbol_c *IN_param_value = &this->default_variable_name; |
|
5835 |
|
5836 symbol_c *IN_type_symbol = param_data_type; |
|
5837 last_type_symbol = param_data_type; |
|
5838 |
|
5839 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5840 { |
|
5841 |
|
5842 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5843 |
|
5844 if (IN_type_symbol == NULL) |
|
5845 IN_type_symbol = last_type_symbol; |
|
5846 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5847 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5848 function_type_prefix = return_type_symbol; |
|
5849 function_type_suffix = IN_type_symbol; |
|
5850 break; |
|
5851 |
|
5852 } |
|
5853 |
|
5854 |
|
5855 ERROR; |
|
5856 } |
|
5857 |
|
5858 }/*function_word_to_real*/ |
|
5859 break; |
|
5860 |
|
5861 /**** |
|
5862 *WORD_TO_SINT |
|
5863 */ |
|
5864 case function_word_to_sint : |
|
5865 { |
|
5866 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
5867 |
|
5868 { |
|
5869 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5871 symbol_c *IN_param_value = &this->default_variable_name; |
|
5872 |
|
5873 symbol_c *IN_type_symbol = param_data_type; |
|
5874 last_type_symbol = param_data_type; |
|
5875 |
|
5876 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5877 { |
|
5878 |
|
5879 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5880 |
|
5881 if (IN_type_symbol == NULL) |
|
5882 IN_type_symbol = last_type_symbol; |
|
5883 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5884 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5885 function_type_prefix = return_type_symbol; |
|
5886 function_type_suffix = IN_type_symbol; |
|
5887 break; |
|
5888 |
|
5889 } |
|
5890 |
|
5891 |
|
5892 ERROR; |
|
5893 } |
|
5894 |
|
5895 }/*function_word_to_sint*/ |
|
5896 break; |
|
5897 |
|
5898 /**** |
|
5899 *WORD_TO_LINT |
|
5900 */ |
|
5901 case function_word_to_lint : |
|
5902 { |
|
5903 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
5904 |
|
5905 { |
|
5906 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5908 symbol_c *IN_param_value = &this->default_variable_name; |
|
5909 |
|
5910 symbol_c *IN_type_symbol = param_data_type; |
|
5911 last_type_symbol = param_data_type; |
|
5912 |
|
5913 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5914 { |
|
5915 |
|
5916 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5917 |
|
5918 if (IN_type_symbol == NULL) |
|
5919 IN_type_symbol = last_type_symbol; |
|
5920 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5921 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5922 function_type_prefix = return_type_symbol; |
|
5923 function_type_suffix = IN_type_symbol; |
|
5924 break; |
|
5925 |
|
5926 } |
|
5927 |
|
5928 |
|
5929 ERROR; |
|
5930 } |
|
5931 |
|
5932 }/*function_word_to_lint*/ |
|
5933 break; |
|
5934 |
|
5935 /**** |
|
5936 *WORD_TO_DINT |
|
5937 */ |
|
5938 case function_word_to_dint : |
|
5939 { |
|
5940 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
5941 |
|
5942 { |
|
5943 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5944 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5945 symbol_c *IN_param_value = &this->default_variable_name; |
|
5946 |
|
5947 symbol_c *IN_type_symbol = param_data_type; |
|
5948 last_type_symbol = param_data_type; |
|
5949 |
|
5950 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5951 { |
|
5952 |
|
5953 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5954 |
|
5955 if (IN_type_symbol == NULL) |
|
5956 IN_type_symbol = last_type_symbol; |
|
5957 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5958 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5959 function_type_prefix = return_type_symbol; |
|
5960 function_type_suffix = IN_type_symbol; |
|
5961 break; |
|
5962 |
|
5963 } |
|
5964 |
|
5965 |
|
5966 ERROR; |
|
5967 } |
|
5968 |
|
5969 }/*function_word_to_dint*/ |
|
5970 break; |
|
5971 |
|
5972 /**** |
|
5973 *WORD_TO_DATE |
|
5974 */ |
|
5975 case function_word_to_date : |
|
5976 { |
|
5977 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
5978 |
|
5979 { |
|
5980 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5981 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5982 symbol_c *IN_param_value = &this->default_variable_name; |
|
5983 |
|
5984 symbol_c *IN_type_symbol = param_data_type; |
|
5985 last_type_symbol = param_data_type; |
|
5986 |
|
5987 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5988 { |
|
5989 |
|
5990 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5991 |
|
5992 if (IN_type_symbol == NULL) |
|
5993 IN_type_symbol = last_type_symbol; |
|
5994 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5995 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5996 function_type_prefix = return_type_symbol; |
|
5997 break; |
|
5998 |
|
5999 } |
|
6000 |
|
6001 |
|
6002 ERROR; |
|
6003 } |
|
6004 |
|
6005 }/*function_word_to_date*/ |
|
6006 break; |
|
6007 |
|
6008 /**** |
|
6009 *WORD_TO_DWORD |
|
6010 */ |
|
6011 case function_word_to_dword : |
|
6012 { |
|
6013 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6014 |
|
6015 { |
|
6016 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6017 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6018 symbol_c *IN_param_value = &this->default_variable_name; |
|
6019 |
|
6020 symbol_c *IN_type_symbol = param_data_type; |
|
6021 last_type_symbol = param_data_type; |
|
6022 |
|
6023 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6024 { |
|
6025 |
|
6026 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6027 |
|
6028 if (IN_type_symbol == NULL) |
|
6029 IN_type_symbol = last_type_symbol; |
|
6030 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6031 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6032 function_type_prefix = return_type_symbol; |
|
6033 function_type_suffix = IN_type_symbol; |
|
6034 break; |
|
6035 |
|
6036 } |
|
6037 |
|
6038 |
|
6039 ERROR; |
|
6040 } |
|
6041 |
|
6042 }/*function_word_to_dword*/ |
|
6043 break; |
|
6044 |
|
6045 /**** |
|
6046 *WORD_TO_DT |
|
6047 */ |
|
6048 case function_word_to_dt : |
|
6049 { |
|
6050 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6051 |
|
6052 { |
|
6053 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6061 { |
|
6062 |
|
6063 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6064 |
|
6065 if (IN_type_symbol == NULL) |
|
6066 IN_type_symbol = last_type_symbol; |
|
6067 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6068 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6069 function_type_prefix = return_type_symbol; |
|
6070 break; |
|
6071 |
|
6072 } |
|
6073 |
|
6074 |
|
6075 ERROR; |
|
6076 } |
|
6077 |
|
6078 }/*function_word_to_dt*/ |
|
6079 break; |
|
6080 |
|
6081 /**** |
|
6082 *WORD_TO_TOD |
|
6083 */ |
|
6084 case function_word_to_tod : |
|
6085 { |
|
6086 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6087 |
|
6088 { |
|
6089 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6090 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6091 symbol_c *IN_param_value = &this->default_variable_name; |
|
6092 |
|
6093 symbol_c *IN_type_symbol = param_data_type; |
|
6094 last_type_symbol = param_data_type; |
|
6095 |
|
6096 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6097 { |
|
6098 |
|
6099 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6100 |
|
6101 if (IN_type_symbol == NULL) |
|
6102 IN_type_symbol = last_type_symbol; |
|
6103 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6104 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6105 function_type_prefix = return_type_symbol; |
|
6106 break; |
|
6107 |
|
6108 } |
|
6109 |
|
6110 |
|
6111 ERROR; |
|
6112 } |
|
6113 |
|
6114 }/*function_word_to_tod*/ |
|
6115 break; |
|
6116 |
|
6117 /**** |
|
6118 *WORD_TO_UDINT |
|
6119 */ |
|
6120 case function_word_to_udint : |
|
6121 { |
|
6122 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6123 |
|
6124 { |
|
6125 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6127 symbol_c *IN_param_value = &this->default_variable_name; |
|
6128 |
|
6129 symbol_c *IN_type_symbol = param_data_type; |
|
6130 last_type_symbol = param_data_type; |
|
6131 |
|
6132 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6133 { |
|
6134 |
|
6135 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6136 |
|
6137 if (IN_type_symbol == NULL) |
|
6138 IN_type_symbol = last_type_symbol; |
|
6139 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6140 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6141 function_type_prefix = return_type_symbol; |
|
6142 function_type_suffix = IN_type_symbol; |
|
6143 break; |
|
6144 |
|
6145 } |
|
6146 |
|
6147 |
|
6148 ERROR; |
|
6149 } |
|
6150 |
|
6151 }/*function_word_to_udint*/ |
|
6152 break; |
|
6153 |
|
6154 /**** |
|
6155 *WORD_TO_STRING |
|
6156 */ |
|
6157 case function_word_to_string : |
|
6158 { |
|
6159 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6160 |
|
6161 { |
|
6162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6164 symbol_c *IN_param_value = &this->default_variable_name; |
|
6165 |
|
6166 symbol_c *IN_type_symbol = param_data_type; |
|
6167 last_type_symbol = param_data_type; |
|
6168 |
|
6169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6170 { |
|
6171 |
|
6172 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
6173 |
|
6174 if (IN_type_symbol == NULL) |
|
6175 IN_type_symbol = last_type_symbol; |
|
6176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6177 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6178 function_type_prefix = return_type_symbol; |
|
6179 break; |
|
6180 |
|
6181 } |
|
6182 |
|
6183 |
|
6184 ERROR; |
|
6185 } |
|
6186 |
|
6187 }/*function_word_to_string*/ |
|
6188 break; |
|
6189 |
|
6190 /**** |
|
6191 *WORD_TO_LWORD |
|
6192 */ |
|
6193 case function_word_to_lword : |
|
6194 { |
|
6195 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6196 |
|
6197 { |
|
6198 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6200 symbol_c *IN_param_value = &this->default_variable_name; |
|
6201 |
|
6202 symbol_c *IN_type_symbol = param_data_type; |
|
6203 last_type_symbol = param_data_type; |
|
6204 |
|
6205 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6206 { |
|
6207 |
|
6208 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6209 |
|
6210 if (IN_type_symbol == NULL) |
|
6211 IN_type_symbol = last_type_symbol; |
|
6212 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6213 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6214 function_type_prefix = return_type_symbol; |
|
6215 function_type_suffix = IN_type_symbol; |
|
6216 break; |
|
6217 |
|
6218 } |
|
6219 |
|
6220 |
|
6221 ERROR; |
|
6222 } |
|
6223 |
|
6224 }/*function_word_to_lword*/ |
|
6225 break; |
|
6226 |
|
6227 /**** |
|
6228 *WORD_TO_UINT |
|
6229 */ |
|
6230 case function_word_to_uint : |
|
6231 { |
|
6232 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6233 |
|
6234 { |
|
6235 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6236 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6237 symbol_c *IN_param_value = &this->default_variable_name; |
|
6238 |
|
6239 symbol_c *IN_type_symbol = param_data_type; |
|
6240 last_type_symbol = param_data_type; |
|
6241 |
|
6242 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6243 { |
|
6244 |
|
6245 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6246 |
|
6247 if (IN_type_symbol == NULL) |
|
6248 IN_type_symbol = last_type_symbol; |
|
6249 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6250 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6251 function_type_prefix = return_type_symbol; |
|
6252 function_type_suffix = IN_type_symbol; |
|
6253 break; |
|
6254 |
|
6255 } |
|
6256 |
|
6257 |
|
6258 ERROR; |
|
6259 } |
|
6260 |
|
6261 }/*function_word_to_uint*/ |
|
6262 break; |
|
6263 |
|
6264 /**** |
|
6265 *WORD_TO_LREAL |
|
6266 */ |
|
6267 case function_word_to_lreal : |
|
6268 { |
|
6269 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6270 |
|
6271 { |
|
6272 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6273 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6274 symbol_c *IN_param_value = &this->default_variable_name; |
|
6275 |
|
6276 symbol_c *IN_type_symbol = param_data_type; |
|
6277 last_type_symbol = param_data_type; |
|
6278 |
|
6279 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6280 { |
|
6281 |
|
6282 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6283 |
|
6284 if (IN_type_symbol == NULL) |
|
6285 IN_type_symbol = last_type_symbol; |
|
6286 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6287 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6288 function_type_prefix = return_type_symbol; |
|
6289 function_type_suffix = IN_type_symbol; |
|
6290 break; |
|
6291 |
|
6292 } |
|
6293 |
|
6294 |
|
6295 ERROR; |
|
6296 } |
|
6297 |
|
6298 }/*function_word_to_lreal*/ |
|
6299 break; |
|
6300 |
|
6301 /**** |
|
6302 *WORD_TO_BYTE |
|
6303 */ |
|
6304 case function_word_to_byte : |
|
6305 { |
|
6306 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6307 |
|
6308 { |
|
6309 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6310 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6311 symbol_c *IN_param_value = &this->default_variable_name; |
|
6312 |
|
6313 symbol_c *IN_type_symbol = param_data_type; |
|
6314 last_type_symbol = param_data_type; |
|
6315 |
|
6316 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6317 { |
|
6318 |
|
6319 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6320 |
|
6321 if (IN_type_symbol == NULL) |
|
6322 IN_type_symbol = last_type_symbol; |
|
6323 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6324 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6325 function_type_prefix = return_type_symbol; |
|
6326 function_type_suffix = IN_type_symbol; |
|
6327 break; |
|
6328 |
|
6329 } |
|
6330 |
|
6331 |
|
6332 ERROR; |
|
6333 } |
|
6334 |
|
6335 }/*function_word_to_byte*/ |
|
6336 break; |
|
6337 |
|
6338 /**** |
|
6339 *WORD_TO_USINT |
|
6340 */ |
|
6341 case function_word_to_usint : |
|
6342 { |
|
6343 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6344 |
|
6345 { |
|
6346 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6347 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6348 symbol_c *IN_param_value = &this->default_variable_name; |
|
6349 |
|
6350 symbol_c *IN_type_symbol = param_data_type; |
|
6351 last_type_symbol = param_data_type; |
|
6352 |
|
6353 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6354 { |
|
6355 |
|
6356 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6357 |
|
6358 if (IN_type_symbol == NULL) |
|
6359 IN_type_symbol = last_type_symbol; |
|
6360 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6361 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6362 function_type_prefix = return_type_symbol; |
|
6363 function_type_suffix = IN_type_symbol; |
|
6364 break; |
|
6365 |
|
6366 } |
|
6367 |
|
6368 |
|
6369 ERROR; |
|
6370 } |
|
6371 |
|
6372 }/*function_word_to_usint*/ |
|
6373 break; |
|
6374 |
|
6375 /**** |
|
6376 *WORD_TO_ULINT |
|
6377 */ |
|
6378 case function_word_to_ulint : |
|
6379 { |
|
6380 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6381 |
|
6382 { |
|
6383 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6384 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6385 symbol_c *IN_param_value = &this->default_variable_name; |
|
6386 |
|
6387 symbol_c *IN_type_symbol = param_data_type; |
|
6388 last_type_symbol = param_data_type; |
|
6389 |
|
6390 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6391 { |
|
6392 |
|
6393 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6394 |
|
6395 if (IN_type_symbol == NULL) |
|
6396 IN_type_symbol = last_type_symbol; |
|
6397 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6398 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6399 function_type_prefix = return_type_symbol; |
|
6400 function_type_suffix = IN_type_symbol; |
|
6401 break; |
|
6402 |
|
6403 } |
|
6404 |
|
6405 |
|
6406 ERROR; |
|
6407 } |
|
6408 |
|
6409 }/*function_word_to_ulint*/ |
|
6410 break; |
|
6411 |
|
6412 /**** |
|
6413 *WORD_TO_BOOL |
|
6414 */ |
|
6415 case function_word_to_bool : |
|
6416 { |
|
6417 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6418 |
|
6419 { |
|
6420 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6422 symbol_c *IN_param_value = &this->default_variable_name; |
|
6423 |
|
6424 symbol_c *IN_type_symbol = param_data_type; |
|
6425 last_type_symbol = param_data_type; |
|
6426 |
|
6427 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6428 { |
|
6429 |
|
6430 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6431 |
|
6432 if (IN_type_symbol == NULL) |
|
6433 IN_type_symbol = last_type_symbol; |
|
6434 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6435 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6436 function_type_prefix = return_type_symbol; |
|
6437 function_type_suffix = IN_type_symbol; |
|
6438 break; |
|
6439 |
|
6440 } |
|
6441 |
|
6442 |
|
6443 ERROR; |
|
6444 } |
|
6445 |
|
6446 }/*function_word_to_bool*/ |
|
6447 break; |
|
6448 |
|
6449 /**** |
|
6450 *WORD_TO_TIME |
|
6451 */ |
|
6452 case function_word_to_time : |
|
6453 { |
|
6454 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6455 |
|
6456 { |
|
6457 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6459 symbol_c *IN_param_value = &this->default_variable_name; |
|
6460 |
|
6461 symbol_c *IN_type_symbol = param_data_type; |
|
6462 last_type_symbol = param_data_type; |
|
6463 |
|
6464 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6465 { |
|
6466 |
|
6467 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6468 |
|
6469 if (IN_type_symbol == NULL) |
|
6470 IN_type_symbol = last_type_symbol; |
|
6471 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6472 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6473 function_type_prefix = return_type_symbol; |
|
6474 break; |
|
6475 |
|
6476 } |
|
6477 |
|
6478 |
|
6479 ERROR; |
|
6480 } |
|
6481 |
|
6482 }/*function_word_to_time*/ |
|
6483 break; |
|
6484 |
|
6485 /**** |
|
6486 *WORD_TO_INT |
|
6487 */ |
|
6488 case function_word_to_int : |
|
6489 { |
|
6490 symbol_c *last_type_symbol = &search_constant_type_c::word_type_name; |
|
6491 |
|
6492 { |
|
6493 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6494 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6495 symbol_c *IN_param_value = &this->default_variable_name; |
|
6496 |
|
6497 symbol_c *IN_type_symbol = param_data_type; |
|
6498 last_type_symbol = param_data_type; |
|
6499 |
|
6500 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6501 { |
|
6502 |
|
6503 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6504 |
|
6505 if (IN_type_symbol == NULL) |
|
6506 IN_type_symbol = last_type_symbol; |
|
6507 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6508 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6509 function_type_prefix = return_type_symbol; |
|
6510 function_type_suffix = IN_type_symbol; |
|
6511 break; |
|
6512 |
|
6513 } |
|
6514 |
|
6515 |
|
6516 ERROR; |
|
6517 } |
|
6518 |
|
6519 }/*function_word_to_int*/ |
|
6520 break; |
|
6521 |
|
6522 /**** |
|
6523 *STRING_TO_REAL |
|
6524 */ |
|
6525 case function_string_to_real : |
|
6526 { |
|
6527 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6528 |
|
6529 { |
|
6530 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6531 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6532 symbol_c *IN_param_value = &this->default_variable_name; |
|
6533 |
|
6534 symbol_c *IN_type_symbol = param_data_type; |
|
6535 last_type_symbol = param_data_type; |
|
6536 |
|
6537 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6538 { |
|
6539 |
|
6540 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
6541 |
|
6542 if (IN_type_symbol == NULL) |
|
6543 IN_type_symbol = last_type_symbol; |
|
6544 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6545 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6546 function_type_prefix = return_type_symbol; |
|
6547 break; |
|
6548 |
|
6549 } |
|
6550 |
|
6551 |
|
6552 ERROR; |
|
6553 } |
|
6554 |
|
6555 }/*function_string_to_real*/ |
|
6556 break; |
|
6557 |
|
6558 /**** |
|
6559 *STRING_TO_SINT |
|
6560 */ |
|
6561 case function_string_to_sint : |
|
6562 { |
|
6563 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6564 |
|
6565 { |
|
6566 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6567 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6568 symbol_c *IN_param_value = &this->default_variable_name; |
|
6569 |
|
6570 symbol_c *IN_type_symbol = param_data_type; |
|
6571 last_type_symbol = param_data_type; |
|
6572 |
|
6573 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6574 { |
|
6575 |
|
6576 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6577 |
|
6578 if (IN_type_symbol == NULL) |
|
6579 IN_type_symbol = last_type_symbol; |
|
6580 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6581 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6582 function_type_prefix = return_type_symbol; |
|
6583 break; |
|
6584 |
|
6585 } |
|
6586 |
|
6587 |
|
6588 ERROR; |
|
6589 } |
|
6590 |
|
6591 }/*function_string_to_sint*/ |
|
6592 break; |
|
6593 |
|
6594 /**** |
|
6595 *STRING_TO_LINT |
|
6596 */ |
|
6597 case function_string_to_lint : |
|
6598 { |
|
6599 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6600 |
|
6601 { |
|
6602 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6603 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6604 symbol_c *IN_param_value = &this->default_variable_name; |
|
6605 |
|
6606 symbol_c *IN_type_symbol = param_data_type; |
|
6607 last_type_symbol = param_data_type; |
|
6608 |
|
6609 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6610 { |
|
6611 |
|
6612 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6613 |
|
6614 if (IN_type_symbol == NULL) |
|
6615 IN_type_symbol = last_type_symbol; |
|
6616 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6617 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6618 function_type_prefix = return_type_symbol; |
|
6619 break; |
|
6620 |
|
6621 } |
|
6622 |
|
6623 |
|
6624 ERROR; |
|
6625 } |
|
6626 |
|
6627 }/*function_string_to_lint*/ |
|
6628 break; |
|
6629 |
|
6630 /**** |
|
6631 *STRING_TO_DINT |
|
6632 */ |
|
6633 case function_string_to_dint : |
|
6634 { |
|
6635 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6636 |
|
6637 { |
|
6638 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6639 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6640 symbol_c *IN_param_value = &this->default_variable_name; |
|
6641 |
|
6642 symbol_c *IN_type_symbol = param_data_type; |
|
6643 last_type_symbol = param_data_type; |
|
6644 |
|
6645 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6646 { |
|
6647 |
|
6648 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6649 |
|
6650 if (IN_type_symbol == NULL) |
|
6651 IN_type_symbol = last_type_symbol; |
|
6652 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6653 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6654 function_type_prefix = return_type_symbol; |
|
6655 break; |
|
6656 |
|
6657 } |
|
6658 |
|
6659 |
|
6660 ERROR; |
|
6661 } |
|
6662 |
|
6663 }/*function_string_to_dint*/ |
|
6664 break; |
|
6665 |
|
6666 /**** |
|
6667 *STRING_TO_DATE |
|
6668 */ |
|
6669 case function_string_to_date : |
|
6670 { |
|
6671 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6672 |
|
6673 { |
|
6674 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6675 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6676 symbol_c *IN_param_value = &this->default_variable_name; |
|
6677 |
|
6678 symbol_c *IN_type_symbol = param_data_type; |
|
6679 last_type_symbol = param_data_type; |
|
6680 |
|
6681 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6682 { |
|
6683 |
|
6684 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6685 |
|
6686 if (IN_type_symbol == NULL) |
|
6687 IN_type_symbol = last_type_symbol; |
|
6688 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6689 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6690 function_type_prefix = return_type_symbol; |
|
6691 break; |
|
6692 |
|
6693 } |
|
6694 |
|
6695 |
|
6696 ERROR; |
|
6697 } |
|
6698 |
|
6699 }/*function_string_to_date*/ |
|
6700 break; |
|
6701 |
|
6702 /**** |
|
6703 *STRING_TO_DWORD |
|
6704 */ |
|
6705 case function_string_to_dword : |
|
6706 { |
|
6707 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6708 |
|
6709 { |
|
6710 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6711 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6712 symbol_c *IN_param_value = &this->default_variable_name; |
|
6713 |
|
6714 symbol_c *IN_type_symbol = param_data_type; |
|
6715 last_type_symbol = param_data_type; |
|
6716 |
|
6717 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6718 { |
|
6719 |
|
6720 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6721 |
|
6722 if (IN_type_symbol == NULL) |
|
6723 IN_type_symbol = last_type_symbol; |
|
6724 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6725 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6726 function_type_prefix = return_type_symbol; |
|
6727 break; |
|
6728 |
|
6729 } |
|
6730 |
|
6731 |
|
6732 ERROR; |
|
6733 } |
|
6734 |
|
6735 }/*function_string_to_dword*/ |
|
6736 break; |
|
6737 |
|
6738 /**** |
|
6739 *STRING_TO_DT |
|
6740 */ |
|
6741 case function_string_to_dt : |
|
6742 { |
|
6743 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6744 |
|
6745 { |
|
6746 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6748 symbol_c *IN_param_value = &this->default_variable_name; |
|
6749 |
|
6750 symbol_c *IN_type_symbol = param_data_type; |
|
6751 last_type_symbol = param_data_type; |
|
6752 |
|
6753 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6754 { |
|
6755 |
|
6756 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6757 |
|
6758 if (IN_type_symbol == NULL) |
|
6759 IN_type_symbol = last_type_symbol; |
|
6760 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6761 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6762 function_type_prefix = return_type_symbol; |
|
6763 break; |
|
6764 |
|
6765 } |
|
6766 |
|
6767 |
|
6768 ERROR; |
|
6769 } |
|
6770 |
|
6771 }/*function_string_to_dt*/ |
|
6772 break; |
|
6773 |
|
6774 /**** |
|
6775 *STRING_TO_TOD |
|
6776 */ |
|
6777 case function_string_to_tod : |
|
6778 { |
|
6779 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6780 |
|
6781 { |
|
6782 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6783 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6784 symbol_c *IN_param_value = &this->default_variable_name; |
|
6785 |
|
6786 symbol_c *IN_type_symbol = param_data_type; |
|
6787 last_type_symbol = param_data_type; |
|
6788 |
|
6789 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6790 { |
|
6791 |
|
6792 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6793 |
|
6794 if (IN_type_symbol == NULL) |
|
6795 IN_type_symbol = last_type_symbol; |
|
6796 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6797 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6798 function_type_prefix = return_type_symbol; |
|
6799 break; |
|
6800 |
|
6801 } |
|
6802 |
|
6803 |
|
6804 ERROR; |
|
6805 } |
|
6806 |
|
6807 }/*function_string_to_tod*/ |
|
6808 break; |
|
6809 |
|
6810 /**** |
|
6811 *STRING_TO_UDINT |
|
6812 */ |
|
6813 case function_string_to_udint : |
|
6814 { |
|
6815 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6816 |
|
6817 { |
|
6818 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6819 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6820 symbol_c *IN_param_value = &this->default_variable_name; |
|
6821 |
|
6822 symbol_c *IN_type_symbol = param_data_type; |
|
6823 last_type_symbol = param_data_type; |
|
6824 |
|
6825 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6826 { |
|
6827 |
|
6828 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6829 |
|
6830 if (IN_type_symbol == NULL) |
|
6831 IN_type_symbol = last_type_symbol; |
|
6832 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6833 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6834 function_type_prefix = return_type_symbol; |
|
6835 break; |
|
6836 |
|
6837 } |
|
6838 |
|
6839 |
|
6840 ERROR; |
|
6841 } |
|
6842 |
|
6843 }/*function_string_to_udint*/ |
|
6844 break; |
|
6845 |
|
6846 /**** |
|
6847 *STRING_TO_WORD |
|
6848 */ |
|
6849 case function_string_to_word : |
|
6850 { |
|
6851 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6852 |
|
6853 { |
|
6854 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6855 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6856 symbol_c *IN_param_value = &this->default_variable_name; |
|
6857 |
|
6858 symbol_c *IN_type_symbol = param_data_type; |
|
6859 last_type_symbol = param_data_type; |
|
6860 |
|
6861 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6862 { |
|
6863 |
|
6864 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6865 |
|
6866 if (IN_type_symbol == NULL) |
|
6867 IN_type_symbol = last_type_symbol; |
|
6868 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6869 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6870 function_type_prefix = return_type_symbol; |
|
6871 break; |
|
6872 |
|
6873 } |
|
6874 |
|
6875 |
|
6876 ERROR; |
|
6877 } |
|
6878 |
|
6879 }/*function_string_to_word*/ |
|
6880 break; |
|
6881 |
|
6882 /**** |
|
6883 *STRING_TO_LWORD |
|
6884 */ |
|
6885 case function_string_to_lword : |
|
6886 { |
|
6887 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6888 |
|
6889 { |
|
6890 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6891 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6892 symbol_c *IN_param_value = &this->default_variable_name; |
|
6893 |
|
6894 symbol_c *IN_type_symbol = param_data_type; |
|
6895 last_type_symbol = param_data_type; |
|
6896 |
|
6897 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6898 { |
|
6899 |
|
6900 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6901 |
|
6902 if (IN_type_symbol == NULL) |
|
6903 IN_type_symbol = last_type_symbol; |
|
6904 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6905 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6906 function_type_prefix = return_type_symbol; |
|
6907 break; |
|
6908 |
|
6909 } |
|
6910 |
|
6911 |
|
6912 ERROR; |
|
6913 } |
|
6914 |
|
6915 }/*function_string_to_lword*/ |
|
6916 break; |
|
6917 |
|
6918 /**** |
|
6919 *STRING_TO_UINT |
|
6920 */ |
|
6921 case function_string_to_uint : |
|
6922 { |
|
6923 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6924 |
|
6925 { |
|
6926 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6928 symbol_c *IN_param_value = &this->default_variable_name; |
|
6929 |
|
6930 symbol_c *IN_type_symbol = param_data_type; |
|
6931 last_type_symbol = param_data_type; |
|
6932 |
|
6933 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6934 { |
|
6935 |
|
6936 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6937 |
|
6938 if (IN_type_symbol == NULL) |
|
6939 IN_type_symbol = last_type_symbol; |
|
6940 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6941 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6942 function_type_prefix = return_type_symbol; |
|
6943 break; |
|
6944 |
|
6945 } |
|
6946 |
|
6947 |
|
6948 ERROR; |
|
6949 } |
|
6950 |
|
6951 }/*function_string_to_uint*/ |
|
6952 break; |
|
6953 |
|
6954 /**** |
|
6955 *STRING_TO_LREAL |
|
6956 */ |
|
6957 case function_string_to_lreal : |
|
6958 { |
|
6959 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6960 |
|
6961 { |
|
6962 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6963 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6964 symbol_c *IN_param_value = &this->default_variable_name; |
|
6965 |
|
6966 symbol_c *IN_type_symbol = param_data_type; |
|
6967 last_type_symbol = param_data_type; |
|
6968 |
|
6969 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6970 { |
|
6971 |
|
6972 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
6973 |
|
6974 if (IN_type_symbol == NULL) |
|
6975 IN_type_symbol = last_type_symbol; |
|
6976 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6977 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6978 function_type_prefix = return_type_symbol; |
|
6979 break; |
|
6980 |
|
6981 } |
|
6982 |
|
6983 |
|
6984 ERROR; |
|
6985 } |
|
6986 |
|
6987 }/*function_string_to_lreal*/ |
|
6988 break; |
|
6989 |
|
6990 /**** |
|
6991 *STRING_TO_BYTE |
|
6992 */ |
|
6993 case function_string_to_byte : |
|
6994 { |
|
6995 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
6996 |
|
6997 { |
|
6998 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6999 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7000 symbol_c *IN_param_value = &this->default_variable_name; |
|
7001 |
|
7002 symbol_c *IN_type_symbol = param_data_type; |
|
7003 last_type_symbol = param_data_type; |
|
7004 |
|
7005 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7006 { |
|
7007 |
|
7008 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7009 |
|
7010 if (IN_type_symbol == NULL) |
|
7011 IN_type_symbol = last_type_symbol; |
|
7012 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7013 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7014 function_type_prefix = return_type_symbol; |
|
7015 break; |
|
7016 |
|
7017 } |
|
7018 |
|
7019 |
|
7020 ERROR; |
|
7021 } |
|
7022 |
|
7023 }/*function_string_to_byte*/ |
|
7024 break; |
|
7025 |
|
7026 /**** |
|
7027 *STRING_TO_USINT |
|
7028 */ |
|
7029 case function_string_to_usint : |
|
7030 { |
|
7031 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
7032 |
|
7033 { |
|
7034 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7035 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7036 symbol_c *IN_param_value = &this->default_variable_name; |
|
7037 |
|
7038 symbol_c *IN_type_symbol = param_data_type; |
|
7039 last_type_symbol = param_data_type; |
|
7040 |
|
7041 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7042 { |
|
7043 |
|
7044 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7045 |
|
7046 if (IN_type_symbol == NULL) |
|
7047 IN_type_symbol = last_type_symbol; |
|
7048 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7049 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7050 function_type_prefix = return_type_symbol; |
|
7051 break; |
|
7052 |
|
7053 } |
|
7054 |
|
7055 |
|
7056 ERROR; |
|
7057 } |
|
7058 |
|
7059 }/*function_string_to_usint*/ |
|
7060 break; |
|
7061 |
|
7062 /**** |
|
7063 *STRING_TO_ULINT |
|
7064 */ |
|
7065 case function_string_to_ulint : |
|
7066 { |
|
7067 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
7068 |
|
7069 { |
|
7070 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7072 symbol_c *IN_param_value = &this->default_variable_name; |
|
7073 |
|
7074 symbol_c *IN_type_symbol = param_data_type; |
|
7075 last_type_symbol = param_data_type; |
|
7076 |
|
7077 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7078 { |
|
7079 |
|
7080 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7081 |
|
7082 if (IN_type_symbol == NULL) |
|
7083 IN_type_symbol = last_type_symbol; |
|
7084 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7085 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7086 function_type_prefix = return_type_symbol; |
|
7087 break; |
|
7088 |
|
7089 } |
|
7090 |
|
7091 |
|
7092 ERROR; |
|
7093 } |
|
7094 |
|
7095 }/*function_string_to_ulint*/ |
|
7096 break; |
|
7097 |
|
7098 /**** |
|
7099 *STRING_TO_BOOL |
|
7100 */ |
|
7101 case function_string_to_bool : |
|
7102 { |
|
7103 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
7104 |
|
7105 { |
|
7106 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7107 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7108 symbol_c *IN_param_value = &this->default_variable_name; |
|
7109 |
|
7110 symbol_c *IN_type_symbol = param_data_type; |
|
7111 last_type_symbol = param_data_type; |
|
7112 |
|
7113 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7114 { |
|
7115 |
|
7116 function_name = (symbol_c*)(new pragma_c("__string_to_bool")); |
|
7117 |
|
7118 if (IN_type_symbol == NULL) |
|
7119 IN_type_symbol = last_type_symbol; |
|
7120 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7121 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7122 function_type_prefix = return_type_symbol; |
|
7123 break; |
|
7124 |
|
7125 } |
|
7126 |
|
7127 |
|
7128 ERROR; |
|
7129 } |
|
7130 |
|
7131 }/*function_string_to_bool*/ |
|
7132 break; |
|
7133 |
|
7134 /**** |
|
7135 *STRING_TO_TIME |
|
7136 */ |
|
7137 case function_string_to_time : |
|
7138 { |
|
7139 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
7140 |
|
7141 { |
|
7142 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7143 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7144 symbol_c *IN_param_value = &this->default_variable_name; |
|
7145 |
|
7146 symbol_c *IN_type_symbol = param_data_type; |
|
7147 last_type_symbol = param_data_type; |
|
7148 |
|
7149 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7150 { |
|
7151 |
|
7152 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
7153 |
|
7154 if (IN_type_symbol == NULL) |
|
7155 IN_type_symbol = last_type_symbol; |
|
7156 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7157 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7158 function_type_prefix = return_type_symbol; |
|
7159 break; |
|
7160 |
|
7161 } |
|
7162 |
|
7163 |
|
7164 ERROR; |
|
7165 } |
|
7166 |
|
7167 }/*function_string_to_time*/ |
|
7168 break; |
|
7169 |
|
7170 /**** |
|
7171 *STRING_TO_INT |
|
7172 */ |
|
7173 case function_string_to_int : |
|
7174 { |
|
7175 symbol_c *last_type_symbol = &search_constant_type_c::string_type_name; |
|
7176 |
|
7177 { |
|
7178 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7180 symbol_c *IN_param_value = &this->default_variable_name; |
|
7181 |
|
7182 symbol_c *IN_type_symbol = param_data_type; |
|
7183 last_type_symbol = param_data_type; |
|
7184 |
|
7185 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7186 { |
|
7187 |
|
7188 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
7189 |
|
7190 if (IN_type_symbol == NULL) |
|
7191 IN_type_symbol = last_type_symbol; |
|
7192 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7193 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7194 function_type_prefix = return_type_symbol; |
|
7195 break; |
|
7196 |
|
7197 } |
|
7198 |
|
7199 |
|
7200 ERROR; |
|
7201 } |
|
7202 |
|
7203 }/*function_string_to_int*/ |
|
7204 break; |
|
7205 |
|
7206 /**** |
|
7207 *LWORD_TO_REAL |
|
7208 */ |
|
7209 case function_lword_to_real : |
|
7210 { |
|
7211 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7212 |
|
7213 { |
|
7214 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7216 symbol_c *IN_param_value = &this->default_variable_name; |
|
7217 |
|
7218 symbol_c *IN_type_symbol = param_data_type; |
|
7219 last_type_symbol = param_data_type; |
|
7220 |
|
7221 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7222 { |
|
7223 |
|
7224 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7225 |
|
7226 if (IN_type_symbol == NULL) |
|
7227 IN_type_symbol = last_type_symbol; |
|
7228 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7229 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7230 function_type_prefix = return_type_symbol; |
|
7231 function_type_suffix = IN_type_symbol; |
|
7232 break; |
|
7233 |
|
7234 } |
|
7235 |
|
7236 |
|
7237 ERROR; |
|
7238 } |
|
7239 |
|
7240 }/*function_lword_to_real*/ |
|
7241 break; |
|
7242 |
|
7243 /**** |
|
7244 *LWORD_TO_SINT |
|
7245 */ |
|
7246 case function_lword_to_sint : |
|
7247 { |
|
7248 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7249 |
|
7250 { |
|
7251 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7252 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7253 symbol_c *IN_param_value = &this->default_variable_name; |
|
7254 |
|
7255 symbol_c *IN_type_symbol = param_data_type; |
|
7256 last_type_symbol = param_data_type; |
|
7257 |
|
7258 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7259 { |
|
7260 |
|
7261 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7262 |
|
7263 if (IN_type_symbol == NULL) |
|
7264 IN_type_symbol = last_type_symbol; |
|
7265 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7266 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7267 function_type_prefix = return_type_symbol; |
|
7268 function_type_suffix = IN_type_symbol; |
|
7269 break; |
|
7270 |
|
7271 } |
|
7272 |
|
7273 |
|
7274 ERROR; |
|
7275 } |
|
7276 |
|
7277 }/*function_lword_to_sint*/ |
|
7278 break; |
|
7279 |
|
7280 /**** |
|
7281 *LWORD_TO_LINT |
|
7282 */ |
|
7283 case function_lword_to_lint : |
|
7284 { |
|
7285 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7286 |
|
7287 { |
|
7288 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7289 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7290 symbol_c *IN_param_value = &this->default_variable_name; |
|
7291 |
|
7292 symbol_c *IN_type_symbol = param_data_type; |
|
7293 last_type_symbol = param_data_type; |
|
7294 |
|
7295 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7296 { |
|
7297 |
|
7298 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7299 |
|
7300 if (IN_type_symbol == NULL) |
|
7301 IN_type_symbol = last_type_symbol; |
|
7302 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7303 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7304 function_type_prefix = return_type_symbol; |
|
7305 function_type_suffix = IN_type_symbol; |
|
7306 break; |
|
7307 |
|
7308 } |
|
7309 |
|
7310 |
|
7311 ERROR; |
|
7312 } |
|
7313 |
|
7314 }/*function_lword_to_lint*/ |
|
7315 break; |
|
7316 |
|
7317 /**** |
|
7318 *LWORD_TO_DINT |
|
7319 */ |
|
7320 case function_lword_to_dint : |
|
7321 { |
|
7322 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7323 |
|
7324 { |
|
7325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7327 symbol_c *IN_param_value = &this->default_variable_name; |
|
7328 |
|
7329 symbol_c *IN_type_symbol = param_data_type; |
|
7330 last_type_symbol = param_data_type; |
|
7331 |
|
7332 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7333 { |
|
7334 |
|
7335 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7336 |
|
7337 if (IN_type_symbol == NULL) |
|
7338 IN_type_symbol = last_type_symbol; |
|
7339 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7340 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7341 function_type_prefix = return_type_symbol; |
|
7342 function_type_suffix = IN_type_symbol; |
|
7343 break; |
|
7344 |
|
7345 } |
|
7346 |
|
7347 |
|
7348 ERROR; |
|
7349 } |
|
7350 |
|
7351 }/*function_lword_to_dint*/ |
|
7352 break; |
|
7353 |
|
7354 /**** |
|
7355 *LWORD_TO_DATE |
|
7356 */ |
|
7357 case function_lword_to_date : |
|
7358 { |
|
7359 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7360 |
|
7361 { |
|
7362 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7363 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7364 symbol_c *IN_param_value = &this->default_variable_name; |
|
7365 |
|
7366 symbol_c *IN_type_symbol = param_data_type; |
|
7367 last_type_symbol = param_data_type; |
|
7368 |
|
7369 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7370 { |
|
7371 |
|
7372 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7373 |
|
7374 if (IN_type_symbol == NULL) |
|
7375 IN_type_symbol = last_type_symbol; |
|
7376 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7377 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
7378 function_type_prefix = return_type_symbol; |
|
7379 break; |
|
7380 |
|
7381 } |
|
7382 |
|
7383 |
|
7384 ERROR; |
|
7385 } |
|
7386 |
|
7387 }/*function_lword_to_date*/ |
|
7388 break; |
|
7389 |
|
7390 /**** |
|
7391 *LWORD_TO_DWORD |
|
7392 */ |
|
7393 case function_lword_to_dword : |
|
7394 { |
|
7395 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7396 |
|
7397 { |
|
7398 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7400 symbol_c *IN_param_value = &this->default_variable_name; |
|
7401 |
|
7402 symbol_c *IN_type_symbol = param_data_type; |
|
7403 last_type_symbol = param_data_type; |
|
7404 |
|
7405 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7406 { |
|
7407 |
|
7408 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7409 |
|
7410 if (IN_type_symbol == NULL) |
|
7411 IN_type_symbol = last_type_symbol; |
|
7412 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7413 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7414 function_type_prefix = return_type_symbol; |
|
7415 function_type_suffix = IN_type_symbol; |
|
7416 break; |
|
7417 |
|
7418 } |
|
7419 |
|
7420 |
|
7421 ERROR; |
|
7422 } |
|
7423 |
|
7424 }/*function_lword_to_dword*/ |
|
7425 break; |
|
7426 |
|
7427 /**** |
|
7428 *LWORD_TO_DT |
|
7429 */ |
|
7430 case function_lword_to_dt : |
|
7431 { |
|
7432 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7433 |
|
7434 { |
|
7435 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7437 symbol_c *IN_param_value = &this->default_variable_name; |
|
7438 |
|
7439 symbol_c *IN_type_symbol = param_data_type; |
|
7440 last_type_symbol = param_data_type; |
|
7441 |
|
7442 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7443 { |
|
7444 |
|
7445 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7446 |
|
7447 if (IN_type_symbol == NULL) |
|
7448 IN_type_symbol = last_type_symbol; |
|
7449 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7450 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
7451 function_type_prefix = return_type_symbol; |
|
7452 break; |
|
7453 |
|
7454 } |
|
7455 |
|
7456 |
|
7457 ERROR; |
|
7458 } |
|
7459 |
|
7460 }/*function_lword_to_dt*/ |
|
7461 break; |
|
7462 |
|
7463 /**** |
|
7464 *LWORD_TO_TOD |
|
7465 */ |
|
7466 case function_lword_to_tod : |
|
7467 { |
|
7468 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7469 |
|
7470 { |
|
7471 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7473 symbol_c *IN_param_value = &this->default_variable_name; |
|
7474 |
|
7475 symbol_c *IN_type_symbol = param_data_type; |
|
7476 last_type_symbol = param_data_type; |
|
7477 |
|
7478 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7479 { |
|
7480 |
|
7481 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7482 |
|
7483 if (IN_type_symbol == NULL) |
|
7484 IN_type_symbol = last_type_symbol; |
|
7485 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7486 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
7487 function_type_prefix = return_type_symbol; |
|
7488 break; |
|
7489 |
|
7490 } |
|
7491 |
|
7492 |
|
7493 ERROR; |
|
7494 } |
|
7495 |
|
7496 }/*function_lword_to_tod*/ |
|
7497 break; |
|
7498 |
|
7499 /**** |
|
7500 *LWORD_TO_UDINT |
|
7501 */ |
|
7502 case function_lword_to_udint : |
|
7503 { |
|
7504 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7505 |
|
7506 { |
|
7507 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7508 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7509 symbol_c *IN_param_value = &this->default_variable_name; |
|
7510 |
|
7511 symbol_c *IN_type_symbol = param_data_type; |
|
7512 last_type_symbol = param_data_type; |
|
7513 |
|
7514 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7515 { |
|
7516 |
|
7517 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7518 |
|
7519 if (IN_type_symbol == NULL) |
|
7520 IN_type_symbol = last_type_symbol; |
|
7521 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7522 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7523 function_type_prefix = return_type_symbol; |
|
7524 function_type_suffix = IN_type_symbol; |
|
7525 break; |
|
7526 |
|
7527 } |
|
7528 |
|
7529 |
|
7530 ERROR; |
|
7531 } |
|
7532 |
|
7533 }/*function_lword_to_udint*/ |
|
7534 break; |
|
7535 |
|
7536 /**** |
|
7537 *LWORD_TO_WORD |
|
7538 */ |
|
7539 case function_lword_to_word : |
|
7540 { |
|
7541 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7542 |
|
7543 { |
|
7544 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7546 symbol_c *IN_param_value = &this->default_variable_name; |
|
7547 |
|
7548 symbol_c *IN_type_symbol = param_data_type; |
|
7549 last_type_symbol = param_data_type; |
|
7550 |
|
7551 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7552 { |
|
7553 |
|
7554 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7555 |
|
7556 if (IN_type_symbol == NULL) |
|
7557 IN_type_symbol = last_type_symbol; |
|
7558 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7559 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7560 function_type_prefix = return_type_symbol; |
|
7561 function_type_suffix = IN_type_symbol; |
|
7562 break; |
|
7563 |
|
7564 } |
|
7565 |
|
7566 |
|
7567 ERROR; |
|
7568 } |
|
7569 |
|
7570 }/*function_lword_to_word*/ |
|
7571 break; |
|
7572 |
|
7573 /**** |
|
7574 *LWORD_TO_STRING |
|
7575 */ |
|
7576 case function_lword_to_string : |
|
7577 { |
|
7578 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7579 |
|
7580 { |
|
7581 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7583 symbol_c *IN_param_value = &this->default_variable_name; |
|
7584 |
|
7585 symbol_c *IN_type_symbol = param_data_type; |
|
7586 last_type_symbol = param_data_type; |
|
7587 |
|
7588 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7589 { |
|
7590 |
|
7591 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
7592 |
|
7593 if (IN_type_symbol == NULL) |
|
7594 IN_type_symbol = last_type_symbol; |
|
7595 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7596 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7597 function_type_prefix = return_type_symbol; |
|
7598 break; |
|
7599 |
|
7600 } |
|
7601 |
|
7602 |
|
7603 ERROR; |
|
7604 } |
|
7605 |
|
7606 }/*function_lword_to_string*/ |
|
7607 break; |
|
7608 |
|
7609 /**** |
|
7610 *LWORD_TO_UINT |
|
7611 */ |
|
7612 case function_lword_to_uint : |
|
7613 { |
|
7614 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7615 |
|
7616 { |
|
7617 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7618 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7619 symbol_c *IN_param_value = &this->default_variable_name; |
|
7620 |
|
7621 symbol_c *IN_type_symbol = param_data_type; |
|
7622 last_type_symbol = param_data_type; |
|
7623 |
|
7624 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7625 { |
|
7626 |
|
7627 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7628 |
|
7629 if (IN_type_symbol == NULL) |
|
7630 IN_type_symbol = last_type_symbol; |
|
7631 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7632 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7633 function_type_prefix = return_type_symbol; |
|
7634 function_type_suffix = IN_type_symbol; |
|
7635 break; |
|
7636 |
|
7637 } |
|
7638 |
|
7639 |
|
7640 ERROR; |
|
7641 } |
|
7642 |
|
7643 }/*function_lword_to_uint*/ |
|
7644 break; |
|
7645 |
|
7646 /**** |
|
7647 *LWORD_TO_LREAL |
|
7648 */ |
|
7649 case function_lword_to_lreal : |
|
7650 { |
|
7651 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7652 |
|
7653 { |
|
7654 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7656 symbol_c *IN_param_value = &this->default_variable_name; |
|
7657 |
|
7658 symbol_c *IN_type_symbol = param_data_type; |
|
7659 last_type_symbol = param_data_type; |
|
7660 |
|
7661 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7662 { |
|
7663 |
|
7664 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7665 |
|
7666 if (IN_type_symbol == NULL) |
|
7667 IN_type_symbol = last_type_symbol; |
|
7668 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7669 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7670 function_type_prefix = return_type_symbol; |
|
7671 function_type_suffix = IN_type_symbol; |
|
7672 break; |
|
7673 |
|
7674 } |
|
7675 |
|
7676 |
|
7677 ERROR; |
|
7678 } |
|
7679 |
|
7680 }/*function_lword_to_lreal*/ |
|
7681 break; |
|
7682 |
|
7683 /**** |
|
7684 *LWORD_TO_BYTE |
|
7685 */ |
|
7686 case function_lword_to_byte : |
|
7687 { |
|
7688 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7689 |
|
7690 { |
|
7691 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7692 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7693 symbol_c *IN_param_value = &this->default_variable_name; |
|
7694 |
|
7695 symbol_c *IN_type_symbol = param_data_type; |
|
7696 last_type_symbol = param_data_type; |
|
7697 |
|
7698 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7699 { |
|
7700 |
|
7701 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7702 |
|
7703 if (IN_type_symbol == NULL) |
|
7704 IN_type_symbol = last_type_symbol; |
|
7705 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7706 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7707 function_type_prefix = return_type_symbol; |
|
7708 function_type_suffix = IN_type_symbol; |
|
7709 break; |
|
7710 |
|
7711 } |
|
7712 |
|
7713 |
|
7714 ERROR; |
|
7715 } |
|
7716 |
|
7717 }/*function_lword_to_byte*/ |
|
7718 break; |
|
7719 |
|
7720 /**** |
|
7721 *LWORD_TO_USINT |
|
7722 */ |
|
7723 case function_lword_to_usint : |
|
7724 { |
|
7725 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7726 |
|
7727 { |
|
7728 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7730 symbol_c *IN_param_value = &this->default_variable_name; |
|
7731 |
|
7732 symbol_c *IN_type_symbol = param_data_type; |
|
7733 last_type_symbol = param_data_type; |
|
7734 |
|
7735 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7736 { |
|
7737 |
|
7738 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7739 |
|
7740 if (IN_type_symbol == NULL) |
|
7741 IN_type_symbol = last_type_symbol; |
|
7742 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7743 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7744 function_type_prefix = return_type_symbol; |
|
7745 function_type_suffix = IN_type_symbol; |
|
7746 break; |
|
7747 |
|
7748 } |
|
7749 |
|
7750 |
|
7751 ERROR; |
|
7752 } |
|
7753 |
|
7754 }/*function_lword_to_usint*/ |
|
7755 break; |
|
7756 |
|
7757 /**** |
|
7758 *LWORD_TO_ULINT |
|
7759 */ |
|
7760 case function_lword_to_ulint : |
|
7761 { |
|
7762 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7763 |
|
7764 { |
|
7765 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7767 symbol_c *IN_param_value = &this->default_variable_name; |
|
7768 |
|
7769 symbol_c *IN_type_symbol = param_data_type; |
|
7770 last_type_symbol = param_data_type; |
|
7771 |
|
7772 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7773 { |
|
7774 |
|
7775 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7776 |
|
7777 if (IN_type_symbol == NULL) |
|
7778 IN_type_symbol = last_type_symbol; |
|
7779 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7780 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7781 function_type_prefix = return_type_symbol; |
|
7782 function_type_suffix = IN_type_symbol; |
|
7783 break; |
|
7784 |
|
7785 } |
|
7786 |
|
7787 |
|
7788 ERROR; |
|
7789 } |
|
7790 |
|
7791 }/*function_lword_to_ulint*/ |
|
7792 break; |
|
7793 |
|
7794 /**** |
|
7795 *LWORD_TO_BOOL |
|
7796 */ |
|
7797 case function_lword_to_bool : |
|
7798 { |
|
7799 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7800 |
|
7801 { |
|
7802 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7803 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7804 symbol_c *IN_param_value = &this->default_variable_name; |
|
7805 |
|
7806 symbol_c *IN_type_symbol = param_data_type; |
|
7807 last_type_symbol = param_data_type; |
|
7808 |
|
7809 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7810 { |
|
7811 |
|
7812 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7813 |
|
7814 if (IN_type_symbol == NULL) |
|
7815 IN_type_symbol = last_type_symbol; |
|
7816 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7817 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7818 function_type_prefix = return_type_symbol; |
|
7819 function_type_suffix = IN_type_symbol; |
|
7820 break; |
|
7821 |
|
7822 } |
|
7823 |
|
7824 |
|
7825 ERROR; |
|
7826 } |
|
7827 |
|
7828 }/*function_lword_to_bool*/ |
|
7829 break; |
|
7830 |
|
7831 /**** |
|
7832 *LWORD_TO_TIME |
|
7833 */ |
|
7834 case function_lword_to_time : |
|
7835 { |
|
7836 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7837 |
|
7838 { |
|
7839 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7840 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7841 symbol_c *IN_param_value = &this->default_variable_name; |
|
7842 |
|
7843 symbol_c *IN_type_symbol = param_data_type; |
|
7844 last_type_symbol = param_data_type; |
|
7845 |
|
7846 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7847 { |
|
7848 |
|
7849 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7850 |
|
7851 if (IN_type_symbol == NULL) |
|
7852 IN_type_symbol = last_type_symbol; |
|
7853 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7854 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7855 function_type_prefix = return_type_symbol; |
|
7856 break; |
|
7857 |
|
7858 } |
|
7859 |
|
7860 |
|
7861 ERROR; |
|
7862 } |
|
7863 |
|
7864 }/*function_lword_to_time*/ |
|
7865 break; |
|
7866 |
|
7867 /**** |
|
7868 *LWORD_TO_INT |
|
7869 */ |
|
7870 case function_lword_to_int : |
|
7871 { |
|
7872 symbol_c *last_type_symbol = &search_constant_type_c::lword_type_name; |
|
7873 |
|
7874 { |
|
7875 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7877 symbol_c *IN_param_value = &this->default_variable_name; |
|
7878 |
|
7879 symbol_c *IN_type_symbol = param_data_type; |
|
7880 last_type_symbol = param_data_type; |
|
7881 |
|
7882 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7883 { |
|
7884 |
|
7885 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7886 |
|
7887 if (IN_type_symbol == NULL) |
|
7888 IN_type_symbol = last_type_symbol; |
|
7889 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7890 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7891 function_type_prefix = return_type_symbol; |
|
7892 function_type_suffix = IN_type_symbol; |
|
7893 break; |
|
7894 |
|
7895 } |
|
7896 |
|
7897 |
|
7898 ERROR; |
|
7899 } |
|
7900 |
|
7901 }/*function_lword_to_int*/ |
|
7902 break; |
|
7903 |
|
7904 /**** |
|
7905 *UINT_TO_REAL |
|
7906 */ |
|
7907 case function_uint_to_real : |
|
7908 { |
|
7909 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
7910 |
|
7911 { |
|
7912 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7913 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7914 symbol_c *IN_param_value = &this->default_variable_name; |
|
7915 |
|
7916 symbol_c *IN_type_symbol = param_data_type; |
|
7917 last_type_symbol = param_data_type; |
|
7918 |
|
7919 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7920 { |
|
7921 |
|
7922 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7923 |
|
7924 if (IN_type_symbol == NULL) |
|
7925 IN_type_symbol = last_type_symbol; |
|
7926 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7927 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7928 function_type_prefix = return_type_symbol; |
|
7929 function_type_suffix = IN_type_symbol; |
|
7930 break; |
|
7931 |
|
7932 } |
|
7933 |
|
7934 |
|
7935 ERROR; |
|
7936 } |
|
7937 |
|
7938 }/*function_uint_to_real*/ |
|
7939 break; |
|
7940 |
|
7941 /**** |
|
7942 *UINT_TO_SINT |
|
7943 */ |
|
7944 case function_uint_to_sint : |
|
7945 { |
|
7946 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
7947 |
|
7948 { |
|
7949 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7950 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7951 symbol_c *IN_param_value = &this->default_variable_name; |
|
7952 |
|
7953 symbol_c *IN_type_symbol = param_data_type; |
|
7954 last_type_symbol = param_data_type; |
|
7955 |
|
7956 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7957 { |
|
7958 |
|
7959 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7960 |
|
7961 if (IN_type_symbol == NULL) |
|
7962 IN_type_symbol = last_type_symbol; |
|
7963 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7964 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7965 function_type_prefix = return_type_symbol; |
|
7966 function_type_suffix = IN_type_symbol; |
|
7967 break; |
|
7968 |
|
7969 } |
|
7970 |
|
7971 |
|
7972 ERROR; |
|
7973 } |
|
7974 |
|
7975 }/*function_uint_to_sint*/ |
|
7976 break; |
|
7977 |
|
7978 /**** |
|
7979 *UINT_TO_LINT |
|
7980 */ |
|
7981 case function_uint_to_lint : |
|
7982 { |
|
7983 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
7984 |
|
7985 { |
|
7986 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7987 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7988 symbol_c *IN_param_value = &this->default_variable_name; |
|
7989 |
|
7990 symbol_c *IN_type_symbol = param_data_type; |
|
7991 last_type_symbol = param_data_type; |
|
7992 |
|
7993 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7994 { |
|
7995 |
|
7996 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7997 |
|
7998 if (IN_type_symbol == NULL) |
|
7999 IN_type_symbol = last_type_symbol; |
|
8000 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8001 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8002 function_type_prefix = return_type_symbol; |
|
8003 function_type_suffix = IN_type_symbol; |
|
8004 break; |
|
8005 |
|
8006 } |
|
8007 |
|
8008 |
|
8009 ERROR; |
|
8010 } |
|
8011 |
|
8012 }/*function_uint_to_lint*/ |
|
8013 break; |
|
8014 |
|
8015 /**** |
|
8016 *UINT_TO_DINT |
|
8017 */ |
|
8018 case function_uint_to_dint : |
|
8019 { |
|
8020 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8021 |
|
8022 { |
|
8023 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8024 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8025 symbol_c *IN_param_value = &this->default_variable_name; |
|
8026 |
|
8027 symbol_c *IN_type_symbol = param_data_type; |
|
8028 last_type_symbol = param_data_type; |
|
8029 |
|
8030 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8031 { |
|
8032 |
|
8033 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8034 |
|
8035 if (IN_type_symbol == NULL) |
|
8036 IN_type_symbol = last_type_symbol; |
|
8037 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8038 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8039 function_type_prefix = return_type_symbol; |
|
8040 function_type_suffix = IN_type_symbol; |
|
8041 break; |
|
8042 |
|
8043 } |
|
8044 |
|
8045 |
|
8046 ERROR; |
|
8047 } |
|
8048 |
|
8049 }/*function_uint_to_dint*/ |
|
8050 break; |
|
8051 |
|
8052 /**** |
|
8053 *UINT_TO_DATE |
|
8054 */ |
|
8055 case function_uint_to_date : |
|
8056 { |
|
8057 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8058 |
|
8059 { |
|
8060 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8061 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8062 symbol_c *IN_param_value = &this->default_variable_name; |
|
8063 |
|
8064 symbol_c *IN_type_symbol = param_data_type; |
|
8065 last_type_symbol = param_data_type; |
|
8066 |
|
8067 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8068 { |
|
8069 |
|
8070 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8071 |
|
8072 if (IN_type_symbol == NULL) |
|
8073 IN_type_symbol = last_type_symbol; |
|
8074 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8075 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8076 function_type_prefix = return_type_symbol; |
|
8077 break; |
|
8078 |
|
8079 } |
|
8080 |
|
8081 |
|
8082 ERROR; |
|
8083 } |
|
8084 |
|
8085 }/*function_uint_to_date*/ |
|
8086 break; |
|
8087 |
|
8088 /**** |
|
8089 *UINT_TO_DWORD |
|
8090 */ |
|
8091 case function_uint_to_dword : |
|
8092 { |
|
8093 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8094 |
|
8095 { |
|
8096 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8097 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8098 symbol_c *IN_param_value = &this->default_variable_name; |
|
8099 |
|
8100 symbol_c *IN_type_symbol = param_data_type; |
|
8101 last_type_symbol = param_data_type; |
|
8102 |
|
8103 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8104 { |
|
8105 |
|
8106 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8107 |
|
8108 if (IN_type_symbol == NULL) |
|
8109 IN_type_symbol = last_type_symbol; |
|
8110 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8111 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8112 function_type_prefix = return_type_symbol; |
|
8113 function_type_suffix = IN_type_symbol; |
|
8114 break; |
|
8115 |
|
8116 } |
|
8117 |
|
8118 |
|
8119 ERROR; |
|
8120 } |
|
8121 |
|
8122 }/*function_uint_to_dword*/ |
|
8123 break; |
|
8124 |
|
8125 /**** |
|
8126 *UINT_TO_DT |
|
8127 */ |
|
8128 case function_uint_to_dt : |
|
8129 { |
|
8130 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8131 |
|
8132 { |
|
8133 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8134 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8135 symbol_c *IN_param_value = &this->default_variable_name; |
|
8136 |
|
8137 symbol_c *IN_type_symbol = param_data_type; |
|
8138 last_type_symbol = param_data_type; |
|
8139 |
|
8140 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8141 { |
|
8142 |
|
8143 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8144 |
|
8145 if (IN_type_symbol == NULL) |
|
8146 IN_type_symbol = last_type_symbol; |
|
8147 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8148 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8149 function_type_prefix = return_type_symbol; |
|
8150 break; |
|
8151 |
|
8152 } |
|
8153 |
|
8154 |
|
8155 ERROR; |
|
8156 } |
|
8157 |
|
8158 }/*function_uint_to_dt*/ |
|
8159 break; |
|
8160 |
|
8161 /**** |
|
8162 *UINT_TO_TOD |
|
8163 */ |
|
8164 case function_uint_to_tod : |
|
8165 { |
|
8166 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8167 |
|
8168 { |
|
8169 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8170 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8171 symbol_c *IN_param_value = &this->default_variable_name; |
|
8172 |
|
8173 symbol_c *IN_type_symbol = param_data_type; |
|
8174 last_type_symbol = param_data_type; |
|
8175 |
|
8176 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8177 { |
|
8178 |
|
8179 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8180 |
|
8181 if (IN_type_symbol == NULL) |
|
8182 IN_type_symbol = last_type_symbol; |
|
8183 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8184 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8185 function_type_prefix = return_type_symbol; |
|
8186 break; |
|
8187 |
|
8188 } |
|
8189 |
|
8190 |
|
8191 ERROR; |
|
8192 } |
|
8193 |
|
8194 }/*function_uint_to_tod*/ |
|
8195 break; |
|
8196 |
|
8197 /**** |
|
8198 *UINT_TO_UDINT |
|
8199 */ |
|
8200 case function_uint_to_udint : |
|
8201 { |
|
8202 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8203 |
|
8204 { |
|
8205 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8206 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8207 symbol_c *IN_param_value = &this->default_variable_name; |
|
8208 |
|
8209 symbol_c *IN_type_symbol = param_data_type; |
|
8210 last_type_symbol = param_data_type; |
|
8211 |
|
8212 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8213 { |
|
8214 |
|
8215 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8216 |
|
8217 if (IN_type_symbol == NULL) |
|
8218 IN_type_symbol = last_type_symbol; |
|
8219 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8220 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8221 function_type_prefix = return_type_symbol; |
|
8222 function_type_suffix = IN_type_symbol; |
|
8223 break; |
|
8224 |
|
8225 } |
|
8226 |
|
8227 |
|
8228 ERROR; |
|
8229 } |
|
8230 |
|
8231 }/*function_uint_to_udint*/ |
|
8232 break; |
|
8233 |
|
8234 /**** |
|
8235 *UINT_TO_WORD |
|
8236 */ |
|
8237 case function_uint_to_word : |
|
8238 { |
|
8239 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8240 |
|
8241 { |
|
8242 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8243 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8244 symbol_c *IN_param_value = &this->default_variable_name; |
|
8245 |
|
8246 symbol_c *IN_type_symbol = param_data_type; |
|
8247 last_type_symbol = param_data_type; |
|
8248 |
|
8249 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8250 { |
|
8251 |
|
8252 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8253 |
|
8254 if (IN_type_symbol == NULL) |
|
8255 IN_type_symbol = last_type_symbol; |
|
8256 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8257 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8258 function_type_prefix = return_type_symbol; |
|
8259 function_type_suffix = IN_type_symbol; |
|
8260 break; |
|
8261 |
|
8262 } |
|
8263 |
|
8264 |
|
8265 ERROR; |
|
8266 } |
|
8267 |
|
8268 }/*function_uint_to_word*/ |
|
8269 break; |
|
8270 |
|
8271 /**** |
|
8272 *UINT_TO_STRING |
|
8273 */ |
|
8274 case function_uint_to_string : |
|
8275 { |
|
8276 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8277 |
|
8278 { |
|
8279 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8281 symbol_c *IN_param_value = &this->default_variable_name; |
|
8282 |
|
8283 symbol_c *IN_type_symbol = param_data_type; |
|
8284 last_type_symbol = param_data_type; |
|
8285 |
|
8286 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8287 { |
|
8288 |
|
8289 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
8290 |
|
8291 if (IN_type_symbol == NULL) |
|
8292 IN_type_symbol = last_type_symbol; |
|
8293 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8294 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8295 function_type_prefix = return_type_symbol; |
|
8296 break; |
|
8297 |
|
8298 } |
|
8299 |
|
8300 |
|
8301 ERROR; |
|
8302 } |
|
8303 |
|
8304 }/*function_uint_to_string*/ |
|
8305 break; |
|
8306 |
|
8307 /**** |
|
8308 *UINT_TO_LWORD |
|
8309 */ |
|
8310 case function_uint_to_lword : |
|
8311 { |
|
8312 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8313 |
|
8314 { |
|
8315 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8316 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8317 symbol_c *IN_param_value = &this->default_variable_name; |
|
8318 |
|
8319 symbol_c *IN_type_symbol = param_data_type; |
|
8320 last_type_symbol = param_data_type; |
|
8321 |
|
8322 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8323 { |
|
8324 |
|
8325 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8326 |
|
8327 if (IN_type_symbol == NULL) |
|
8328 IN_type_symbol = last_type_symbol; |
|
8329 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8330 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8331 function_type_prefix = return_type_symbol; |
|
8332 function_type_suffix = IN_type_symbol; |
|
8333 break; |
|
8334 |
|
8335 } |
|
8336 |
|
8337 |
|
8338 ERROR; |
|
8339 } |
|
8340 |
|
8341 }/*function_uint_to_lword*/ |
|
8342 break; |
|
8343 |
|
8344 /**** |
|
8345 *UINT_TO_LREAL |
|
8346 */ |
|
8347 case function_uint_to_lreal : |
|
8348 { |
|
8349 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8350 |
|
8351 { |
|
8352 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8353 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8354 symbol_c *IN_param_value = &this->default_variable_name; |
|
8355 |
|
8356 symbol_c *IN_type_symbol = param_data_type; |
|
8357 last_type_symbol = param_data_type; |
|
8358 |
|
8359 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8360 { |
|
8361 |
|
8362 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8363 |
|
8364 if (IN_type_symbol == NULL) |
|
8365 IN_type_symbol = last_type_symbol; |
|
8366 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8367 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8368 function_type_prefix = return_type_symbol; |
|
8369 function_type_suffix = IN_type_symbol; |
|
8370 break; |
|
8371 |
|
8372 } |
|
8373 |
|
8374 |
|
8375 ERROR; |
|
8376 } |
|
8377 |
|
8378 }/*function_uint_to_lreal*/ |
|
8379 break; |
|
8380 |
|
8381 /**** |
|
8382 *UINT_TO_BYTE |
|
8383 */ |
|
8384 case function_uint_to_byte : |
|
8385 { |
|
8386 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8387 |
|
8388 { |
|
8389 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8391 symbol_c *IN_param_value = &this->default_variable_name; |
|
8392 |
|
8393 symbol_c *IN_type_symbol = param_data_type; |
|
8394 last_type_symbol = param_data_type; |
|
8395 |
|
8396 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8397 { |
|
8398 |
|
8399 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8400 |
|
8401 if (IN_type_symbol == NULL) |
|
8402 IN_type_symbol = last_type_symbol; |
|
8403 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8404 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
8405 function_type_prefix = return_type_symbol; |
|
8406 function_type_suffix = IN_type_symbol; |
|
8407 break; |
|
8408 |
|
8409 } |
|
8410 |
|
8411 |
|
8412 ERROR; |
|
8413 } |
|
8414 |
|
8415 }/*function_uint_to_byte*/ |
|
8416 break; |
|
8417 |
|
8418 /**** |
|
8419 *UINT_TO_USINT |
|
8420 */ |
|
8421 case function_uint_to_usint : |
|
8422 { |
|
8423 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8424 |
|
8425 { |
|
8426 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8428 symbol_c *IN_param_value = &this->default_variable_name; |
|
8429 |
|
8430 symbol_c *IN_type_symbol = param_data_type; |
|
8431 last_type_symbol = param_data_type; |
|
8432 |
|
8433 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8434 { |
|
8435 |
|
8436 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8437 |
|
8438 if (IN_type_symbol == NULL) |
|
8439 IN_type_symbol = last_type_symbol; |
|
8440 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8441 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8442 function_type_prefix = return_type_symbol; |
|
8443 function_type_suffix = IN_type_symbol; |
|
8444 break; |
|
8445 |
|
8446 } |
|
8447 |
|
8448 |
|
8449 ERROR; |
|
8450 } |
|
8451 |
|
8452 }/*function_uint_to_usint*/ |
|
8453 break; |
|
8454 |
|
8455 /**** |
|
8456 *UINT_TO_ULINT |
|
8457 */ |
|
8458 case function_uint_to_ulint : |
|
8459 { |
|
8460 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8461 |
|
8462 { |
|
8463 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8464 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8465 symbol_c *IN_param_value = &this->default_variable_name; |
|
8466 |
|
8467 symbol_c *IN_type_symbol = param_data_type; |
|
8468 last_type_symbol = param_data_type; |
|
8469 |
|
8470 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8471 { |
|
8472 |
|
8473 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8474 |
|
8475 if (IN_type_symbol == NULL) |
|
8476 IN_type_symbol = last_type_symbol; |
|
8477 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8478 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8479 function_type_prefix = return_type_symbol; |
|
8480 function_type_suffix = IN_type_symbol; |
|
8481 break; |
|
8482 |
|
8483 } |
|
8484 |
|
8485 |
|
8486 ERROR; |
|
8487 } |
|
8488 |
|
8489 }/*function_uint_to_ulint*/ |
|
8490 break; |
|
8491 |
|
8492 /**** |
|
8493 *UINT_TO_BOOL |
|
8494 */ |
|
8495 case function_uint_to_bool : |
|
8496 { |
|
8497 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8498 |
|
8499 { |
|
8500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8502 symbol_c *IN_param_value = &this->default_variable_name; |
|
8503 |
|
8504 symbol_c *IN_type_symbol = param_data_type; |
|
8505 last_type_symbol = param_data_type; |
|
8506 |
|
8507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8508 { |
|
8509 |
|
8510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8511 |
|
8512 if (IN_type_symbol == NULL) |
|
8513 IN_type_symbol = last_type_symbol; |
|
8514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8515 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8516 function_type_prefix = return_type_symbol; |
|
8517 function_type_suffix = IN_type_symbol; |
|
8518 break; |
|
8519 |
|
8520 } |
|
8521 |
|
8522 |
|
8523 ERROR; |
|
8524 } |
|
8525 |
|
8526 }/*function_uint_to_bool*/ |
|
8527 break; |
|
8528 |
|
8529 /**** |
|
8530 *UINT_TO_TIME |
|
8531 */ |
|
8532 case function_uint_to_time : |
|
8533 { |
|
8534 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8535 |
|
8536 { |
|
8537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8539 symbol_c *IN_param_value = &this->default_variable_name; |
|
8540 |
|
8541 symbol_c *IN_type_symbol = param_data_type; |
|
8542 last_type_symbol = param_data_type; |
|
8543 |
|
8544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8545 { |
|
8546 |
|
8547 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8548 |
|
8549 if (IN_type_symbol == NULL) |
|
8550 IN_type_symbol = last_type_symbol; |
|
8551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8552 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
8553 function_type_prefix = return_type_symbol; |
|
8554 break; |
|
8555 |
|
8556 } |
|
8557 |
|
8558 |
|
8559 ERROR; |
|
8560 } |
|
8561 |
|
8562 }/*function_uint_to_time*/ |
|
8563 break; |
|
8564 |
|
8565 /**** |
|
8566 *UINT_TO_INT |
|
8567 */ |
|
8568 case function_uint_to_int : |
|
8569 { |
|
8570 symbol_c *last_type_symbol = &search_constant_type_c::uint_type_name; |
|
8571 |
|
8572 { |
|
8573 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8575 symbol_c *IN_param_value = &this->default_variable_name; |
|
8576 |
|
8577 symbol_c *IN_type_symbol = param_data_type; |
|
8578 last_type_symbol = param_data_type; |
|
8579 |
|
8580 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8581 { |
|
8582 |
|
8583 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8584 |
|
8585 if (IN_type_symbol == NULL) |
|
8586 IN_type_symbol = last_type_symbol; |
|
8587 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8588 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8589 function_type_prefix = return_type_symbol; |
|
8590 function_type_suffix = IN_type_symbol; |
|
8591 break; |
|
8592 |
|
8593 } |
|
8594 |
|
8595 |
|
8596 ERROR; |
|
8597 } |
|
8598 |
|
8599 }/*function_uint_to_int*/ |
|
8600 break; |
|
8601 |
|
8602 /**** |
|
8603 *LREAL_TO_REAL |
|
8604 */ |
|
8605 case function_lreal_to_real : |
|
8606 { |
|
8607 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8608 |
|
8609 { |
|
8610 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8612 symbol_c *IN_param_value = &this->default_variable_name; |
|
8613 |
|
8614 symbol_c *IN_type_symbol = param_data_type; |
|
8615 last_type_symbol = param_data_type; |
|
8616 |
|
8617 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8618 { |
|
8619 |
|
8620 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8621 |
|
8622 if (IN_type_symbol == NULL) |
|
8623 IN_type_symbol = last_type_symbol; |
|
8624 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8625 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8626 function_type_prefix = return_type_symbol; |
|
8627 function_type_suffix = IN_type_symbol; |
|
8628 break; |
|
8629 |
|
8630 } |
|
8631 |
|
8632 |
|
8633 ERROR; |
|
8634 } |
|
8635 |
|
8636 }/*function_lreal_to_real*/ |
|
8637 break; |
|
8638 |
|
8639 /**** |
|
8640 *LREAL_TO_SINT |
|
8641 */ |
|
8642 case function_lreal_to_sint : |
|
8643 { |
|
8644 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8645 |
|
8646 { |
|
8647 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8648 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8649 symbol_c *IN_param_value = &this->default_variable_name; |
|
8650 |
|
8651 symbol_c *IN_type_symbol = param_data_type; |
|
8652 last_type_symbol = param_data_type; |
|
8653 |
|
8654 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8655 { |
|
8656 |
|
8657 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8658 |
|
8659 if (IN_type_symbol == NULL) |
|
8660 IN_type_symbol = last_type_symbol; |
|
8661 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8662 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8663 function_type_prefix = return_type_symbol; |
|
8664 break; |
|
8665 |
|
8666 } |
|
8667 |
|
8668 |
|
8669 ERROR; |
|
8670 } |
|
8671 |
|
8672 }/*function_lreal_to_sint*/ |
|
8673 break; |
|
8674 |
|
8675 /**** |
|
8676 *LREAL_TO_LINT |
|
8677 */ |
|
8678 case function_lreal_to_lint : |
|
8679 { |
|
8680 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8681 |
|
8682 { |
|
8683 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8685 symbol_c *IN_param_value = &this->default_variable_name; |
|
8686 |
|
8687 symbol_c *IN_type_symbol = param_data_type; |
|
8688 last_type_symbol = param_data_type; |
|
8689 |
|
8690 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8691 { |
|
8692 |
|
8693 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8694 |
|
8695 if (IN_type_symbol == NULL) |
|
8696 IN_type_symbol = last_type_symbol; |
|
8697 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8698 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8699 function_type_prefix = return_type_symbol; |
|
8700 break; |
|
8701 |
|
8702 } |
|
8703 |
|
8704 |
|
8705 ERROR; |
|
8706 } |
|
8707 |
|
8708 }/*function_lreal_to_lint*/ |
|
8709 break; |
|
8710 |
|
8711 /**** |
|
8712 *LREAL_TO_DINT |
|
8713 */ |
|
8714 case function_lreal_to_dint : |
|
8715 { |
|
8716 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8717 |
|
8718 { |
|
8719 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8720 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8721 symbol_c *IN_param_value = &this->default_variable_name; |
|
8722 |
|
8723 symbol_c *IN_type_symbol = param_data_type; |
|
8724 last_type_symbol = param_data_type; |
|
8725 |
|
8726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8727 { |
|
8728 |
|
8729 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8730 |
|
8731 if (IN_type_symbol == NULL) |
|
8732 IN_type_symbol = last_type_symbol; |
|
8733 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8734 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8735 function_type_prefix = return_type_symbol; |
|
8736 break; |
|
8737 |
|
8738 } |
|
8739 |
|
8740 |
|
8741 ERROR; |
|
8742 } |
|
8743 |
|
8744 }/*function_lreal_to_dint*/ |
|
8745 break; |
|
8746 |
|
8747 /**** |
|
8748 *LREAL_TO_DATE |
|
8749 */ |
|
8750 case function_lreal_to_date : |
|
8751 { |
|
8752 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8753 |
|
8754 { |
|
8755 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8756 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8757 symbol_c *IN_param_value = &this->default_variable_name; |
|
8758 |
|
8759 symbol_c *IN_type_symbol = param_data_type; |
|
8760 last_type_symbol = param_data_type; |
|
8761 |
|
8762 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8763 { |
|
8764 |
|
8765 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8766 |
|
8767 if (IN_type_symbol == NULL) |
|
8768 IN_type_symbol = last_type_symbol; |
|
8769 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8770 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8771 function_type_prefix = return_type_symbol; |
|
8772 break; |
|
8773 |
|
8774 } |
|
8775 |
|
8776 |
|
8777 ERROR; |
|
8778 } |
|
8779 |
|
8780 }/*function_lreal_to_date*/ |
|
8781 break; |
|
8782 |
|
8783 /**** |
|
8784 *LREAL_TO_DWORD |
|
8785 */ |
|
8786 case function_lreal_to_dword : |
|
8787 { |
|
8788 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8789 |
|
8790 { |
|
8791 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8792 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8793 symbol_c *IN_param_value = &this->default_variable_name; |
|
8794 |
|
8795 symbol_c *IN_type_symbol = param_data_type; |
|
8796 last_type_symbol = param_data_type; |
|
8797 |
|
8798 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8799 { |
|
8800 |
|
8801 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
8802 |
|
8803 if (IN_type_symbol == NULL) |
|
8804 IN_type_symbol = last_type_symbol; |
|
8805 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8806 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8807 function_type_prefix = return_type_symbol; |
|
8808 break; |
|
8809 |
|
8810 } |
|
8811 |
|
8812 |
|
8813 ERROR; |
|
8814 } |
|
8815 |
|
8816 }/*function_lreal_to_dword*/ |
|
8817 break; |
|
8818 |
|
8819 /**** |
|
8820 *LREAL_TO_DT |
|
8821 */ |
|
8822 case function_lreal_to_dt : |
|
8823 { |
|
8824 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8825 |
|
8826 { |
|
8827 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8828 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8829 symbol_c *IN_param_value = &this->default_variable_name; |
|
8830 |
|
8831 symbol_c *IN_type_symbol = param_data_type; |
|
8832 last_type_symbol = param_data_type; |
|
8833 |
|
8834 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8835 { |
|
8836 |
|
8837 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8838 |
|
8839 if (IN_type_symbol == NULL) |
|
8840 IN_type_symbol = last_type_symbol; |
|
8841 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8842 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8843 function_type_prefix = return_type_symbol; |
|
8844 break; |
|
8845 |
|
8846 } |
|
8847 |
|
8848 |
|
8849 ERROR; |
|
8850 } |
|
8851 |
|
8852 }/*function_lreal_to_dt*/ |
|
8853 break; |
|
8854 |
|
8855 /**** |
|
8856 *LREAL_TO_TOD |
|
8857 */ |
|
8858 case function_lreal_to_tod : |
|
8859 { |
|
8860 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8861 |
|
8862 { |
|
8863 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8864 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8865 symbol_c *IN_param_value = &this->default_variable_name; |
|
8866 |
|
8867 symbol_c *IN_type_symbol = param_data_type; |
|
8868 last_type_symbol = param_data_type; |
|
8869 |
|
8870 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8871 { |
|
8872 |
|
8873 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8874 |
|
8875 if (IN_type_symbol == NULL) |
|
8876 IN_type_symbol = last_type_symbol; |
|
8877 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8878 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8879 function_type_prefix = return_type_symbol; |
|
8880 break; |
|
8881 |
|
8882 } |
|
8883 |
|
8884 |
|
8885 ERROR; |
|
8886 } |
|
8887 |
|
8888 }/*function_lreal_to_tod*/ |
|
8889 break; |
|
8890 |
|
8891 /**** |
|
8892 *LREAL_TO_UDINT |
|
8893 */ |
|
8894 case function_lreal_to_udint : |
|
8895 { |
|
8896 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8897 |
|
8898 { |
|
8899 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8900 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8901 symbol_c *IN_param_value = &this->default_variable_name; |
|
8902 |
|
8903 symbol_c *IN_type_symbol = param_data_type; |
|
8904 last_type_symbol = param_data_type; |
|
8905 |
|
8906 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8907 { |
|
8908 |
|
8909 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
8910 |
|
8911 if (IN_type_symbol == NULL) |
|
8912 IN_type_symbol = last_type_symbol; |
|
8913 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8914 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8915 function_type_prefix = return_type_symbol; |
|
8916 break; |
|
8917 |
|
8918 } |
|
8919 |
|
8920 |
|
8921 ERROR; |
|
8922 } |
|
8923 |
|
8924 }/*function_lreal_to_udint*/ |
|
8925 break; |
|
8926 |
|
8927 /**** |
|
8928 *LREAL_TO_WORD |
|
8929 */ |
|
8930 case function_lreal_to_word : |
|
8931 { |
|
8932 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8933 |
|
8934 { |
|
8935 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8936 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8937 symbol_c *IN_param_value = &this->default_variable_name; |
|
8938 |
|
8939 symbol_c *IN_type_symbol = param_data_type; |
|
8940 last_type_symbol = param_data_type; |
|
8941 |
|
8942 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8943 { |
|
8944 |
|
8945 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
8946 |
|
8947 if (IN_type_symbol == NULL) |
|
8948 IN_type_symbol = last_type_symbol; |
|
8949 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8950 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8951 function_type_prefix = return_type_symbol; |
|
8952 break; |
|
8953 |
|
8954 } |
|
8955 |
|
8956 |
|
8957 ERROR; |
|
8958 } |
|
8959 |
|
8960 }/*function_lreal_to_word*/ |
|
8961 break; |
|
8962 |
|
8963 /**** |
|
8964 *LREAL_TO_STRING |
|
8965 */ |
|
8966 case function_lreal_to_string : |
|
8967 { |
|
8968 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8969 |
|
8970 { |
|
8971 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8973 symbol_c *IN_param_value = &this->default_variable_name; |
|
8974 |
|
8975 symbol_c *IN_type_symbol = param_data_type; |
|
8976 last_type_symbol = param_data_type; |
|
8977 |
|
8978 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8979 { |
|
8980 |
|
8981 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
8982 |
|
8983 if (IN_type_symbol == NULL) |
|
8984 IN_type_symbol = last_type_symbol; |
|
8985 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8986 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8987 function_type_prefix = return_type_symbol; |
|
8988 break; |
|
8989 |
|
8990 } |
|
8991 |
|
8992 |
|
8993 ERROR; |
|
8994 } |
|
8995 |
|
8996 }/*function_lreal_to_string*/ |
|
8997 break; |
|
8998 |
|
8999 /**** |
|
9000 *LREAL_TO_LWORD |
|
9001 */ |
|
9002 case function_lreal_to_lword : |
|
9003 { |
|
9004 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9005 |
|
9006 { |
|
9007 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9008 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9009 symbol_c *IN_param_value = &this->default_variable_name; |
|
9010 |
|
9011 symbol_c *IN_type_symbol = param_data_type; |
|
9012 last_type_symbol = param_data_type; |
|
9013 |
|
9014 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9015 { |
|
9016 |
|
9017 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9018 |
|
9019 if (IN_type_symbol == NULL) |
|
9020 IN_type_symbol = last_type_symbol; |
|
9021 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9022 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9023 function_type_prefix = return_type_symbol; |
|
9024 break; |
|
9025 |
|
9026 } |
|
9027 |
|
9028 |
|
9029 ERROR; |
|
9030 } |
|
9031 |
|
9032 }/*function_lreal_to_lword*/ |
|
9033 break; |
|
9034 |
|
9035 /**** |
|
9036 *LREAL_TO_UINT |
|
9037 */ |
|
9038 case function_lreal_to_uint : |
|
9039 { |
|
9040 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9041 |
|
9042 { |
|
9043 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9044 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9045 symbol_c *IN_param_value = &this->default_variable_name; |
|
9046 |
|
9047 symbol_c *IN_type_symbol = param_data_type; |
|
9048 last_type_symbol = param_data_type; |
|
9049 |
|
9050 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9051 { |
|
9052 |
|
9053 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9054 |
|
9055 if (IN_type_symbol == NULL) |
|
9056 IN_type_symbol = last_type_symbol; |
|
9057 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9058 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9059 function_type_prefix = return_type_symbol; |
|
9060 break; |
|
9061 |
|
9062 } |
|
9063 |
|
9064 |
|
9065 ERROR; |
|
9066 } |
|
9067 |
|
9068 }/*function_lreal_to_uint*/ |
|
9069 break; |
|
9070 |
|
9071 /**** |
|
9072 *LREAL_TO_BYTE |
|
9073 */ |
|
9074 case function_lreal_to_byte : |
|
9075 { |
|
9076 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9077 |
|
9078 { |
|
9079 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9080 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9081 symbol_c *IN_param_value = &this->default_variable_name; |
|
9082 |
|
9083 symbol_c *IN_type_symbol = param_data_type; |
|
9084 last_type_symbol = param_data_type; |
|
9085 |
|
9086 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9087 { |
|
9088 |
|
9089 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9090 |
|
9091 if (IN_type_symbol == NULL) |
|
9092 IN_type_symbol = last_type_symbol; |
|
9093 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9094 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9095 function_type_prefix = return_type_symbol; |
|
9096 break; |
|
9097 |
|
9098 } |
|
9099 |
|
9100 |
|
9101 ERROR; |
|
9102 } |
|
9103 |
|
9104 }/*function_lreal_to_byte*/ |
|
9105 break; |
|
9106 |
|
9107 /**** |
|
9108 *LREAL_TO_USINT |
|
9109 */ |
|
9110 case function_lreal_to_usint : |
|
9111 { |
|
9112 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9113 |
|
9114 { |
|
9115 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9116 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9117 symbol_c *IN_param_value = &this->default_variable_name; |
|
9118 |
|
9119 symbol_c *IN_type_symbol = param_data_type; |
|
9120 last_type_symbol = param_data_type; |
|
9121 |
|
9122 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9123 { |
|
9124 |
|
9125 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9126 |
|
9127 if (IN_type_symbol == NULL) |
|
9128 IN_type_symbol = last_type_symbol; |
|
9129 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9130 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9131 function_type_prefix = return_type_symbol; |
|
9132 break; |
|
9133 |
|
9134 } |
|
9135 |
|
9136 |
|
9137 ERROR; |
|
9138 } |
|
9139 |
|
9140 }/*function_lreal_to_usint*/ |
|
9141 break; |
|
9142 |
|
9143 /**** |
|
9144 *LREAL_TO_ULINT |
|
9145 */ |
|
9146 case function_lreal_to_ulint : |
|
9147 { |
|
9148 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9149 |
|
9150 { |
|
9151 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9152 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9153 symbol_c *IN_param_value = &this->default_variable_name; |
|
9154 |
|
9155 symbol_c *IN_type_symbol = param_data_type; |
|
9156 last_type_symbol = param_data_type; |
|
9157 |
|
9158 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9159 { |
|
9160 |
|
9161 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9162 |
|
9163 if (IN_type_symbol == NULL) |
|
9164 IN_type_symbol = last_type_symbol; |
|
9165 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9166 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9167 function_type_prefix = return_type_symbol; |
|
9168 break; |
|
9169 |
|
9170 } |
|
9171 |
|
9172 |
|
9173 ERROR; |
|
9174 } |
|
9175 |
|
9176 }/*function_lreal_to_ulint*/ |
|
9177 break; |
|
9178 |
|
9179 /**** |
|
9180 *LREAL_TO_BOOL |
|
9181 */ |
|
9182 case function_lreal_to_bool : |
|
9183 { |
|
9184 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9185 |
|
9186 { |
|
9187 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9188 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9189 symbol_c *IN_param_value = &this->default_variable_name; |
|
9190 |
|
9191 symbol_c *IN_type_symbol = param_data_type; |
|
9192 last_type_symbol = param_data_type; |
|
9193 |
|
9194 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9195 { |
|
9196 |
|
9197 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9198 |
|
9199 if (IN_type_symbol == NULL) |
|
9200 IN_type_symbol = last_type_symbol; |
|
9201 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9202 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9203 function_type_prefix = return_type_symbol; |
|
9204 break; |
|
9205 |
|
9206 } |
|
9207 |
|
9208 |
|
9209 ERROR; |
|
9210 } |
|
9211 |
|
9212 }/*function_lreal_to_bool*/ |
|
9213 break; |
|
9214 |
|
9215 /**** |
|
9216 *LREAL_TO_TIME |
|
9217 */ |
|
9218 case function_lreal_to_time : |
|
9219 { |
|
9220 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9221 |
|
9222 { |
|
9223 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9224 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9225 symbol_c *IN_param_value = &this->default_variable_name; |
|
9226 |
|
9227 symbol_c *IN_type_symbol = param_data_type; |
|
9228 last_type_symbol = param_data_type; |
|
9229 |
|
9230 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9231 { |
|
9232 |
|
9233 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
9234 |
|
9235 if (IN_type_symbol == NULL) |
|
9236 IN_type_symbol = last_type_symbol; |
|
9237 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9238 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9239 function_type_prefix = return_type_symbol; |
|
9240 break; |
|
9241 |
|
9242 } |
|
9243 |
|
9244 |
|
9245 ERROR; |
|
9246 } |
|
9247 |
|
9248 }/*function_lreal_to_time*/ |
|
9249 break; |
|
9250 |
|
9251 /**** |
|
9252 *LREAL_TO_INT |
|
9253 */ |
|
9254 case function_lreal_to_int : |
|
9255 { |
|
9256 symbol_c *last_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9257 |
|
9258 { |
|
9259 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9260 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9261 symbol_c *IN_param_value = &this->default_variable_name; |
|
9262 |
|
9263 symbol_c *IN_type_symbol = param_data_type; |
|
9264 last_type_symbol = param_data_type; |
|
9265 |
|
9266 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9267 { |
|
9268 |
|
9269 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
9270 |
|
9271 if (IN_type_symbol == NULL) |
|
9272 IN_type_symbol = last_type_symbol; |
|
9273 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9274 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9275 function_type_prefix = return_type_symbol; |
|
9276 break; |
|
9277 |
|
9278 } |
|
9279 |
|
9280 |
|
9281 ERROR; |
|
9282 } |
|
9283 |
|
9284 }/*function_lreal_to_int*/ |
|
9285 break; |
|
9286 |
|
9287 /**** |
|
9288 *BYTE_TO_REAL |
|
9289 */ |
|
9290 case function_byte_to_real : |
|
9291 { |
|
9292 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9293 |
|
9294 { |
|
9295 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9297 symbol_c *IN_param_value = &this->default_variable_name; |
|
9298 |
|
9299 symbol_c *IN_type_symbol = param_data_type; |
|
9300 last_type_symbol = param_data_type; |
|
9301 |
|
9302 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9303 { |
|
9304 |
|
9305 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9306 |
|
9307 if (IN_type_symbol == NULL) |
|
9308 IN_type_symbol = last_type_symbol; |
|
9309 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9310 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9311 function_type_prefix = return_type_symbol; |
|
9312 function_type_suffix = IN_type_symbol; |
|
9313 break; |
|
9314 |
|
9315 } |
|
9316 |
|
9317 |
|
9318 ERROR; |
|
9319 } |
|
9320 |
|
9321 }/*function_byte_to_real*/ |
|
9322 break; |
|
9323 |
|
9324 /**** |
|
9325 *BYTE_TO_SINT |
|
9326 */ |
|
9327 case function_byte_to_sint : |
|
9328 { |
|
9329 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9330 |
|
9331 { |
|
9332 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9333 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9334 symbol_c *IN_param_value = &this->default_variable_name; |
|
9335 |
|
9336 symbol_c *IN_type_symbol = param_data_type; |
|
9337 last_type_symbol = param_data_type; |
|
9338 |
|
9339 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9340 { |
|
9341 |
|
9342 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9343 |
|
9344 if (IN_type_symbol == NULL) |
|
9345 IN_type_symbol = last_type_symbol; |
|
9346 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9347 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9348 function_type_prefix = return_type_symbol; |
|
9349 function_type_suffix = IN_type_symbol; |
|
9350 break; |
|
9351 |
|
9352 } |
|
9353 |
|
9354 |
|
9355 ERROR; |
|
9356 } |
|
9357 |
|
9358 }/*function_byte_to_sint*/ |
|
9359 break; |
|
9360 |
|
9361 /**** |
|
9362 *BYTE_TO_LINT |
|
9363 */ |
|
9364 case function_byte_to_lint : |
|
9365 { |
|
9366 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9367 |
|
9368 { |
|
9369 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9370 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9371 symbol_c *IN_param_value = &this->default_variable_name; |
|
9372 |
|
9373 symbol_c *IN_type_symbol = param_data_type; |
|
9374 last_type_symbol = param_data_type; |
|
9375 |
|
9376 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9377 { |
|
9378 |
|
9379 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9380 |
|
9381 if (IN_type_symbol == NULL) |
|
9382 IN_type_symbol = last_type_symbol; |
|
9383 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9384 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9385 function_type_prefix = return_type_symbol; |
|
9386 function_type_suffix = IN_type_symbol; |
|
9387 break; |
|
9388 |
|
9389 } |
|
9390 |
|
9391 |
|
9392 ERROR; |
|
9393 } |
|
9394 |
|
9395 }/*function_byte_to_lint*/ |
|
9396 break; |
|
9397 |
|
9398 /**** |
|
9399 *BYTE_TO_DINT |
|
9400 */ |
|
9401 case function_byte_to_dint : |
|
9402 { |
|
9403 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9404 |
|
9405 { |
|
9406 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9407 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9408 symbol_c *IN_param_value = &this->default_variable_name; |
|
9409 |
|
9410 symbol_c *IN_type_symbol = param_data_type; |
|
9411 last_type_symbol = param_data_type; |
|
9412 |
|
9413 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9414 { |
|
9415 |
|
9416 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9417 |
|
9418 if (IN_type_symbol == NULL) |
|
9419 IN_type_symbol = last_type_symbol; |
|
9420 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9421 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9422 function_type_prefix = return_type_symbol; |
|
9423 function_type_suffix = IN_type_symbol; |
|
9424 break; |
|
9425 |
|
9426 } |
|
9427 |
|
9428 |
|
9429 ERROR; |
|
9430 } |
|
9431 |
|
9432 }/*function_byte_to_dint*/ |
|
9433 break; |
|
9434 |
|
9435 /**** |
|
9436 *BYTE_TO_DATE |
|
9437 */ |
|
9438 case function_byte_to_date : |
|
9439 { |
|
9440 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9441 |
|
9442 { |
|
9443 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9444 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9445 symbol_c *IN_param_value = &this->default_variable_name; |
|
9446 |
|
9447 symbol_c *IN_type_symbol = param_data_type; |
|
9448 last_type_symbol = param_data_type; |
|
9449 |
|
9450 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9451 { |
|
9452 |
|
9453 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9454 |
|
9455 if (IN_type_symbol == NULL) |
|
9456 IN_type_symbol = last_type_symbol; |
|
9457 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9458 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9459 function_type_prefix = return_type_symbol; |
|
9460 break; |
|
9461 |
|
9462 } |
|
9463 |
|
9464 |
|
9465 ERROR; |
|
9466 } |
|
9467 |
|
9468 }/*function_byte_to_date*/ |
|
9469 break; |
|
9470 |
|
9471 /**** |
|
9472 *BYTE_TO_DWORD |
|
9473 */ |
|
9474 case function_byte_to_dword : |
|
9475 { |
|
9476 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9477 |
|
9478 { |
|
9479 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9480 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9481 symbol_c *IN_param_value = &this->default_variable_name; |
|
9482 |
|
9483 symbol_c *IN_type_symbol = param_data_type; |
|
9484 last_type_symbol = param_data_type; |
|
9485 |
|
9486 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9487 { |
|
9488 |
|
9489 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9490 |
|
9491 if (IN_type_symbol == NULL) |
|
9492 IN_type_symbol = last_type_symbol; |
|
9493 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9494 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
9495 function_type_prefix = return_type_symbol; |
|
9496 function_type_suffix = IN_type_symbol; |
|
9497 break; |
|
9498 |
|
9499 } |
|
9500 |
|
9501 |
|
9502 ERROR; |
|
9503 } |
|
9504 |
|
9505 }/*function_byte_to_dword*/ |
|
9506 break; |
|
9507 |
|
9508 /**** |
|
9509 *BYTE_TO_DT |
|
9510 */ |
|
9511 case function_byte_to_dt : |
|
9512 { |
|
9513 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9514 |
|
9515 { |
|
9516 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9517 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9518 symbol_c *IN_param_value = &this->default_variable_name; |
|
9519 |
|
9520 symbol_c *IN_type_symbol = param_data_type; |
|
9521 last_type_symbol = param_data_type; |
|
9522 |
|
9523 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9524 { |
|
9525 |
|
9526 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9527 |
|
9528 if (IN_type_symbol == NULL) |
|
9529 IN_type_symbol = last_type_symbol; |
|
9530 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9531 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9532 function_type_prefix = return_type_symbol; |
|
9533 break; |
|
9534 |
|
9535 } |
|
9536 |
|
9537 |
|
9538 ERROR; |
|
9539 } |
|
9540 |
|
9541 }/*function_byte_to_dt*/ |
|
9542 break; |
|
9543 |
|
9544 /**** |
|
9545 *BYTE_TO_TOD |
|
9546 */ |
|
9547 case function_byte_to_tod : |
|
9548 { |
|
9549 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9550 |
|
9551 { |
|
9552 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9553 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9554 symbol_c *IN_param_value = &this->default_variable_name; |
|
9555 |
|
9556 symbol_c *IN_type_symbol = param_data_type; |
|
9557 last_type_symbol = param_data_type; |
|
9558 |
|
9559 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9560 { |
|
9561 |
|
9562 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9563 |
|
9564 if (IN_type_symbol == NULL) |
|
9565 IN_type_symbol = last_type_symbol; |
|
9566 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9567 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9568 function_type_prefix = return_type_symbol; |
|
9569 break; |
|
9570 |
|
9571 } |
|
9572 |
|
9573 |
|
9574 ERROR; |
|
9575 } |
|
9576 |
|
9577 }/*function_byte_to_tod*/ |
|
9578 break; |
|
9579 |
|
9580 /**** |
|
9581 *BYTE_TO_UDINT |
|
9582 */ |
|
9583 case function_byte_to_udint : |
|
9584 { |
|
9585 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9586 |
|
9587 { |
|
9588 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9589 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9590 symbol_c *IN_param_value = &this->default_variable_name; |
|
9591 |
|
9592 symbol_c *IN_type_symbol = param_data_type; |
|
9593 last_type_symbol = param_data_type; |
|
9594 |
|
9595 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9596 { |
|
9597 |
|
9598 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9599 |
|
9600 if (IN_type_symbol == NULL) |
|
9601 IN_type_symbol = last_type_symbol; |
|
9602 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9603 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9604 function_type_prefix = return_type_symbol; |
|
9605 function_type_suffix = IN_type_symbol; |
|
9606 break; |
|
9607 |
|
9608 } |
|
9609 |
|
9610 |
|
9611 ERROR; |
|
9612 } |
|
9613 |
|
9614 }/*function_byte_to_udint*/ |
|
9615 break; |
|
9616 |
|
9617 /**** |
|
9618 *BYTE_TO_WORD |
|
9619 */ |
|
9620 case function_byte_to_word : |
|
9621 { |
|
9622 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9623 |
|
9624 { |
|
9625 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9626 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9627 symbol_c *IN_param_value = &this->default_variable_name; |
|
9628 |
|
9629 symbol_c *IN_type_symbol = param_data_type; |
|
9630 last_type_symbol = param_data_type; |
|
9631 |
|
9632 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9633 { |
|
9634 |
|
9635 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9636 |
|
9637 if (IN_type_symbol == NULL) |
|
9638 IN_type_symbol = last_type_symbol; |
|
9639 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9640 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9641 function_type_prefix = return_type_symbol; |
|
9642 function_type_suffix = IN_type_symbol; |
|
9643 break; |
|
9644 |
|
9645 } |
|
9646 |
|
9647 |
|
9648 ERROR; |
|
9649 } |
|
9650 |
|
9651 }/*function_byte_to_word*/ |
|
9652 break; |
|
9653 |
|
9654 /**** |
|
9655 *BYTE_TO_STRING |
|
9656 */ |
|
9657 case function_byte_to_string : |
|
9658 { |
|
9659 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9660 |
|
9661 { |
|
9662 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9664 symbol_c *IN_param_value = &this->default_variable_name; |
|
9665 |
|
9666 symbol_c *IN_type_symbol = param_data_type; |
|
9667 last_type_symbol = param_data_type; |
|
9668 |
|
9669 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9670 { |
|
9671 |
|
9672 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
9673 |
|
9674 if (IN_type_symbol == NULL) |
|
9675 IN_type_symbol = last_type_symbol; |
|
9676 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9677 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9678 function_type_prefix = return_type_symbol; |
|
9679 break; |
|
9680 |
|
9681 } |
|
9682 |
|
9683 |
|
9684 ERROR; |
|
9685 } |
|
9686 |
|
9687 }/*function_byte_to_string*/ |
|
9688 break; |
|
9689 |
|
9690 /**** |
|
9691 *BYTE_TO_LWORD |
|
9692 */ |
|
9693 case function_byte_to_lword : |
|
9694 { |
|
9695 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9696 |
|
9697 { |
|
9698 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9699 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9700 symbol_c *IN_param_value = &this->default_variable_name; |
|
9701 |
|
9702 symbol_c *IN_type_symbol = param_data_type; |
|
9703 last_type_symbol = param_data_type; |
|
9704 |
|
9705 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9706 { |
|
9707 |
|
9708 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9709 |
|
9710 if (IN_type_symbol == NULL) |
|
9711 IN_type_symbol = last_type_symbol; |
|
9712 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9713 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9714 function_type_prefix = return_type_symbol; |
|
9715 function_type_suffix = IN_type_symbol; |
|
9716 break; |
|
9717 |
|
9718 } |
|
9719 |
|
9720 |
|
9721 ERROR; |
|
9722 } |
|
9723 |
|
9724 }/*function_byte_to_lword*/ |
|
9725 break; |
|
9726 |
|
9727 /**** |
|
9728 *BYTE_TO_UINT |
|
9729 */ |
|
9730 case function_byte_to_uint : |
|
9731 { |
|
9732 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9733 |
|
9734 { |
|
9735 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9736 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9737 symbol_c *IN_param_value = &this->default_variable_name; |
|
9738 |
|
9739 symbol_c *IN_type_symbol = param_data_type; |
|
9740 last_type_symbol = param_data_type; |
|
9741 |
|
9742 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9743 { |
|
9744 |
|
9745 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9746 |
|
9747 if (IN_type_symbol == NULL) |
|
9748 IN_type_symbol = last_type_symbol; |
|
9749 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9750 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9751 function_type_prefix = return_type_symbol; |
|
9752 function_type_suffix = IN_type_symbol; |
|
9753 break; |
|
9754 |
|
9755 } |
|
9756 |
|
9757 |
|
9758 ERROR; |
|
9759 } |
|
9760 |
|
9761 }/*function_byte_to_uint*/ |
|
9762 break; |
|
9763 |
|
9764 /**** |
|
9765 *BYTE_TO_LREAL |
|
9766 */ |
|
9767 case function_byte_to_lreal : |
|
9768 { |
|
9769 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9770 |
|
9771 { |
|
9772 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9773 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9774 symbol_c *IN_param_value = &this->default_variable_name; |
|
9775 |
|
9776 symbol_c *IN_type_symbol = param_data_type; |
|
9777 last_type_symbol = param_data_type; |
|
9778 |
|
9779 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9780 { |
|
9781 |
|
9782 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9783 |
|
9784 if (IN_type_symbol == NULL) |
|
9785 IN_type_symbol = last_type_symbol; |
|
9786 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9787 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9788 function_type_prefix = return_type_symbol; |
|
9789 function_type_suffix = IN_type_symbol; |
|
9790 break; |
|
9791 |
|
9792 } |
|
9793 |
|
9794 |
|
9795 ERROR; |
|
9796 } |
|
9797 |
|
9798 }/*function_byte_to_lreal*/ |
|
9799 break; |
|
9800 |
|
9801 /**** |
|
9802 *BYTE_TO_USINT |
|
9803 */ |
|
9804 case function_byte_to_usint : |
|
9805 { |
|
9806 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9807 |
|
9808 { |
|
9809 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9811 symbol_c *IN_param_value = &this->default_variable_name; |
|
9812 |
|
9813 symbol_c *IN_type_symbol = param_data_type; |
|
9814 last_type_symbol = param_data_type; |
|
9815 |
|
9816 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9817 { |
|
9818 |
|
9819 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9820 |
|
9821 if (IN_type_symbol == NULL) |
|
9822 IN_type_symbol = last_type_symbol; |
|
9823 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9824 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9825 function_type_prefix = return_type_symbol; |
|
9826 function_type_suffix = IN_type_symbol; |
|
9827 break; |
|
9828 |
|
9829 } |
|
9830 |
|
9831 |
|
9832 ERROR; |
|
9833 } |
|
9834 |
|
9835 }/*function_byte_to_usint*/ |
|
9836 break; |
|
9837 |
|
9838 /**** |
|
9839 *BYTE_TO_ULINT |
|
9840 */ |
|
9841 case function_byte_to_ulint : |
|
9842 { |
|
9843 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9844 |
|
9845 { |
|
9846 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9847 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9848 symbol_c *IN_param_value = &this->default_variable_name; |
|
9849 |
|
9850 symbol_c *IN_type_symbol = param_data_type; |
|
9851 last_type_symbol = param_data_type; |
|
9852 |
|
9853 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9854 { |
|
9855 |
|
9856 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9857 |
|
9858 if (IN_type_symbol == NULL) |
|
9859 IN_type_symbol = last_type_symbol; |
|
9860 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9861 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9862 function_type_prefix = return_type_symbol; |
|
9863 function_type_suffix = IN_type_symbol; |
|
9864 break; |
|
9865 |
|
9866 } |
|
9867 |
|
9868 |
|
9869 ERROR; |
|
9870 } |
|
9871 |
|
9872 }/*function_byte_to_ulint*/ |
|
9873 break; |
|
9874 |
|
9875 /**** |
|
9876 *BYTE_TO_BOOL |
|
9877 */ |
|
9878 case function_byte_to_bool : |
|
9879 { |
|
9880 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9881 |
|
9882 { |
|
9883 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9884 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9885 symbol_c *IN_param_value = &this->default_variable_name; |
|
9886 |
|
9887 symbol_c *IN_type_symbol = param_data_type; |
|
9888 last_type_symbol = param_data_type; |
|
9889 |
|
9890 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9891 { |
|
9892 |
|
9893 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9894 |
|
9895 if (IN_type_symbol == NULL) |
|
9896 IN_type_symbol = last_type_symbol; |
|
9897 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9898 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9899 function_type_prefix = return_type_symbol; |
|
9900 function_type_suffix = IN_type_symbol; |
|
9901 break; |
|
9902 |
|
9903 } |
|
9904 |
|
9905 |
|
9906 ERROR; |
|
9907 } |
|
9908 |
|
9909 }/*function_byte_to_bool*/ |
|
9910 break; |
|
9911 |
|
9912 /**** |
|
9913 *BYTE_TO_TIME |
|
9914 */ |
|
9915 case function_byte_to_time : |
|
9916 { |
|
9917 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9918 |
|
9919 { |
|
9920 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9922 symbol_c *IN_param_value = &this->default_variable_name; |
|
9923 |
|
9924 symbol_c *IN_type_symbol = param_data_type; |
|
9925 last_type_symbol = param_data_type; |
|
9926 |
|
9927 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9928 { |
|
9929 |
|
9930 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9931 |
|
9932 if (IN_type_symbol == NULL) |
|
9933 IN_type_symbol = last_type_symbol; |
|
9934 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9935 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9936 function_type_prefix = return_type_symbol; |
|
9937 break; |
|
9938 |
|
9939 } |
|
9940 |
|
9941 |
|
9942 ERROR; |
|
9943 } |
|
9944 |
|
9945 }/*function_byte_to_time*/ |
|
9946 break; |
|
9947 |
|
9948 /**** |
|
9949 *BYTE_TO_INT |
|
9950 */ |
|
9951 case function_byte_to_int : |
|
9952 { |
|
9953 symbol_c *last_type_symbol = &search_constant_type_c::byte_type_name; |
|
9954 |
|
9955 { |
|
9956 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9957 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9958 symbol_c *IN_param_value = &this->default_variable_name; |
|
9959 |
|
9960 symbol_c *IN_type_symbol = param_data_type; |
|
9961 last_type_symbol = param_data_type; |
|
9962 |
|
9963 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9964 { |
|
9965 |
|
9966 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9967 |
|
9968 if (IN_type_symbol == NULL) |
|
9969 IN_type_symbol = last_type_symbol; |
|
9970 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9971 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9972 function_type_prefix = return_type_symbol; |
|
9973 function_type_suffix = IN_type_symbol; |
|
9974 break; |
|
9975 |
|
9976 } |
|
9977 |
|
9978 |
|
9979 ERROR; |
|
9980 } |
|
9981 |
|
9982 }/*function_byte_to_int*/ |
|
9983 break; |
|
9984 |
|
9985 /**** |
|
9986 *USINT_TO_REAL |
|
9987 */ |
|
9988 case function_usint_to_real : |
|
9989 { |
|
9990 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
9991 |
|
9992 { |
|
9993 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9994 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9995 symbol_c *IN_param_value = &this->default_variable_name; |
|
9996 |
|
9997 symbol_c *IN_type_symbol = param_data_type; |
|
9998 last_type_symbol = param_data_type; |
|
9999 |
|
10000 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10001 { |
|
10002 |
|
10003 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10004 |
|
10005 if (IN_type_symbol == NULL) |
|
10006 IN_type_symbol = last_type_symbol; |
|
10007 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10008 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10009 function_type_prefix = return_type_symbol; |
|
10010 function_type_suffix = IN_type_symbol; |
|
10011 break; |
|
10012 |
|
10013 } |
|
10014 |
|
10015 |
|
10016 ERROR; |
|
10017 } |
|
10018 |
|
10019 }/*function_usint_to_real*/ |
|
10020 break; |
|
10021 |
|
10022 /**** |
|
10023 *USINT_TO_SINT |
|
10024 */ |
|
10025 case function_usint_to_sint : |
|
10026 { |
|
10027 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10028 |
|
10029 { |
|
10030 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10031 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10032 symbol_c *IN_param_value = &this->default_variable_name; |
|
10033 |
|
10034 symbol_c *IN_type_symbol = param_data_type; |
|
10035 last_type_symbol = param_data_type; |
|
10036 |
|
10037 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10038 { |
|
10039 |
|
10040 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10041 |
|
10042 if (IN_type_symbol == NULL) |
|
10043 IN_type_symbol = last_type_symbol; |
|
10044 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10045 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10046 function_type_prefix = return_type_symbol; |
|
10047 function_type_suffix = IN_type_symbol; |
|
10048 break; |
|
10049 |
|
10050 } |
|
10051 |
|
10052 |
|
10053 ERROR; |
|
10054 } |
|
10055 |
|
10056 }/*function_usint_to_sint*/ |
|
10057 break; |
|
10058 |
|
10059 /**** |
|
10060 *USINT_TO_LINT |
|
10061 */ |
|
10062 case function_usint_to_lint : |
|
10063 { |
|
10064 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10065 |
|
10066 { |
|
10067 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10069 symbol_c *IN_param_value = &this->default_variable_name; |
|
10070 |
|
10071 symbol_c *IN_type_symbol = param_data_type; |
|
10072 last_type_symbol = param_data_type; |
|
10073 |
|
10074 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10075 { |
|
10076 |
|
10077 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10078 |
|
10079 if (IN_type_symbol == NULL) |
|
10080 IN_type_symbol = last_type_symbol; |
|
10081 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10082 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10083 function_type_prefix = return_type_symbol; |
|
10084 function_type_suffix = IN_type_symbol; |
|
10085 break; |
|
10086 |
|
10087 } |
|
10088 |
|
10089 |
|
10090 ERROR; |
|
10091 } |
|
10092 |
|
10093 }/*function_usint_to_lint*/ |
|
10094 break; |
|
10095 |
|
10096 /**** |
|
10097 *USINT_TO_DINT |
|
10098 */ |
|
10099 case function_usint_to_dint : |
|
10100 { |
|
10101 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10102 |
|
10103 { |
|
10104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10106 symbol_c *IN_param_value = &this->default_variable_name; |
|
10107 |
|
10108 symbol_c *IN_type_symbol = param_data_type; |
|
10109 last_type_symbol = param_data_type; |
|
10110 |
|
10111 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10112 { |
|
10113 |
|
10114 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10115 |
|
10116 if (IN_type_symbol == NULL) |
|
10117 IN_type_symbol = last_type_symbol; |
|
10118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10119 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10120 function_type_prefix = return_type_symbol; |
|
10121 function_type_suffix = IN_type_symbol; |
|
10122 break; |
|
10123 |
|
10124 } |
|
10125 |
|
10126 |
|
10127 ERROR; |
|
10128 } |
|
10129 |
|
10130 }/*function_usint_to_dint*/ |
|
10131 break; |
|
10132 |
|
10133 /**** |
|
10134 *USINT_TO_DATE |
|
10135 */ |
|
10136 case function_usint_to_date : |
|
10137 { |
|
10138 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10139 |
|
10140 { |
|
10141 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10142 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10143 symbol_c *IN_param_value = &this->default_variable_name; |
|
10144 |
|
10145 symbol_c *IN_type_symbol = param_data_type; |
|
10146 last_type_symbol = param_data_type; |
|
10147 |
|
10148 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10149 { |
|
10150 |
|
10151 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10152 |
|
10153 if (IN_type_symbol == NULL) |
|
10154 IN_type_symbol = last_type_symbol; |
|
10155 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10156 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10157 function_type_prefix = return_type_symbol; |
|
10158 break; |
|
10159 |
|
10160 } |
|
10161 |
|
10162 |
|
10163 ERROR; |
|
10164 } |
|
10165 |
|
10166 }/*function_usint_to_date*/ |
|
10167 break; |
|
10168 |
|
10169 /**** |
|
10170 *USINT_TO_DWORD |
|
10171 */ |
|
10172 case function_usint_to_dword : |
|
10173 { |
|
10174 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10175 |
|
10176 { |
|
10177 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10178 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10179 symbol_c *IN_param_value = &this->default_variable_name; |
|
10180 |
|
10181 symbol_c *IN_type_symbol = param_data_type; |
|
10182 last_type_symbol = param_data_type; |
|
10183 |
|
10184 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10185 { |
|
10186 |
|
10187 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10188 |
|
10189 if (IN_type_symbol == NULL) |
|
10190 IN_type_symbol = last_type_symbol; |
|
10191 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10192 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10193 function_type_prefix = return_type_symbol; |
|
10194 function_type_suffix = IN_type_symbol; |
|
10195 break; |
|
10196 |
|
10197 } |
|
10198 |
|
10199 |
|
10200 ERROR; |
|
10201 } |
|
10202 |
|
10203 }/*function_usint_to_dword*/ |
|
10204 break; |
|
10205 |
|
10206 /**** |
|
10207 *USINT_TO_DT |
|
10208 */ |
|
10209 case function_usint_to_dt : |
|
10210 { |
|
10211 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10212 |
|
10213 { |
|
10214 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10216 symbol_c *IN_param_value = &this->default_variable_name; |
|
10217 |
|
10218 symbol_c *IN_type_symbol = param_data_type; |
|
10219 last_type_symbol = param_data_type; |
|
10220 |
|
10221 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10222 { |
|
10223 |
|
10224 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10225 |
|
10226 if (IN_type_symbol == NULL) |
|
10227 IN_type_symbol = last_type_symbol; |
|
10228 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10229 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10230 function_type_prefix = return_type_symbol; |
|
10231 break; |
|
10232 |
|
10233 } |
|
10234 |
|
10235 |
|
10236 ERROR; |
|
10237 } |
|
10238 |
|
10239 }/*function_usint_to_dt*/ |
|
10240 break; |
|
10241 |
|
10242 /**** |
|
10243 *USINT_TO_TOD |
|
10244 */ |
|
10245 case function_usint_to_tod : |
|
10246 { |
|
10247 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10248 |
|
10249 { |
|
10250 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10251 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10252 symbol_c *IN_param_value = &this->default_variable_name; |
|
10253 |
|
10254 symbol_c *IN_type_symbol = param_data_type; |
|
10255 last_type_symbol = param_data_type; |
|
10256 |
|
10257 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10258 { |
|
10259 |
|
10260 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10261 |
|
10262 if (IN_type_symbol == NULL) |
|
10263 IN_type_symbol = last_type_symbol; |
|
10264 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10265 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10266 function_type_prefix = return_type_symbol; |
|
10267 break; |
|
10268 |
|
10269 } |
|
10270 |
|
10271 |
|
10272 ERROR; |
|
10273 } |
|
10274 |
|
10275 }/*function_usint_to_tod*/ |
|
10276 break; |
|
10277 |
|
10278 /**** |
|
10279 *USINT_TO_UDINT |
|
10280 */ |
|
10281 case function_usint_to_udint : |
|
10282 { |
|
10283 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10284 |
|
10285 { |
|
10286 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10287 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10288 symbol_c *IN_param_value = &this->default_variable_name; |
|
10289 |
|
10290 symbol_c *IN_type_symbol = param_data_type; |
|
10291 last_type_symbol = param_data_type; |
|
10292 |
|
10293 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10294 { |
|
10295 |
|
10296 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10297 |
|
10298 if (IN_type_symbol == NULL) |
|
10299 IN_type_symbol = last_type_symbol; |
|
10300 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10301 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10302 function_type_prefix = return_type_symbol; |
|
10303 function_type_suffix = IN_type_symbol; |
|
10304 break; |
|
10305 |
|
10306 } |
|
10307 |
|
10308 |
|
10309 ERROR; |
|
10310 } |
|
10311 |
|
10312 }/*function_usint_to_udint*/ |
|
10313 break; |
|
10314 |
|
10315 /**** |
|
10316 *USINT_TO_WORD |
|
10317 */ |
|
10318 case function_usint_to_word : |
|
10319 { |
|
10320 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10321 |
|
10322 { |
|
10323 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10324 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10325 symbol_c *IN_param_value = &this->default_variable_name; |
|
10326 |
|
10327 symbol_c *IN_type_symbol = param_data_type; |
|
10328 last_type_symbol = param_data_type; |
|
10329 |
|
10330 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10331 { |
|
10332 |
|
10333 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10334 |
|
10335 if (IN_type_symbol == NULL) |
|
10336 IN_type_symbol = last_type_symbol; |
|
10337 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10338 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10339 function_type_prefix = return_type_symbol; |
|
10340 function_type_suffix = IN_type_symbol; |
|
10341 break; |
|
10342 |
|
10343 } |
|
10344 |
|
10345 |
|
10346 ERROR; |
|
10347 } |
|
10348 |
|
10349 }/*function_usint_to_word*/ |
|
10350 break; |
|
10351 |
|
10352 /**** |
|
10353 *USINT_TO_STRING |
|
10354 */ |
|
10355 case function_usint_to_string : |
|
10356 { |
|
10357 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10358 |
|
10359 { |
|
10360 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10361 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10362 symbol_c *IN_param_value = &this->default_variable_name; |
|
10363 |
|
10364 symbol_c *IN_type_symbol = param_data_type; |
|
10365 last_type_symbol = param_data_type; |
|
10366 |
|
10367 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10368 { |
|
10369 |
|
10370 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
10371 |
|
10372 if (IN_type_symbol == NULL) |
|
10373 IN_type_symbol = last_type_symbol; |
|
10374 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10375 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
10376 function_type_prefix = return_type_symbol; |
|
10377 break; |
|
10378 |
|
10379 } |
|
10380 |
|
10381 |
|
10382 ERROR; |
|
10383 } |
|
10384 |
|
10385 }/*function_usint_to_string*/ |
|
10386 break; |
|
10387 |
|
10388 /**** |
|
10389 *USINT_TO_LWORD |
|
10390 */ |
|
10391 case function_usint_to_lword : |
|
10392 { |
|
10393 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10394 |
|
10395 { |
|
10396 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10397 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10398 symbol_c *IN_param_value = &this->default_variable_name; |
|
10399 |
|
10400 symbol_c *IN_type_symbol = param_data_type; |
|
10401 last_type_symbol = param_data_type; |
|
10402 |
|
10403 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10404 { |
|
10405 |
|
10406 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10407 |
|
10408 if (IN_type_symbol == NULL) |
|
10409 IN_type_symbol = last_type_symbol; |
|
10410 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10411 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10412 function_type_prefix = return_type_symbol; |
|
10413 function_type_suffix = IN_type_symbol; |
|
10414 break; |
|
10415 |
|
10416 } |
|
10417 |
|
10418 |
|
10419 ERROR; |
|
10420 } |
|
10421 |
|
10422 }/*function_usint_to_lword*/ |
|
10423 break; |
|
10424 |
|
10425 /**** |
|
10426 *USINT_TO_UINT |
|
10427 */ |
|
10428 case function_usint_to_uint : |
|
10429 { |
|
10430 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10431 |
|
10432 { |
|
10433 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10434 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10435 symbol_c *IN_param_value = &this->default_variable_name; |
|
10436 |
|
10437 symbol_c *IN_type_symbol = param_data_type; |
|
10438 last_type_symbol = param_data_type; |
|
10439 |
|
10440 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10441 { |
|
10442 |
|
10443 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10444 |
|
10445 if (IN_type_symbol == NULL) |
|
10446 IN_type_symbol = last_type_symbol; |
|
10447 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10448 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10449 function_type_prefix = return_type_symbol; |
|
10450 function_type_suffix = IN_type_symbol; |
|
10451 break; |
|
10452 |
|
10453 } |
|
10454 |
|
10455 |
|
10456 ERROR; |
|
10457 } |
|
10458 |
|
10459 }/*function_usint_to_uint*/ |
|
10460 break; |
|
10461 |
|
10462 /**** |
|
10463 *USINT_TO_LREAL |
|
10464 */ |
|
10465 case function_usint_to_lreal : |
|
10466 { |
|
10467 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10468 |
|
10469 { |
|
10470 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10471 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10472 symbol_c *IN_param_value = &this->default_variable_name; |
|
10473 |
|
10474 symbol_c *IN_type_symbol = param_data_type; |
|
10475 last_type_symbol = param_data_type; |
|
10476 |
|
10477 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10478 { |
|
10479 |
|
10480 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10481 |
|
10482 if (IN_type_symbol == NULL) |
|
10483 IN_type_symbol = last_type_symbol; |
|
10484 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10485 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10486 function_type_prefix = return_type_symbol; |
|
10487 function_type_suffix = IN_type_symbol; |
|
10488 break; |
|
10489 |
|
10490 } |
|
10491 |
|
10492 |
|
10493 ERROR; |
|
10494 } |
|
10495 |
|
10496 }/*function_usint_to_lreal*/ |
|
10497 break; |
|
10498 |
|
10499 /**** |
|
10500 *USINT_TO_BYTE |
|
10501 */ |
|
10502 case function_usint_to_byte : |
|
10503 { |
|
10504 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10505 |
|
10506 { |
|
10507 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10508 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10509 symbol_c *IN_param_value = &this->default_variable_name; |
|
10510 |
|
10511 symbol_c *IN_type_symbol = param_data_type; |
|
10512 last_type_symbol = param_data_type; |
|
10513 |
|
10514 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10515 { |
|
10516 |
|
10517 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10518 |
|
10519 if (IN_type_symbol == NULL) |
|
10520 IN_type_symbol = last_type_symbol; |
|
10521 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10522 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10523 function_type_prefix = return_type_symbol; |
|
10524 function_type_suffix = IN_type_symbol; |
|
10525 break; |
|
10526 |
|
10527 } |
|
10528 |
|
10529 |
|
10530 ERROR; |
|
10531 } |
|
10532 |
|
10533 }/*function_usint_to_byte*/ |
|
10534 break; |
|
10535 |
|
10536 /**** |
|
10537 *USINT_TO_ULINT |
|
10538 */ |
|
10539 case function_usint_to_ulint : |
|
10540 { |
|
10541 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10542 |
|
10543 { |
|
10544 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10546 symbol_c *IN_param_value = &this->default_variable_name; |
|
10547 |
|
10548 symbol_c *IN_type_symbol = param_data_type; |
|
10549 last_type_symbol = param_data_type; |
|
10550 |
|
10551 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10552 { |
|
10553 |
|
10554 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10555 |
|
10556 if (IN_type_symbol == NULL) |
|
10557 IN_type_symbol = last_type_symbol; |
|
10558 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10559 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10560 function_type_prefix = return_type_symbol; |
|
10561 function_type_suffix = IN_type_symbol; |
|
10562 break; |
|
10563 |
|
10564 } |
|
10565 |
|
10566 |
|
10567 ERROR; |
|
10568 } |
|
10569 |
|
10570 }/*function_usint_to_ulint*/ |
|
10571 break; |
|
10572 |
|
10573 /**** |
|
10574 *USINT_TO_BOOL |
|
10575 */ |
|
10576 case function_usint_to_bool : |
|
10577 { |
|
10578 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10579 |
|
10580 { |
|
10581 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10583 symbol_c *IN_param_value = &this->default_variable_name; |
|
10584 |
|
10585 symbol_c *IN_type_symbol = param_data_type; |
|
10586 last_type_symbol = param_data_type; |
|
10587 |
|
10588 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10589 { |
|
10590 |
|
10591 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10592 |
|
10593 if (IN_type_symbol == NULL) |
|
10594 IN_type_symbol = last_type_symbol; |
|
10595 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10596 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10597 function_type_prefix = return_type_symbol; |
|
10598 function_type_suffix = IN_type_symbol; |
|
10599 break; |
|
10600 |
|
10601 } |
|
10602 |
|
10603 |
|
10604 ERROR; |
|
10605 } |
|
10606 |
|
10607 }/*function_usint_to_bool*/ |
|
10608 break; |
|
10609 |
|
10610 /**** |
|
10611 *USINT_TO_TIME |
|
10612 */ |
|
10613 case function_usint_to_time : |
|
10614 { |
|
10615 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10616 |
|
10617 { |
|
10618 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10620 symbol_c *IN_param_value = &this->default_variable_name; |
|
10621 |
|
10622 symbol_c *IN_type_symbol = param_data_type; |
|
10623 last_type_symbol = param_data_type; |
|
10624 |
|
10625 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10626 { |
|
10627 |
|
10628 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10629 |
|
10630 if (IN_type_symbol == NULL) |
|
10631 IN_type_symbol = last_type_symbol; |
|
10632 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10633 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10634 function_type_prefix = return_type_symbol; |
|
10635 break; |
|
10636 |
|
10637 } |
|
10638 |
|
10639 |
|
10640 ERROR; |
|
10641 } |
|
10642 |
|
10643 }/*function_usint_to_time*/ |
|
10644 break; |
|
10645 |
|
10646 /**** |
|
10647 *USINT_TO_INT |
|
10648 */ |
|
10649 case function_usint_to_int : |
|
10650 { |
|
10651 symbol_c *last_type_symbol = &search_constant_type_c::usint_type_name; |
|
10652 |
|
10653 { |
|
10654 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10656 symbol_c *IN_param_value = &this->default_variable_name; |
|
10657 |
|
10658 symbol_c *IN_type_symbol = param_data_type; |
|
10659 last_type_symbol = param_data_type; |
|
10660 |
|
10661 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10662 { |
|
10663 |
|
10664 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10665 |
|
10666 if (IN_type_symbol == NULL) |
|
10667 IN_type_symbol = last_type_symbol; |
|
10668 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10669 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10670 function_type_prefix = return_type_symbol; |
|
10671 function_type_suffix = IN_type_symbol; |
|
10672 break; |
|
10673 |
|
10674 } |
|
10675 |
|
10676 |
|
10677 ERROR; |
|
10678 } |
|
10679 |
|
10680 }/*function_usint_to_int*/ |
|
10681 break; |
|
10682 |
|
10683 /**** |
|
10684 *ULINT_TO_REAL |
|
10685 */ |
|
10686 case function_ulint_to_real : |
|
10687 { |
|
10688 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10689 |
|
10690 { |
|
10691 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10692 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10693 symbol_c *IN_param_value = &this->default_variable_name; |
|
10694 |
|
10695 symbol_c *IN_type_symbol = param_data_type; |
|
10696 last_type_symbol = param_data_type; |
|
10697 |
|
10698 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10699 { |
|
10700 |
|
10701 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10702 |
|
10703 if (IN_type_symbol == NULL) |
|
10704 IN_type_symbol = last_type_symbol; |
|
10705 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10706 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10707 function_type_prefix = return_type_symbol; |
|
10708 function_type_suffix = IN_type_symbol; |
|
10709 break; |
|
10710 |
|
10711 } |
|
10712 |
|
10713 |
|
10714 ERROR; |
|
10715 } |
|
10716 |
|
10717 }/*function_ulint_to_real*/ |
|
10718 break; |
|
10719 |
|
10720 /**** |
|
10721 *ULINT_TO_SINT |
|
10722 */ |
|
10723 case function_ulint_to_sint : |
|
10724 { |
|
10725 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10726 |
|
10727 { |
|
10728 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10736 { |
|
10737 |
|
10738 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10739 |
|
10740 if (IN_type_symbol == NULL) |
|
10741 IN_type_symbol = last_type_symbol; |
|
10742 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10743 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10744 function_type_prefix = return_type_symbol; |
|
10745 function_type_suffix = IN_type_symbol; |
|
10746 break; |
|
10747 |
|
10748 } |
|
10749 |
|
10750 |
|
10751 ERROR; |
|
10752 } |
|
10753 |
|
10754 }/*function_ulint_to_sint*/ |
|
10755 break; |
|
10756 |
|
10757 /**** |
|
10758 *ULINT_TO_LINT |
|
10759 */ |
|
10760 case function_ulint_to_lint : |
|
10761 { |
|
10762 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10763 |
|
10764 { |
|
10765 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10767 symbol_c *IN_param_value = &this->default_variable_name; |
|
10768 |
|
10769 symbol_c *IN_type_symbol = param_data_type; |
|
10770 last_type_symbol = param_data_type; |
|
10771 |
|
10772 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10773 { |
|
10774 |
|
10775 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10776 |
|
10777 if (IN_type_symbol == NULL) |
|
10778 IN_type_symbol = last_type_symbol; |
|
10779 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10780 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10781 function_type_prefix = return_type_symbol; |
|
10782 function_type_suffix = IN_type_symbol; |
|
10783 break; |
|
10784 |
|
10785 } |
|
10786 |
|
10787 |
|
10788 ERROR; |
|
10789 } |
|
10790 |
|
10791 }/*function_ulint_to_lint*/ |
|
10792 break; |
|
10793 |
|
10794 /**** |
|
10795 *ULINT_TO_DINT |
|
10796 */ |
|
10797 case function_ulint_to_dint : |
|
10798 { |
|
10799 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10800 |
|
10801 { |
|
10802 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10803 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10804 symbol_c *IN_param_value = &this->default_variable_name; |
|
10805 |
|
10806 symbol_c *IN_type_symbol = param_data_type; |
|
10807 last_type_symbol = param_data_type; |
|
10808 |
|
10809 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10810 { |
|
10811 |
|
10812 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10813 |
|
10814 if (IN_type_symbol == NULL) |
|
10815 IN_type_symbol = last_type_symbol; |
|
10816 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10817 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10818 function_type_prefix = return_type_symbol; |
|
10819 function_type_suffix = IN_type_symbol; |
|
10820 break; |
|
10821 |
|
10822 } |
|
10823 |
|
10824 |
|
10825 ERROR; |
|
10826 } |
|
10827 |
|
10828 }/*function_ulint_to_dint*/ |
|
10829 break; |
|
10830 |
|
10831 /**** |
|
10832 *ULINT_TO_DATE |
|
10833 */ |
|
10834 case function_ulint_to_date : |
|
10835 { |
|
10836 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10837 |
|
10838 { |
|
10839 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10840 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10841 symbol_c *IN_param_value = &this->default_variable_name; |
|
10842 |
|
10843 symbol_c *IN_type_symbol = param_data_type; |
|
10844 last_type_symbol = param_data_type; |
|
10845 |
|
10846 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10847 { |
|
10848 |
|
10849 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10850 |
|
10851 if (IN_type_symbol == NULL) |
|
10852 IN_type_symbol = last_type_symbol; |
|
10853 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10854 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10855 function_type_prefix = return_type_symbol; |
|
10856 break; |
|
10857 |
|
10858 } |
|
10859 |
|
10860 |
|
10861 ERROR; |
|
10862 } |
|
10863 |
|
10864 }/*function_ulint_to_date*/ |
|
10865 break; |
|
10866 |
|
10867 /**** |
|
10868 *ULINT_TO_DWORD |
|
10869 */ |
|
10870 case function_ulint_to_dword : |
|
10871 { |
|
10872 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10873 |
|
10874 { |
|
10875 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10877 symbol_c *IN_param_value = &this->default_variable_name; |
|
10878 |
|
10879 symbol_c *IN_type_symbol = param_data_type; |
|
10880 last_type_symbol = param_data_type; |
|
10881 |
|
10882 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10883 { |
|
10884 |
|
10885 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10886 |
|
10887 if (IN_type_symbol == NULL) |
|
10888 IN_type_symbol = last_type_symbol; |
|
10889 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10890 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10891 function_type_prefix = return_type_symbol; |
|
10892 function_type_suffix = IN_type_symbol; |
|
10893 break; |
|
10894 |
|
10895 } |
|
10896 |
|
10897 |
|
10898 ERROR; |
|
10899 } |
|
10900 |
|
10901 }/*function_ulint_to_dword*/ |
|
10902 break; |
|
10903 |
|
10904 /**** |
|
10905 *ULINT_TO_DT |
|
10906 */ |
|
10907 case function_ulint_to_dt : |
|
10908 { |
|
10909 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10910 |
|
10911 { |
|
10912 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10913 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10914 symbol_c *IN_param_value = &this->default_variable_name; |
|
10915 |
|
10916 symbol_c *IN_type_symbol = param_data_type; |
|
10917 last_type_symbol = param_data_type; |
|
10918 |
|
10919 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10920 { |
|
10921 |
|
10922 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10923 |
|
10924 if (IN_type_symbol == NULL) |
|
10925 IN_type_symbol = last_type_symbol; |
|
10926 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10927 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10928 function_type_prefix = return_type_symbol; |
|
10929 break; |
|
10930 |
|
10931 } |
|
10932 |
|
10933 |
|
10934 ERROR; |
|
10935 } |
|
10936 |
|
10937 }/*function_ulint_to_dt*/ |
|
10938 break; |
|
10939 |
|
10940 /**** |
|
10941 *ULINT_TO_TOD |
|
10942 */ |
|
10943 case function_ulint_to_tod : |
|
10944 { |
|
10945 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10946 |
|
10947 { |
|
10948 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10950 symbol_c *IN_param_value = &this->default_variable_name; |
|
10951 |
|
10952 symbol_c *IN_type_symbol = param_data_type; |
|
10953 last_type_symbol = param_data_type; |
|
10954 |
|
10955 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10956 { |
|
10957 |
|
10958 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10959 |
|
10960 if (IN_type_symbol == NULL) |
|
10961 IN_type_symbol = last_type_symbol; |
|
10962 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10963 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10964 function_type_prefix = return_type_symbol; |
|
10965 break; |
|
10966 |
|
10967 } |
|
10968 |
|
10969 |
|
10970 ERROR; |
|
10971 } |
|
10972 |
|
10973 }/*function_ulint_to_tod*/ |
|
10974 break; |
|
10975 |
|
10976 /**** |
|
10977 *ULINT_TO_UDINT |
|
10978 */ |
|
10979 case function_ulint_to_udint : |
|
10980 { |
|
10981 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10982 |
|
10983 { |
|
10984 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10985 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10986 symbol_c *IN_param_value = &this->default_variable_name; |
|
10987 |
|
10988 symbol_c *IN_type_symbol = param_data_type; |
|
10989 last_type_symbol = param_data_type; |
|
10990 |
|
10991 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10992 { |
|
10993 |
|
10994 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10995 |
|
10996 if (IN_type_symbol == NULL) |
|
10997 IN_type_symbol = last_type_symbol; |
|
10998 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10999 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11000 function_type_prefix = return_type_symbol; |
|
11001 function_type_suffix = IN_type_symbol; |
|
11002 break; |
|
11003 |
|
11004 } |
|
11005 |
|
11006 |
|
11007 ERROR; |
|
11008 } |
|
11009 |
|
11010 }/*function_ulint_to_udint*/ |
|
11011 break; |
|
11012 |
|
11013 /**** |
|
11014 *ULINT_TO_WORD |
|
11015 */ |
|
11016 case function_ulint_to_word : |
|
11017 { |
|
11018 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11019 |
|
11020 { |
|
11021 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11022 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11023 symbol_c *IN_param_value = &this->default_variable_name; |
|
11024 |
|
11025 symbol_c *IN_type_symbol = param_data_type; |
|
11026 last_type_symbol = param_data_type; |
|
11027 |
|
11028 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11029 { |
|
11030 |
|
11031 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11032 |
|
11033 if (IN_type_symbol == NULL) |
|
11034 IN_type_symbol = last_type_symbol; |
|
11035 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11036 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11037 function_type_prefix = return_type_symbol; |
|
11038 function_type_suffix = IN_type_symbol; |
|
11039 break; |
|
11040 |
|
11041 } |
|
11042 |
|
11043 |
|
11044 ERROR; |
|
11045 } |
|
11046 |
|
11047 }/*function_ulint_to_word*/ |
|
11048 break; |
|
11049 |
|
11050 /**** |
|
11051 *ULINT_TO_STRING |
|
11052 */ |
|
11053 case function_ulint_to_string : |
|
11054 { |
|
11055 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11056 |
|
11057 { |
|
11058 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11066 { |
|
11067 |
|
11068 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
11069 |
|
11070 if (IN_type_symbol == NULL) |
|
11071 IN_type_symbol = last_type_symbol; |
|
11072 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11073 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11074 function_type_prefix = return_type_symbol; |
|
11075 break; |
|
11076 |
|
11077 } |
|
11078 |
|
11079 |
|
11080 ERROR; |
|
11081 } |
|
11082 |
|
11083 }/*function_ulint_to_string*/ |
|
11084 break; |
|
11085 |
|
11086 /**** |
|
11087 *ULINT_TO_LWORD |
|
11088 */ |
|
11089 case function_ulint_to_lword : |
|
11090 { |
|
11091 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11092 |
|
11093 { |
|
11094 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11095 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11096 symbol_c *IN_param_value = &this->default_variable_name; |
|
11097 |
|
11098 symbol_c *IN_type_symbol = param_data_type; |
|
11099 last_type_symbol = param_data_type; |
|
11100 |
|
11101 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11102 { |
|
11103 |
|
11104 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11105 |
|
11106 if (IN_type_symbol == NULL) |
|
11107 IN_type_symbol = last_type_symbol; |
|
11108 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11109 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11110 function_type_prefix = return_type_symbol; |
|
11111 function_type_suffix = IN_type_symbol; |
|
11112 break; |
|
11113 |
|
11114 } |
|
11115 |
|
11116 |
|
11117 ERROR; |
|
11118 } |
|
11119 |
|
11120 }/*function_ulint_to_lword*/ |
|
11121 break; |
|
11122 |
|
11123 /**** |
|
11124 *ULINT_TO_UINT |
|
11125 */ |
|
11126 case function_ulint_to_uint : |
|
11127 { |
|
11128 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11129 |
|
11130 { |
|
11131 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11132 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11133 symbol_c *IN_param_value = &this->default_variable_name; |
|
11134 |
|
11135 symbol_c *IN_type_symbol = param_data_type; |
|
11136 last_type_symbol = param_data_type; |
|
11137 |
|
11138 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11139 { |
|
11140 |
|
11141 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11142 |
|
11143 if (IN_type_symbol == NULL) |
|
11144 IN_type_symbol = last_type_symbol; |
|
11145 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11146 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11147 function_type_prefix = return_type_symbol; |
|
11148 function_type_suffix = IN_type_symbol; |
|
11149 break; |
|
11150 |
|
11151 } |
|
11152 |
|
11153 |
|
11154 ERROR; |
|
11155 } |
|
11156 |
|
11157 }/*function_ulint_to_uint*/ |
|
11158 break; |
|
11159 |
|
11160 /**** |
|
11161 *ULINT_TO_LREAL |
|
11162 */ |
|
11163 case function_ulint_to_lreal : |
|
11164 { |
|
11165 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11166 |
|
11167 { |
|
11168 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11170 symbol_c *IN_param_value = &this->default_variable_name; |
|
11171 |
|
11172 symbol_c *IN_type_symbol = param_data_type; |
|
11173 last_type_symbol = param_data_type; |
|
11174 |
|
11175 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11176 { |
|
11177 |
|
11178 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11179 |
|
11180 if (IN_type_symbol == NULL) |
|
11181 IN_type_symbol = last_type_symbol; |
|
11182 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11183 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11184 function_type_prefix = return_type_symbol; |
|
11185 function_type_suffix = IN_type_symbol; |
|
11186 break; |
|
11187 |
|
11188 } |
|
11189 |
|
11190 |
|
11191 ERROR; |
|
11192 } |
|
11193 |
|
11194 }/*function_ulint_to_lreal*/ |
|
11195 break; |
|
11196 |
|
11197 /**** |
|
11198 *ULINT_TO_BYTE |
|
11199 */ |
|
11200 case function_ulint_to_byte : |
|
11201 { |
|
11202 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11203 |
|
11204 { |
|
11205 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11206 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11207 symbol_c *IN_param_value = &this->default_variable_name; |
|
11208 |
|
11209 symbol_c *IN_type_symbol = param_data_type; |
|
11210 last_type_symbol = param_data_type; |
|
11211 |
|
11212 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11213 { |
|
11214 |
|
11215 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11216 |
|
11217 if (IN_type_symbol == NULL) |
|
11218 IN_type_symbol = last_type_symbol; |
|
11219 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11220 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11221 function_type_prefix = return_type_symbol; |
|
11222 function_type_suffix = IN_type_symbol; |
|
11223 break; |
|
11224 |
|
11225 } |
|
11226 |
|
11227 |
|
11228 ERROR; |
|
11229 } |
|
11230 |
|
11231 }/*function_ulint_to_byte*/ |
|
11232 break; |
|
11233 |
|
11234 /**** |
|
11235 *ULINT_TO_USINT |
|
11236 */ |
|
11237 case function_ulint_to_usint : |
|
11238 { |
|
11239 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11240 |
|
11241 { |
|
11242 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11243 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11244 symbol_c *IN_param_value = &this->default_variable_name; |
|
11245 |
|
11246 symbol_c *IN_type_symbol = param_data_type; |
|
11247 last_type_symbol = param_data_type; |
|
11248 |
|
11249 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11250 { |
|
11251 |
|
11252 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11253 |
|
11254 if (IN_type_symbol == NULL) |
|
11255 IN_type_symbol = last_type_symbol; |
|
11256 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11257 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11258 function_type_prefix = return_type_symbol; |
|
11259 function_type_suffix = IN_type_symbol; |
|
11260 break; |
|
11261 |
|
11262 } |
|
11263 |
|
11264 |
|
11265 ERROR; |
|
11266 } |
|
11267 |
|
11268 }/*function_ulint_to_usint*/ |
|
11269 break; |
|
11270 |
|
11271 /**** |
|
11272 *ULINT_TO_BOOL |
|
11273 */ |
|
11274 case function_ulint_to_bool : |
|
11275 { |
|
11276 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11277 |
|
11278 { |
|
11279 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11281 symbol_c *IN_param_value = &this->default_variable_name; |
|
11282 |
|
11283 symbol_c *IN_type_symbol = param_data_type; |
|
11284 last_type_symbol = param_data_type; |
|
11285 |
|
11286 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11287 { |
|
11288 |
|
11289 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11290 |
|
11291 if (IN_type_symbol == NULL) |
|
11292 IN_type_symbol = last_type_symbol; |
|
11293 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11294 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11295 function_type_prefix = return_type_symbol; |
|
11296 function_type_suffix = IN_type_symbol; |
|
11297 break; |
|
11298 |
|
11299 } |
|
11300 |
|
11301 |
|
11302 ERROR; |
|
11303 } |
|
11304 |
|
11305 }/*function_ulint_to_bool*/ |
|
11306 break; |
|
11307 |
|
11308 /**** |
|
11309 *ULINT_TO_TIME |
|
11310 */ |
|
11311 case function_ulint_to_time : |
|
11312 { |
|
11313 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11314 |
|
11315 { |
|
11316 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11317 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11318 symbol_c *IN_param_value = &this->default_variable_name; |
|
11319 |
|
11320 symbol_c *IN_type_symbol = param_data_type; |
|
11321 last_type_symbol = param_data_type; |
|
11322 |
|
11323 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11324 { |
|
11325 |
|
11326 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11327 |
|
11328 if (IN_type_symbol == NULL) |
|
11329 IN_type_symbol = last_type_symbol; |
|
11330 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11331 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
11332 function_type_prefix = return_type_symbol; |
|
11333 break; |
|
11334 |
|
11335 } |
|
11336 |
|
11337 |
|
11338 ERROR; |
|
11339 } |
|
11340 |
|
11341 }/*function_ulint_to_time*/ |
|
11342 break; |
|
11343 |
|
11344 /**** |
|
11345 *ULINT_TO_INT |
|
11346 */ |
|
11347 case function_ulint_to_int : |
|
11348 { |
|
11349 symbol_c *last_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11350 |
|
11351 { |
|
11352 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11353 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11354 symbol_c *IN_param_value = &this->default_variable_name; |
|
11355 |
|
11356 symbol_c *IN_type_symbol = param_data_type; |
|
11357 last_type_symbol = param_data_type; |
|
11358 |
|
11359 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11360 { |
|
11361 |
|
11362 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11363 |
|
11364 if (IN_type_symbol == NULL) |
|
11365 IN_type_symbol = last_type_symbol; |
|
11366 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11367 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11368 function_type_prefix = return_type_symbol; |
|
11369 function_type_suffix = IN_type_symbol; |
|
11370 break; |
|
11371 |
|
11372 } |
|
11373 |
|
11374 |
|
11375 ERROR; |
|
11376 } |
|
11377 |
|
11378 }/*function_ulint_to_int*/ |
|
11379 break; |
|
11380 |
|
11381 /**** |
|
11382 *BOOL_TO_REAL |
|
11383 */ |
|
11384 case function_bool_to_real : |
|
11385 { |
|
11386 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11387 |
|
11388 { |
|
11389 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11391 symbol_c *IN_param_value = &this->default_variable_name; |
|
11392 |
|
11393 symbol_c *IN_type_symbol = param_data_type; |
|
11394 last_type_symbol = param_data_type; |
|
11395 |
|
11396 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11397 { |
|
11398 |
|
11399 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11400 |
|
11401 if (IN_type_symbol == NULL) |
|
11402 IN_type_symbol = last_type_symbol; |
|
11403 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11404 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
11405 function_type_prefix = return_type_symbol; |
|
11406 function_type_suffix = IN_type_symbol; |
|
11407 break; |
|
11408 |
|
11409 } |
|
11410 |
|
11411 |
|
11412 ERROR; |
|
11413 } |
|
11414 |
|
11415 }/*function_bool_to_real*/ |
|
11416 break; |
|
11417 |
|
11418 /**** |
|
11419 *BOOL_TO_SINT |
|
11420 */ |
|
11421 case function_bool_to_sint : |
|
11422 { |
|
11423 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11424 |
|
11425 { |
|
11426 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11428 symbol_c *IN_param_value = &this->default_variable_name; |
|
11429 |
|
11430 symbol_c *IN_type_symbol = param_data_type; |
|
11431 last_type_symbol = param_data_type; |
|
11432 |
|
11433 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11434 { |
|
11435 |
|
11436 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11437 |
|
11438 if (IN_type_symbol == NULL) |
|
11439 IN_type_symbol = last_type_symbol; |
|
11440 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11441 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
11442 function_type_prefix = return_type_symbol; |
|
11443 function_type_suffix = IN_type_symbol; |
|
11444 break; |
|
11445 |
|
11446 } |
|
11447 |
|
11448 |
|
11449 ERROR; |
|
11450 } |
|
11451 |
|
11452 }/*function_bool_to_sint*/ |
|
11453 break; |
|
11454 |
|
11455 /**** |
|
11456 *BOOL_TO_LINT |
|
11457 */ |
|
11458 case function_bool_to_lint : |
|
11459 { |
|
11460 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11461 |
|
11462 { |
|
11463 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11464 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11465 symbol_c *IN_param_value = &this->default_variable_name; |
|
11466 |
|
11467 symbol_c *IN_type_symbol = param_data_type; |
|
11468 last_type_symbol = param_data_type; |
|
11469 |
|
11470 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11471 { |
|
11472 |
|
11473 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11474 |
|
11475 if (IN_type_symbol == NULL) |
|
11476 IN_type_symbol = last_type_symbol; |
|
11477 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11478 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
11479 function_type_prefix = return_type_symbol; |
|
11480 function_type_suffix = IN_type_symbol; |
|
11481 break; |
|
11482 |
|
11483 } |
|
11484 |
|
11485 |
|
11486 ERROR; |
|
11487 } |
|
11488 |
|
11489 }/*function_bool_to_lint*/ |
|
11490 break; |
|
11491 |
|
11492 /**** |
|
11493 *BOOL_TO_DINT |
|
11494 */ |
|
11495 case function_bool_to_dint : |
|
11496 { |
|
11497 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11498 |
|
11499 { |
|
11500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11502 symbol_c *IN_param_value = &this->default_variable_name; |
|
11503 |
|
11504 symbol_c *IN_type_symbol = param_data_type; |
|
11505 last_type_symbol = param_data_type; |
|
11506 |
|
11507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11508 { |
|
11509 |
|
11510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11511 |
|
11512 if (IN_type_symbol == NULL) |
|
11513 IN_type_symbol = last_type_symbol; |
|
11514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11515 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
11516 function_type_prefix = return_type_symbol; |
|
11517 function_type_suffix = IN_type_symbol; |
|
11518 break; |
|
11519 |
|
11520 } |
|
11521 |
|
11522 |
|
11523 ERROR; |
|
11524 } |
|
11525 |
|
11526 }/*function_bool_to_dint*/ |
|
11527 break; |
|
11528 |
|
11529 /**** |
|
11530 *BOOL_TO_DATE |
|
11531 */ |
|
11532 case function_bool_to_date : |
|
11533 { |
|
11534 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11535 |
|
11536 { |
|
11537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11539 symbol_c *IN_param_value = &this->default_variable_name; |
|
11540 |
|
11541 symbol_c *IN_type_symbol = param_data_type; |
|
11542 last_type_symbol = param_data_type; |
|
11543 |
|
11544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11545 { |
|
11546 |
|
11547 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11548 |
|
11549 if (IN_type_symbol == NULL) |
|
11550 IN_type_symbol = last_type_symbol; |
|
11551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11552 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11553 function_type_prefix = return_type_symbol; |
|
11554 break; |
|
11555 |
|
11556 } |
|
11557 |
|
11558 |
|
11559 ERROR; |
|
11560 } |
|
11561 |
|
11562 }/*function_bool_to_date*/ |
|
11563 break; |
|
11564 |
|
11565 /**** |
|
11566 *BOOL_TO_DWORD |
|
11567 */ |
|
11568 case function_bool_to_dword : |
|
11569 { |
|
11570 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11571 |
|
11572 { |
|
11573 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11575 symbol_c *IN_param_value = &this->default_variable_name; |
|
11576 |
|
11577 symbol_c *IN_type_symbol = param_data_type; |
|
11578 last_type_symbol = param_data_type; |
|
11579 |
|
11580 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11581 { |
|
11582 |
|
11583 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11584 |
|
11585 if (IN_type_symbol == NULL) |
|
11586 IN_type_symbol = last_type_symbol; |
|
11587 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11588 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11589 function_type_prefix = return_type_symbol; |
|
11590 function_type_suffix = IN_type_symbol; |
|
11591 break; |
|
11592 |
|
11593 } |
|
11594 |
|
11595 |
|
11596 ERROR; |
|
11597 } |
|
11598 |
|
11599 }/*function_bool_to_dword*/ |
|
11600 break; |
|
11601 |
|
11602 /**** |
|
11603 *BOOL_TO_DT |
|
11604 */ |
|
11605 case function_bool_to_dt : |
|
11606 { |
|
11607 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11608 |
|
11609 { |
|
11610 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11612 symbol_c *IN_param_value = &this->default_variable_name; |
|
11613 |
|
11614 symbol_c *IN_type_symbol = param_data_type; |
|
11615 last_type_symbol = param_data_type; |
|
11616 |
|
11617 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11618 { |
|
11619 |
|
11620 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11621 |
|
11622 if (IN_type_symbol == NULL) |
|
11623 IN_type_symbol = last_type_symbol; |
|
11624 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11625 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11626 function_type_prefix = return_type_symbol; |
|
11627 break; |
|
11628 |
|
11629 } |
|
11630 |
|
11631 |
|
11632 ERROR; |
|
11633 } |
|
11634 |
|
11635 }/*function_bool_to_dt*/ |
|
11636 break; |
|
11637 |
|
11638 /**** |
|
11639 *BOOL_TO_TOD |
|
11640 */ |
|
11641 case function_bool_to_tod : |
|
11642 { |
|
11643 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11644 |
|
11645 { |
|
11646 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11647 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11648 symbol_c *IN_param_value = &this->default_variable_name; |
|
11649 |
|
11650 symbol_c *IN_type_symbol = param_data_type; |
|
11651 last_type_symbol = param_data_type; |
|
11652 |
|
11653 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11654 { |
|
11655 |
|
11656 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11657 |
|
11658 if (IN_type_symbol == NULL) |
|
11659 IN_type_symbol = last_type_symbol; |
|
11660 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11661 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11662 function_type_prefix = return_type_symbol; |
|
11663 break; |
|
11664 |
|
11665 } |
|
11666 |
|
11667 |
|
11668 ERROR; |
|
11669 } |
|
11670 |
|
11671 }/*function_bool_to_tod*/ |
|
11672 break; |
|
11673 |
|
11674 /**** |
|
11675 *BOOL_TO_UDINT |
|
11676 */ |
|
11677 case function_bool_to_udint : |
|
11678 { |
|
11679 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11680 |
|
11681 { |
|
11682 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11683 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11684 symbol_c *IN_param_value = &this->default_variable_name; |
|
11685 |
|
11686 symbol_c *IN_type_symbol = param_data_type; |
|
11687 last_type_symbol = param_data_type; |
|
11688 |
|
11689 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11690 { |
|
11691 |
|
11692 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11693 |
|
11694 if (IN_type_symbol == NULL) |
|
11695 IN_type_symbol = last_type_symbol; |
|
11696 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11697 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11698 function_type_prefix = return_type_symbol; |
|
11699 function_type_suffix = IN_type_symbol; |
|
11700 break; |
|
11701 |
|
11702 } |
|
11703 |
|
11704 |
|
11705 ERROR; |
|
11706 } |
|
11707 |
|
11708 }/*function_bool_to_udint*/ |
|
11709 break; |
|
11710 |
|
11711 /**** |
|
11712 *BOOL_TO_WORD |
|
11713 */ |
|
11714 case function_bool_to_word : |
|
11715 { |
|
11716 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11717 |
|
11718 { |
|
11719 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11720 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11721 symbol_c *IN_param_value = &this->default_variable_name; |
|
11722 |
|
11723 symbol_c *IN_type_symbol = param_data_type; |
|
11724 last_type_symbol = param_data_type; |
|
11725 |
|
11726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11727 { |
|
11728 |
|
11729 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11730 |
|
11731 if (IN_type_symbol == NULL) |
|
11732 IN_type_symbol = last_type_symbol; |
|
11733 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11734 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11735 function_type_prefix = return_type_symbol; |
|
11736 function_type_suffix = IN_type_symbol; |
|
11737 break; |
|
11738 |
|
11739 } |
|
11740 |
|
11741 |
|
11742 ERROR; |
|
11743 } |
|
11744 |
|
11745 }/*function_bool_to_word*/ |
|
11746 break; |
|
11747 |
|
11748 /**** |
|
11749 *BOOL_TO_STRING |
|
11750 */ |
|
11751 case function_bool_to_string : |
|
11752 { |
|
11753 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11754 |
|
11755 { |
|
11756 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11757 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11758 symbol_c *IN_param_value = &this->default_variable_name; |
|
11759 |
|
11760 symbol_c *IN_type_symbol = param_data_type; |
|
11761 last_type_symbol = param_data_type; |
|
11762 |
|
11763 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11764 { |
|
11765 |
|
11766 function_name = (symbol_c*)(new pragma_c("__bool_to_string")); |
|
11767 |
|
11768 if (IN_type_symbol == NULL) |
|
11769 IN_type_symbol = last_type_symbol; |
|
11770 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11771 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11772 function_type_prefix = return_type_symbol; |
|
11773 break; |
|
11774 |
|
11775 } |
|
11776 |
|
11777 |
|
11778 ERROR; |
|
11779 } |
|
11780 |
|
11781 }/*function_bool_to_string*/ |
|
11782 break; |
|
11783 |
|
11784 /**** |
|
11785 *BOOL_TO_LWORD |
|
11786 */ |
|
11787 case function_bool_to_lword : |
|
11788 { |
|
11789 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11790 |
|
11791 { |
|
11792 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11793 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11794 symbol_c *IN_param_value = &this->default_variable_name; |
|
11795 |
|
11796 symbol_c *IN_type_symbol = param_data_type; |
|
11797 last_type_symbol = param_data_type; |
|
11798 |
|
11799 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11800 { |
|
11801 |
|
11802 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11803 |
|
11804 if (IN_type_symbol == NULL) |
|
11805 IN_type_symbol = last_type_symbol; |
|
11806 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11807 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11808 function_type_prefix = return_type_symbol; |
|
11809 function_type_suffix = IN_type_symbol; |
|
11810 break; |
|
11811 |
|
11812 } |
|
11813 |
|
11814 |
|
11815 ERROR; |
|
11816 } |
|
11817 |
|
11818 }/*function_bool_to_lword*/ |
|
11819 break; |
|
11820 |
|
11821 /**** |
|
11822 *BOOL_TO_UINT |
|
11823 */ |
|
11824 case function_bool_to_uint : |
|
11825 { |
|
11826 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11827 |
|
11828 { |
|
11829 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11830 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11831 symbol_c *IN_param_value = &this->default_variable_name; |
|
11832 |
|
11833 symbol_c *IN_type_symbol = param_data_type; |
|
11834 last_type_symbol = param_data_type; |
|
11835 |
|
11836 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11837 { |
|
11838 |
|
11839 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11840 |
|
11841 if (IN_type_symbol == NULL) |
|
11842 IN_type_symbol = last_type_symbol; |
|
11843 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11844 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11845 function_type_prefix = return_type_symbol; |
|
11846 function_type_suffix = IN_type_symbol; |
|
11847 break; |
|
11848 |
|
11849 } |
|
11850 |
|
11851 |
|
11852 ERROR; |
|
11853 } |
|
11854 |
|
11855 }/*function_bool_to_uint*/ |
|
11856 break; |
|
11857 |
|
11858 /**** |
|
11859 *BOOL_TO_LREAL |
|
11860 */ |
|
11861 case function_bool_to_lreal : |
|
11862 { |
|
11863 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11864 |
|
11865 { |
|
11866 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11867 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11868 symbol_c *IN_param_value = &this->default_variable_name; |
|
11869 |
|
11870 symbol_c *IN_type_symbol = param_data_type; |
|
11871 last_type_symbol = param_data_type; |
|
11872 |
|
11873 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11874 { |
|
11875 |
|
11876 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11877 |
|
11878 if (IN_type_symbol == NULL) |
|
11879 IN_type_symbol = last_type_symbol; |
|
11880 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11881 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11882 function_type_prefix = return_type_symbol; |
|
11883 function_type_suffix = IN_type_symbol; |
|
11884 break; |
|
11885 |
|
11886 } |
|
11887 |
|
11888 |
|
11889 ERROR; |
|
11890 } |
|
11891 |
|
11892 }/*function_bool_to_lreal*/ |
|
11893 break; |
|
11894 |
|
11895 /**** |
|
11896 *BOOL_TO_BYTE |
|
11897 */ |
|
11898 case function_bool_to_byte : |
|
11899 { |
|
11900 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11901 |
|
11902 { |
|
11903 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11905 symbol_c *IN_param_value = &this->default_variable_name; |
|
11906 |
|
11907 symbol_c *IN_type_symbol = param_data_type; |
|
11908 last_type_symbol = param_data_type; |
|
11909 |
|
11910 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11911 { |
|
11912 |
|
11913 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11914 |
|
11915 if (IN_type_symbol == NULL) |
|
11916 IN_type_symbol = last_type_symbol; |
|
11917 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11918 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11919 function_type_prefix = return_type_symbol; |
|
11920 function_type_suffix = IN_type_symbol; |
|
11921 break; |
|
11922 |
|
11923 } |
|
11924 |
|
11925 |
|
11926 ERROR; |
|
11927 } |
|
11928 |
|
11929 }/*function_bool_to_byte*/ |
|
11930 break; |
|
11931 |
|
11932 /**** |
|
11933 *BOOL_TO_USINT |
|
11934 */ |
|
11935 case function_bool_to_usint : |
|
11936 { |
|
11937 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11938 |
|
11939 { |
|
11940 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11941 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11942 symbol_c *IN_param_value = &this->default_variable_name; |
|
11943 |
|
11944 symbol_c *IN_type_symbol = param_data_type; |
|
11945 last_type_symbol = param_data_type; |
|
11946 |
|
11947 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11948 { |
|
11949 |
|
11950 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11951 |
|
11952 if (IN_type_symbol == NULL) |
|
11953 IN_type_symbol = last_type_symbol; |
|
11954 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11955 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11956 function_type_prefix = return_type_symbol; |
|
11957 function_type_suffix = IN_type_symbol; |
|
11958 break; |
|
11959 |
|
11960 } |
|
11961 |
|
11962 |
|
11963 ERROR; |
|
11964 } |
|
11965 |
|
11966 }/*function_bool_to_usint*/ |
|
11967 break; |
|
11968 |
|
11969 /**** |
|
11970 *BOOL_TO_ULINT |
|
11971 */ |
|
11972 case function_bool_to_ulint : |
|
11973 { |
|
11974 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
11975 |
|
11976 { |
|
11977 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11978 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11979 symbol_c *IN_param_value = &this->default_variable_name; |
|
11980 |
|
11981 symbol_c *IN_type_symbol = param_data_type; |
|
11982 last_type_symbol = param_data_type; |
|
11983 |
|
11984 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11985 { |
|
11986 |
|
11987 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11988 |
|
11989 if (IN_type_symbol == NULL) |
|
11990 IN_type_symbol = last_type_symbol; |
|
11991 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11992 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11993 function_type_prefix = return_type_symbol; |
|
11994 function_type_suffix = IN_type_symbol; |
|
11995 break; |
|
11996 |
|
11997 } |
|
11998 |
|
11999 |
|
12000 ERROR; |
|
12001 } |
|
12002 |
|
12003 }/*function_bool_to_ulint*/ |
|
12004 break; |
|
12005 |
|
12006 /**** |
|
12007 *BOOL_TO_TIME |
|
12008 */ |
|
12009 case function_bool_to_time : |
|
12010 { |
|
12011 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
12012 |
|
12013 { |
|
12014 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12015 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12016 symbol_c *IN_param_value = &this->default_variable_name; |
|
12017 |
|
12018 symbol_c *IN_type_symbol = param_data_type; |
|
12019 last_type_symbol = param_data_type; |
|
12020 |
|
12021 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12022 { |
|
12023 |
|
12024 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12025 |
|
12026 if (IN_type_symbol == NULL) |
|
12027 IN_type_symbol = last_type_symbol; |
|
12028 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12029 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
12030 function_type_prefix = return_type_symbol; |
|
12031 break; |
|
12032 |
|
12033 } |
|
12034 |
|
12035 |
|
12036 ERROR; |
|
12037 } |
|
12038 |
|
12039 }/*function_bool_to_time*/ |
|
12040 break; |
|
12041 |
|
12042 /**** |
|
12043 *BOOL_TO_INT |
|
12044 */ |
|
12045 case function_bool_to_int : |
|
12046 { |
|
12047 symbol_c *last_type_symbol = &search_constant_type_c::bool_type_name; |
|
12048 |
|
12049 { |
|
12050 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12051 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12052 symbol_c *IN_param_value = &this->default_variable_name; |
|
12053 |
|
12054 symbol_c *IN_type_symbol = param_data_type; |
|
12055 last_type_symbol = param_data_type; |
|
12056 |
|
12057 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12058 { |
|
12059 |
|
12060 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12061 |
|
12062 if (IN_type_symbol == NULL) |
|
12063 IN_type_symbol = last_type_symbol; |
|
12064 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12065 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12066 function_type_prefix = return_type_symbol; |
|
12067 function_type_suffix = IN_type_symbol; |
|
12068 break; |
|
12069 |
|
12070 } |
|
12071 |
|
12072 |
|
12073 ERROR; |
|
12074 } |
|
12075 |
|
12076 }/*function_bool_to_int*/ |
|
12077 break; |
|
12078 |
|
12079 /**** |
|
12080 *TIME_TO_REAL |
|
12081 */ |
|
12082 case function_time_to_real : |
|
12083 { |
|
12084 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12085 |
|
12086 { |
|
12087 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12088 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12089 symbol_c *IN_param_value = &this->default_variable_name; |
|
12090 |
|
12091 symbol_c *IN_type_symbol = param_data_type; |
|
12092 last_type_symbol = param_data_type; |
|
12093 |
|
12094 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12095 { |
|
12096 |
|
12097 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
12098 |
|
12099 if (IN_type_symbol == NULL) |
|
12100 IN_type_symbol = last_type_symbol; |
|
12101 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12102 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12103 function_type_prefix = return_type_symbol; |
|
12104 break; |
|
12105 |
|
12106 } |
|
12107 |
|
12108 |
|
12109 ERROR; |
|
12110 } |
|
12111 |
|
12112 }/*function_time_to_real*/ |
|
12113 break; |
|
12114 |
|
12115 /**** |
|
12116 *TIME_TO_SINT |
|
12117 */ |
|
12118 case function_time_to_sint : |
|
12119 { |
|
12120 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12121 |
|
12122 { |
|
12123 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12124 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12125 symbol_c *IN_param_value = &this->default_variable_name; |
|
12126 |
|
12127 symbol_c *IN_type_symbol = param_data_type; |
|
12128 last_type_symbol = param_data_type; |
|
12129 |
|
12130 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12131 { |
|
12132 |
|
12133 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12134 |
|
12135 if (IN_type_symbol == NULL) |
|
12136 IN_type_symbol = last_type_symbol; |
|
12137 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12138 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12139 function_type_prefix = return_type_symbol; |
|
12140 break; |
|
12141 |
|
12142 } |
|
12143 |
|
12144 |
|
12145 ERROR; |
|
12146 } |
|
12147 |
|
12148 }/*function_time_to_sint*/ |
|
12149 break; |
|
12150 |
|
12151 /**** |
|
12152 *TIME_TO_LINT |
|
12153 */ |
|
12154 case function_time_to_lint : |
|
12155 { |
|
12156 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12157 |
|
12158 { |
|
12159 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12160 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12161 symbol_c *IN_param_value = &this->default_variable_name; |
|
12162 |
|
12163 symbol_c *IN_type_symbol = param_data_type; |
|
12164 last_type_symbol = param_data_type; |
|
12165 |
|
12166 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12167 { |
|
12168 |
|
12169 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12170 |
|
12171 if (IN_type_symbol == NULL) |
|
12172 IN_type_symbol = last_type_symbol; |
|
12173 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12174 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12175 function_type_prefix = return_type_symbol; |
|
12176 break; |
|
12177 |
|
12178 } |
|
12179 |
|
12180 |
|
12181 ERROR; |
|
12182 } |
|
12183 |
|
12184 }/*function_time_to_lint*/ |
|
12185 break; |
|
12186 |
|
12187 /**** |
|
12188 *TIME_TO_DINT |
|
12189 */ |
|
12190 case function_time_to_dint : |
|
12191 { |
|
12192 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12193 |
|
12194 { |
|
12195 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12196 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12197 symbol_c *IN_param_value = &this->default_variable_name; |
|
12198 |
|
12199 symbol_c *IN_type_symbol = param_data_type; |
|
12200 last_type_symbol = param_data_type; |
|
12201 |
|
12202 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12203 { |
|
12204 |
|
12205 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12206 |
|
12207 if (IN_type_symbol == NULL) |
|
12208 IN_type_symbol = last_type_symbol; |
|
12209 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12210 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12211 function_type_prefix = return_type_symbol; |
|
12212 break; |
|
12213 |
|
12214 } |
|
12215 |
|
12216 |
|
12217 ERROR; |
|
12218 } |
|
12219 |
|
12220 }/*function_time_to_dint*/ |
|
12221 break; |
|
12222 |
|
12223 /**** |
|
12224 *TIME_TO_DWORD |
|
12225 */ |
|
12226 case function_time_to_dword : |
|
12227 { |
|
12228 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12229 |
|
12230 { |
|
12231 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12233 symbol_c *IN_param_value = &this->default_variable_name; |
|
12234 |
|
12235 symbol_c *IN_type_symbol = param_data_type; |
|
12236 last_type_symbol = param_data_type; |
|
12237 |
|
12238 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12239 { |
|
12240 |
|
12241 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12242 |
|
12243 if (IN_type_symbol == NULL) |
|
12244 IN_type_symbol = last_type_symbol; |
|
12245 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12246 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
12247 function_type_prefix = return_type_symbol; |
|
12248 break; |
|
12249 |
|
12250 } |
|
12251 |
|
12252 |
|
12253 ERROR; |
|
12254 } |
|
12255 |
|
12256 }/*function_time_to_dword*/ |
|
12257 break; |
|
12258 |
|
12259 /**** |
|
12260 *TIME_TO_UDINT |
|
12261 */ |
|
12262 case function_time_to_udint : |
|
12263 { |
|
12264 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12265 |
|
12266 { |
|
12267 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12268 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12269 symbol_c *IN_param_value = &this->default_variable_name; |
|
12270 |
|
12271 symbol_c *IN_type_symbol = param_data_type; |
|
12272 last_type_symbol = param_data_type; |
|
12273 |
|
12274 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12275 { |
|
12276 |
|
12277 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12278 |
|
12279 if (IN_type_symbol == NULL) |
|
12280 IN_type_symbol = last_type_symbol; |
|
12281 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12282 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12283 function_type_prefix = return_type_symbol; |
|
12284 break; |
|
12285 |
|
12286 } |
|
12287 |
|
12288 |
|
12289 ERROR; |
|
12290 } |
|
12291 |
|
12292 }/*function_time_to_udint*/ |
|
12293 break; |
|
12294 |
|
12295 /**** |
|
12296 *TIME_TO_WORD |
|
12297 */ |
|
12298 case function_time_to_word : |
|
12299 { |
|
12300 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12301 |
|
12302 { |
|
12303 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12304 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12305 symbol_c *IN_param_value = &this->default_variable_name; |
|
12306 |
|
12307 symbol_c *IN_type_symbol = param_data_type; |
|
12308 last_type_symbol = param_data_type; |
|
12309 |
|
12310 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12311 { |
|
12312 |
|
12313 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12314 |
|
12315 if (IN_type_symbol == NULL) |
|
12316 IN_type_symbol = last_type_symbol; |
|
12317 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12318 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
12319 function_type_prefix = return_type_symbol; |
|
12320 break; |
|
12321 |
|
12322 } |
|
12323 |
|
12324 |
|
12325 ERROR; |
|
12326 } |
|
12327 |
|
12328 }/*function_time_to_word*/ |
|
12329 break; |
|
12330 |
|
12331 /**** |
|
12332 *TIME_TO_STRING |
|
12333 */ |
|
12334 case function_time_to_string : |
|
12335 { |
|
12336 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12337 |
|
12338 { |
|
12339 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12340 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12341 symbol_c *IN_param_value = &this->default_variable_name; |
|
12342 |
|
12343 symbol_c *IN_type_symbol = param_data_type; |
|
12344 last_type_symbol = param_data_type; |
|
12345 |
|
12346 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12347 { |
|
12348 |
|
12349 function_name = (symbol_c*)(new pragma_c("__time_to_string")); |
|
12350 |
|
12351 if (IN_type_symbol == NULL) |
|
12352 IN_type_symbol = last_type_symbol; |
|
12353 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12354 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
12355 function_type_prefix = return_type_symbol; |
|
12356 break; |
|
12357 |
|
12358 } |
|
12359 |
|
12360 |
|
12361 ERROR; |
|
12362 } |
|
12363 |
|
12364 }/*function_time_to_string*/ |
|
12365 break; |
|
12366 |
|
12367 /**** |
|
12368 *TIME_TO_LWORD |
|
12369 */ |
|
12370 case function_time_to_lword : |
|
12371 { |
|
12372 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12373 |
|
12374 { |
|
12375 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12376 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12377 symbol_c *IN_param_value = &this->default_variable_name; |
|
12378 |
|
12379 symbol_c *IN_type_symbol = param_data_type; |
|
12380 last_type_symbol = param_data_type; |
|
12381 |
|
12382 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12383 { |
|
12384 |
|
12385 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12386 |
|
12387 if (IN_type_symbol == NULL) |
|
12388 IN_type_symbol = last_type_symbol; |
|
12389 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12390 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
12391 function_type_prefix = return_type_symbol; |
|
12392 break; |
|
12393 |
|
12394 } |
|
12395 |
|
12396 |
|
12397 ERROR; |
|
12398 } |
|
12399 |
|
12400 }/*function_time_to_lword*/ |
|
12401 break; |
|
12402 |
|
12403 /**** |
|
12404 *TIME_TO_UINT |
|
12405 */ |
|
12406 case function_time_to_uint : |
|
12407 { |
|
12408 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12409 |
|
12410 { |
|
12411 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12419 { |
|
12420 |
|
12421 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12422 |
|
12423 if (IN_type_symbol == NULL) |
|
12424 IN_type_symbol = last_type_symbol; |
|
12425 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12426 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
12427 function_type_prefix = return_type_symbol; |
|
12428 break; |
|
12429 |
|
12430 } |
|
12431 |
|
12432 |
|
12433 ERROR; |
|
12434 } |
|
12435 |
|
12436 }/*function_time_to_uint*/ |
|
12437 break; |
|
12438 |
|
12439 /**** |
|
12440 *TIME_TO_LREAL |
|
12441 */ |
|
12442 case function_time_to_lreal : |
|
12443 { |
|
12444 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12445 |
|
12446 { |
|
12447 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12448 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12449 symbol_c *IN_param_value = &this->default_variable_name; |
|
12450 |
|
12451 symbol_c *IN_type_symbol = param_data_type; |
|
12452 last_type_symbol = param_data_type; |
|
12453 |
|
12454 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12455 { |
|
12456 |
|
12457 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
12458 |
|
12459 if (IN_type_symbol == NULL) |
|
12460 IN_type_symbol = last_type_symbol; |
|
12461 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12462 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
12463 function_type_prefix = return_type_symbol; |
|
12464 break; |
|
12465 |
|
12466 } |
|
12467 |
|
12468 |
|
12469 ERROR; |
|
12470 } |
|
12471 |
|
12472 }/*function_time_to_lreal*/ |
|
12473 break; |
|
12474 |
|
12475 /**** |
|
12476 *TIME_TO_BYTE |
|
12477 */ |
|
12478 case function_time_to_byte : |
|
12479 { |
|
12480 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12481 |
|
12482 { |
|
12483 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12484 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12485 symbol_c *IN_param_value = &this->default_variable_name; |
|
12486 |
|
12487 symbol_c *IN_type_symbol = param_data_type; |
|
12488 last_type_symbol = param_data_type; |
|
12489 |
|
12490 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12491 { |
|
12492 |
|
12493 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12494 |
|
12495 if (IN_type_symbol == NULL) |
|
12496 IN_type_symbol = last_type_symbol; |
|
12497 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12498 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
12499 function_type_prefix = return_type_symbol; |
|
12500 break; |
|
12501 |
|
12502 } |
|
12503 |
|
12504 |
|
12505 ERROR; |
|
12506 } |
|
12507 |
|
12508 }/*function_time_to_byte*/ |
|
12509 break; |
|
12510 |
|
12511 /**** |
|
12512 *TIME_TO_USINT |
|
12513 */ |
|
12514 case function_time_to_usint : |
|
12515 { |
|
12516 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12517 |
|
12518 { |
|
12519 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12520 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12521 symbol_c *IN_param_value = &this->default_variable_name; |
|
12522 |
|
12523 symbol_c *IN_type_symbol = param_data_type; |
|
12524 last_type_symbol = param_data_type; |
|
12525 |
|
12526 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12527 { |
|
12528 |
|
12529 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12530 |
|
12531 if (IN_type_symbol == NULL) |
|
12532 IN_type_symbol = last_type_symbol; |
|
12533 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12534 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
12535 function_type_prefix = return_type_symbol; |
|
12536 break; |
|
12537 |
|
12538 } |
|
12539 |
|
12540 |
|
12541 ERROR; |
|
12542 } |
|
12543 |
|
12544 }/*function_time_to_usint*/ |
|
12545 break; |
|
12546 |
|
12547 /**** |
|
12548 *TIME_TO_ULINT |
|
12549 */ |
|
12550 case function_time_to_ulint : |
|
12551 { |
|
12552 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12553 |
|
12554 { |
|
12555 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12556 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12557 symbol_c *IN_param_value = &this->default_variable_name; |
|
12558 |
|
12559 symbol_c *IN_type_symbol = param_data_type; |
|
12560 last_type_symbol = param_data_type; |
|
12561 |
|
12562 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12563 { |
|
12564 |
|
12565 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12566 |
|
12567 if (IN_type_symbol == NULL) |
|
12568 IN_type_symbol = last_type_symbol; |
|
12569 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12570 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
12571 function_type_prefix = return_type_symbol; |
|
12572 break; |
|
12573 |
|
12574 } |
|
12575 |
|
12576 |
|
12577 ERROR; |
|
12578 } |
|
12579 |
|
12580 }/*function_time_to_ulint*/ |
|
12581 break; |
|
12582 |
|
12583 /**** |
|
12584 *TIME_TO_INT |
|
12585 */ |
|
12586 case function_time_to_int : |
|
12587 { |
|
12588 symbol_c *last_type_symbol = &search_constant_type_c::time_type_name; |
|
12589 |
|
12590 { |
|
12591 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12592 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12593 symbol_c *IN_param_value = &this->default_variable_name; |
|
12594 |
|
12595 symbol_c *IN_type_symbol = param_data_type; |
|
12596 last_type_symbol = param_data_type; |
|
12597 |
|
12598 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12599 { |
|
12600 |
|
12601 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12602 |
|
12603 if (IN_type_symbol == NULL) |
|
12604 IN_type_symbol = last_type_symbol; |
|
12605 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12606 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12607 function_type_prefix = return_type_symbol; |
|
12608 break; |
|
12609 |
|
12610 } |
|
12611 |
|
12612 |
|
12613 ERROR; |
|
12614 } |
|
12615 |
|
12616 }/*function_time_to_int*/ |
|
12617 break; |
|
12618 |
|
12619 /**** |
|
12620 *INT_TO_REAL |
|
12621 */ |
|
12622 case function_int_to_real : |
|
12623 { |
|
12624 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12625 |
|
12626 { |
|
12627 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12628 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12629 symbol_c *IN_param_value = &this->default_variable_name; |
|
12630 |
|
12631 symbol_c *IN_type_symbol = param_data_type; |
|
12632 last_type_symbol = param_data_type; |
|
12633 |
|
12634 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12635 { |
|
12636 |
|
12637 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12638 |
|
12639 if (IN_type_symbol == NULL) |
|
12640 IN_type_symbol = last_type_symbol; |
|
12641 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12642 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12643 function_type_prefix = return_type_symbol; |
|
12644 function_type_suffix = IN_type_symbol; |
|
12645 break; |
|
12646 |
|
12647 } |
|
12648 |
|
12649 |
|
12650 ERROR; |
|
12651 } |
|
12652 |
|
12653 }/*function_int_to_real*/ |
|
12654 break; |
|
12655 |
|
12656 /**** |
|
12657 *INT_TO_SINT |
|
12658 */ |
|
12659 case function_int_to_sint : |
|
12660 { |
|
12661 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12662 |
|
12663 { |
|
12664 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12665 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12666 symbol_c *IN_param_value = &this->default_variable_name; |
|
12667 |
|
12668 symbol_c *IN_type_symbol = param_data_type; |
|
12669 last_type_symbol = param_data_type; |
|
12670 |
|
12671 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12672 { |
|
12673 |
|
12674 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12675 |
|
12676 if (IN_type_symbol == NULL) |
|
12677 IN_type_symbol = last_type_symbol; |
|
12678 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12679 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12680 function_type_prefix = return_type_symbol; |
|
12681 function_type_suffix = IN_type_symbol; |
|
12682 break; |
|
12683 |
|
12684 } |
|
12685 |
|
12686 |
|
12687 ERROR; |
|
12688 } |
|
12689 |
|
12690 }/*function_int_to_sint*/ |
|
12691 break; |
|
12692 |
|
12693 /**** |
|
12694 *INT_TO_LINT |
|
12695 */ |
|
12696 case function_int_to_lint : |
|
12697 { |
|
12698 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12699 |
|
12700 { |
|
12701 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12702 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12703 symbol_c *IN_param_value = &this->default_variable_name; |
|
12704 |
|
12705 symbol_c *IN_type_symbol = param_data_type; |
|
12706 last_type_symbol = param_data_type; |
|
12707 |
|
12708 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12709 { |
|
12710 |
|
12711 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12712 |
|
12713 if (IN_type_symbol == NULL) |
|
12714 IN_type_symbol = last_type_symbol; |
|
12715 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12716 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12717 function_type_prefix = return_type_symbol; |
|
12718 function_type_suffix = IN_type_symbol; |
|
12719 break; |
|
12720 |
|
12721 } |
|
12722 |
|
12723 |
|
12724 ERROR; |
|
12725 } |
|
12726 |
|
12727 }/*function_int_to_lint*/ |
|
12728 break; |
|
12729 |
|
12730 /**** |
|
12731 *INT_TO_DINT |
|
12732 */ |
|
12733 case function_int_to_dint : |
|
12734 { |
|
12735 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12736 |
|
12737 { |
|
12738 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12740 symbol_c *IN_param_value = &this->default_variable_name; |
|
12741 |
|
12742 symbol_c *IN_type_symbol = param_data_type; |
|
12743 last_type_symbol = param_data_type; |
|
12744 |
|
12745 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12746 { |
|
12747 |
|
12748 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12749 |
|
12750 if (IN_type_symbol == NULL) |
|
12751 IN_type_symbol = last_type_symbol; |
|
12752 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12753 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12754 function_type_prefix = return_type_symbol; |
|
12755 function_type_suffix = IN_type_symbol; |
|
12756 break; |
|
12757 |
|
12758 } |
|
12759 |
|
12760 |
|
12761 ERROR; |
|
12762 } |
|
12763 |
|
12764 }/*function_int_to_dint*/ |
|
12765 break; |
|
12766 |
|
12767 /**** |
|
12768 *INT_TO_DATE |
|
12769 */ |
|
12770 case function_int_to_date : |
|
12771 { |
|
12772 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12773 |
|
12774 { |
|
12775 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12776 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12777 symbol_c *IN_param_value = &this->default_variable_name; |
|
12778 |
|
12779 symbol_c *IN_type_symbol = param_data_type; |
|
12780 last_type_symbol = param_data_type; |
|
12781 |
|
12782 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12783 { |
|
12784 |
|
12785 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12786 |
|
12787 if (IN_type_symbol == NULL) |
|
12788 IN_type_symbol = last_type_symbol; |
|
12789 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12790 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
12791 function_type_prefix = return_type_symbol; |
|
12792 break; |
|
12793 |
|
12794 } |
|
12795 |
|
12796 |
|
12797 ERROR; |
|
12798 } |
|
12799 |
|
12800 }/*function_int_to_date*/ |
|
12801 break; |
|
12802 |
|
12803 /**** |
|
12804 *INT_TO_DWORD |
|
12805 */ |
|
12806 case function_int_to_dword : |
|
12807 { |
|
12808 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12809 |
|
12810 { |
|
12811 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12812 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12813 symbol_c *IN_param_value = &this->default_variable_name; |
|
12814 |
|
12815 symbol_c *IN_type_symbol = param_data_type; |
|
12816 last_type_symbol = param_data_type; |
|
12817 |
|
12818 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12819 { |
|
12820 |
|
12821 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12822 |
|
12823 if (IN_type_symbol == NULL) |
|
12824 IN_type_symbol = last_type_symbol; |
|
12825 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12826 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
12827 function_type_prefix = return_type_symbol; |
|
12828 function_type_suffix = IN_type_symbol; |
|
12829 break; |
|
12830 |
|
12831 } |
|
12832 |
|
12833 |
|
12834 ERROR; |
|
12835 } |
|
12836 |
|
12837 }/*function_int_to_dword*/ |
|
12838 break; |
|
12839 |
|
12840 /**** |
|
12841 *INT_TO_DT |
|
12842 */ |
|
12843 case function_int_to_dt : |
|
12844 { |
|
12845 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12846 |
|
12847 { |
|
12848 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12849 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12850 symbol_c *IN_param_value = &this->default_variable_name; |
|
12851 |
|
12852 symbol_c *IN_type_symbol = param_data_type; |
|
12853 last_type_symbol = param_data_type; |
|
12854 |
|
12855 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12856 { |
|
12857 |
|
12858 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12859 |
|
12860 if (IN_type_symbol == NULL) |
|
12861 IN_type_symbol = last_type_symbol; |
|
12862 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12863 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
12864 function_type_prefix = return_type_symbol; |
|
12865 break; |
|
12866 |
|
12867 } |
|
12868 |
|
12869 |
|
12870 ERROR; |
|
12871 } |
|
12872 |
|
12873 }/*function_int_to_dt*/ |
|
12874 break; |
|
12875 |
|
12876 /**** |
|
12877 *INT_TO_TOD |
|
12878 */ |
|
12879 case function_int_to_tod : |
|
12880 { |
|
12881 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12882 |
|
12883 { |
|
12884 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12885 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12886 symbol_c *IN_param_value = &this->default_variable_name; |
|
12887 |
|
12888 symbol_c *IN_type_symbol = param_data_type; |
|
12889 last_type_symbol = param_data_type; |
|
12890 |
|
12891 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12892 { |
|
12893 |
|
12894 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12895 |
|
12896 if (IN_type_symbol == NULL) |
|
12897 IN_type_symbol = last_type_symbol; |
|
12898 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12899 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
12900 function_type_prefix = return_type_symbol; |
|
12901 break; |
|
12902 |
|
12903 } |
|
12904 |
|
12905 |
|
12906 ERROR; |
|
12907 } |
|
12908 |
|
12909 }/*function_int_to_tod*/ |
|
12910 break; |
|
12911 |
|
12912 /**** |
|
12913 *INT_TO_UDINT |
|
12914 */ |
|
12915 case function_int_to_udint : |
|
12916 { |
|
12917 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12918 |
|
12919 { |
|
12920 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12922 symbol_c *IN_param_value = &this->default_variable_name; |
|
12923 |
|
12924 symbol_c *IN_type_symbol = param_data_type; |
|
12925 last_type_symbol = param_data_type; |
|
12926 |
|
12927 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12928 { |
|
12929 |
|
12930 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12931 |
|
12932 if (IN_type_symbol == NULL) |
|
12933 IN_type_symbol = last_type_symbol; |
|
12934 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12935 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12936 function_type_prefix = return_type_symbol; |
|
12937 function_type_suffix = IN_type_symbol; |
|
12938 break; |
|
12939 |
|
12940 } |
|
12941 |
|
12942 |
|
12943 ERROR; |
|
12944 } |
|
12945 |
|
12946 }/*function_int_to_udint*/ |
|
12947 break; |
|
12948 |
|
12949 /**** |
|
12950 *INT_TO_WORD |
|
12951 */ |
|
12952 case function_int_to_word : |
|
12953 { |
|
12954 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12955 |
|
12956 { |
|
12957 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12958 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12959 symbol_c *IN_param_value = &this->default_variable_name; |
|
12960 |
|
12961 symbol_c *IN_type_symbol = param_data_type; |
|
12962 last_type_symbol = param_data_type; |
|
12963 |
|
12964 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12965 { |
|
12966 |
|
12967 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12968 |
|
12969 if (IN_type_symbol == NULL) |
|
12970 IN_type_symbol = last_type_symbol; |
|
12971 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12972 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
12973 function_type_prefix = return_type_symbol; |
|
12974 function_type_suffix = IN_type_symbol; |
|
12975 break; |
|
12976 |
|
12977 } |
|
12978 |
|
12979 |
|
12980 ERROR; |
|
12981 } |
|
12982 |
|
12983 }/*function_int_to_word*/ |
|
12984 break; |
|
12985 |
|
12986 /**** |
|
12987 *INT_TO_STRING |
|
12988 */ |
|
12989 case function_int_to_string : |
|
12990 { |
|
12991 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
12992 |
|
12993 { |
|
12994 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12995 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12996 symbol_c *IN_param_value = &this->default_variable_name; |
|
12997 |
|
12998 symbol_c *IN_type_symbol = param_data_type; |
|
12999 last_type_symbol = param_data_type; |
|
13000 |
|
13001 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13002 { |
|
13003 |
|
13004 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
13005 |
|
13006 if (IN_type_symbol == NULL) |
|
13007 IN_type_symbol = last_type_symbol; |
|
13008 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13009 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
13010 function_type_prefix = return_type_symbol; |
|
13011 break; |
|
13012 |
|
13013 } |
|
13014 |
|
13015 |
|
13016 ERROR; |
|
13017 } |
|
13018 |
|
13019 }/*function_int_to_string*/ |
|
13020 break; |
|
13021 |
|
13022 /**** |
|
13023 *INT_TO_LWORD |
|
13024 */ |
|
13025 case function_int_to_lword : |
|
13026 { |
|
13027 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13028 |
|
13029 { |
|
13030 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13031 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13032 symbol_c *IN_param_value = &this->default_variable_name; |
|
13033 |
|
13034 symbol_c *IN_type_symbol = param_data_type; |
|
13035 last_type_symbol = param_data_type; |
|
13036 |
|
13037 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13038 { |
|
13039 |
|
13040 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13041 |
|
13042 if (IN_type_symbol == NULL) |
|
13043 IN_type_symbol = last_type_symbol; |
|
13044 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13045 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
13046 function_type_prefix = return_type_symbol; |
|
13047 function_type_suffix = IN_type_symbol; |
|
13048 break; |
|
13049 |
|
13050 } |
|
13051 |
|
13052 |
|
13053 ERROR; |
|
13054 } |
|
13055 |
|
13056 }/*function_int_to_lword*/ |
|
13057 break; |
|
13058 |
|
13059 /**** |
|
13060 *INT_TO_UINT |
|
13061 */ |
|
13062 case function_int_to_uint : |
|
13063 { |
|
13064 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13065 |
|
13066 { |
|
13067 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13069 symbol_c *IN_param_value = &this->default_variable_name; |
|
13070 |
|
13071 symbol_c *IN_type_symbol = param_data_type; |
|
13072 last_type_symbol = param_data_type; |
|
13073 |
|
13074 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13075 { |
|
13076 |
|
13077 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13078 |
|
13079 if (IN_type_symbol == NULL) |
|
13080 IN_type_symbol = last_type_symbol; |
|
13081 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13082 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
13083 function_type_prefix = return_type_symbol; |
|
13084 function_type_suffix = IN_type_symbol; |
|
13085 break; |
|
13086 |
|
13087 } |
|
13088 |
|
13089 |
|
13090 ERROR; |
|
13091 } |
|
13092 |
|
13093 }/*function_int_to_uint*/ |
|
13094 break; |
|
13095 |
|
13096 /**** |
|
13097 *INT_TO_LREAL |
|
13098 */ |
|
13099 case function_int_to_lreal : |
|
13100 { |
|
13101 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13102 |
|
13103 { |
|
13104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13112 { |
|
13113 |
|
13114 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13115 |
|
13116 if (IN_type_symbol == NULL) |
|
13117 IN_type_symbol = last_type_symbol; |
|
13118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13119 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
13120 function_type_prefix = return_type_symbol; |
|
13121 function_type_suffix = IN_type_symbol; |
|
13122 break; |
|
13123 |
|
13124 } |
|
13125 |
|
13126 |
|
13127 ERROR; |
|
13128 } |
|
13129 |
|
13130 }/*function_int_to_lreal*/ |
|
13131 break; |
|
13132 |
|
13133 /**** |
|
13134 *INT_TO_BYTE |
|
13135 */ |
|
13136 case function_int_to_byte : |
|
13137 { |
|
13138 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13139 |
|
13140 { |
|
13141 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13142 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13143 symbol_c *IN_param_value = &this->default_variable_name; |
|
13144 |
|
13145 symbol_c *IN_type_symbol = param_data_type; |
|
13146 last_type_symbol = param_data_type; |
|
13147 |
|
13148 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13149 { |
|
13150 |
|
13151 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13152 |
|
13153 if (IN_type_symbol == NULL) |
|
13154 IN_type_symbol = last_type_symbol; |
|
13155 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13156 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
13157 function_type_prefix = return_type_symbol; |
|
13158 function_type_suffix = IN_type_symbol; |
|
13159 break; |
|
13160 |
|
13161 } |
|
13162 |
|
13163 |
|
13164 ERROR; |
|
13165 } |
|
13166 |
|
13167 }/*function_int_to_byte*/ |
|
13168 break; |
|
13169 |
|
13170 /**** |
|
13171 *INT_TO_USINT |
|
13172 */ |
|
13173 case function_int_to_usint : |
|
13174 { |
|
13175 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13176 |
|
13177 { |
|
13178 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13180 symbol_c *IN_param_value = &this->default_variable_name; |
|
13181 |
|
13182 symbol_c *IN_type_symbol = param_data_type; |
|
13183 last_type_symbol = param_data_type; |
|
13184 |
|
13185 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13186 { |
|
13187 |
|
13188 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13189 |
|
13190 if (IN_type_symbol == NULL) |
|
13191 IN_type_symbol = last_type_symbol; |
|
13192 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13193 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
13194 function_type_prefix = return_type_symbol; |
|
13195 function_type_suffix = IN_type_symbol; |
|
13196 break; |
|
13197 |
|
13198 } |
|
13199 |
|
13200 |
|
13201 ERROR; |
|
13202 } |
|
13203 |
|
13204 }/*function_int_to_usint*/ |
|
13205 break; |
|
13206 |
|
13207 /**** |
|
13208 *INT_TO_ULINT |
|
13209 */ |
|
13210 case function_int_to_ulint : |
|
13211 { |
|
13212 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13213 |
|
13214 { |
|
13215 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13216 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13217 symbol_c *IN_param_value = &this->default_variable_name; |
|
13218 |
|
13219 symbol_c *IN_type_symbol = param_data_type; |
|
13220 last_type_symbol = param_data_type; |
|
13221 |
|
13222 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13223 { |
|
13224 |
|
13225 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13226 |
|
13227 if (IN_type_symbol == NULL) |
|
13228 IN_type_symbol = last_type_symbol; |
|
13229 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13230 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
13231 function_type_prefix = return_type_symbol; |
|
13232 function_type_suffix = IN_type_symbol; |
|
13233 break; |
|
13234 |
|
13235 } |
|
13236 |
|
13237 |
|
13238 ERROR; |
|
13239 } |
|
13240 |
|
13241 }/*function_int_to_ulint*/ |
|
13242 break; |
|
13243 |
|
13244 /**** |
|
13245 *INT_TO_BOOL |
|
13246 */ |
|
13247 case function_int_to_bool : |
|
13248 { |
|
13249 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13250 |
|
13251 { |
|
13252 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13253 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13254 symbol_c *IN_param_value = &this->default_variable_name; |
|
13255 |
|
13256 symbol_c *IN_type_symbol = param_data_type; |
|
13257 last_type_symbol = param_data_type; |
|
13258 |
|
13259 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13260 { |
|
13261 |
|
13262 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13263 |
|
13264 if (IN_type_symbol == NULL) |
|
13265 IN_type_symbol = last_type_symbol; |
|
13266 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13267 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
13268 function_type_prefix = return_type_symbol; |
|
13269 function_type_suffix = IN_type_symbol; |
|
13270 break; |
|
13271 |
|
13272 } |
|
13273 |
|
13274 |
|
13275 ERROR; |
|
13276 } |
|
13277 |
|
13278 }/*function_int_to_bool*/ |
|
13279 break; |
|
13280 |
|
13281 /**** |
|
13282 *INT_TO_TIME |
|
13283 */ |
|
13284 case function_int_to_time : |
|
13285 { |
|
13286 symbol_c *last_type_symbol = &search_constant_type_c::int_type_name; |
|
13287 |
|
13288 { |
|
13289 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13291 symbol_c *IN_param_value = &this->default_variable_name; |
|
13292 |
|
13293 symbol_c *IN_type_symbol = param_data_type; |
|
13294 last_type_symbol = param_data_type; |
|
13295 |
|
13296 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13297 { |
|
13298 |
|
13299 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13300 |
|
13301 if (IN_type_symbol == NULL) |
|
13302 IN_type_symbol = last_type_symbol; |
|
13303 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13304 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
13305 function_type_prefix = return_type_symbol; |
|
13306 break; |
|
13307 |
|
13308 } |
|
13309 |
|
13310 |
|
13311 ERROR; |
|
13312 } |
|
13313 |
|
13314 }/*function_int_to_time*/ |
|
13315 break; |
|
13316 |
|
13317 /**** |
|
13318 *TRUNC |
|
13319 */ |
|
13320 case function_trunc : |
|
13321 { |
34 symbol_c *last_type_symbol = NULL; |
13322 symbol_c *last_type_symbol = NULL; |
35 |
13323 |
36 { |
13324 { |
37 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
13325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
38 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
39 symbol_c *IN_param_value = &this->default_variable_name; |
13327 symbol_c *IN_param_value = &this->default_variable_name; |
40 |
13328 |
41 symbol_c *IN_type_symbol = param_data_type; |
13329 symbol_c *IN_type_symbol = param_data_type; |
42 last_type_symbol = param_data_type; |
13330 last_type_symbol = param_data_type; |
43 |
13331 |
44 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
45 { |
|
46 |
|
47 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
48 |
|
49 if (IN_type_symbol == NULL) |
|
50 IN_type_symbol = last_type_symbol; |
|
51 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
52 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
53 function_type_prefix = return_type_symbol; |
|
54 break; |
|
55 |
|
56 } |
|
57 |
|
58 |
|
59 ERROR; |
|
60 } |
|
61 |
|
62 }/*function_real_to_sint*/ |
|
63 break; |
|
64 |
|
65 /**** |
|
66 *REAL_TO_LINT |
|
67 */ |
|
68 case function_real_to_lint : |
|
69 { |
|
70 symbol_c *last_type_symbol = NULL; |
|
71 |
|
72 { |
|
73 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
74 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
75 symbol_c *IN_param_value = &this->default_variable_name; |
|
76 |
|
77 symbol_c *IN_type_symbol = param_data_type; |
|
78 last_type_symbol = param_data_type; |
|
79 |
|
80 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
81 { |
|
82 |
|
83 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
84 |
|
85 if (IN_type_symbol == NULL) |
|
86 IN_type_symbol = last_type_symbol; |
|
87 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
88 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
89 function_type_prefix = return_type_symbol; |
|
90 break; |
|
91 |
|
92 } |
|
93 |
|
94 |
|
95 ERROR; |
|
96 } |
|
97 |
|
98 }/*function_real_to_lint*/ |
|
99 break; |
|
100 |
|
101 /**** |
|
102 *REAL_TO_DINT |
|
103 */ |
|
104 case function_real_to_dint : |
|
105 { |
|
106 symbol_c *last_type_symbol = NULL; |
|
107 |
|
108 { |
|
109 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
110 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
111 symbol_c *IN_param_value = &this->default_variable_name; |
|
112 |
|
113 symbol_c *IN_type_symbol = param_data_type; |
|
114 last_type_symbol = param_data_type; |
|
115 |
|
116 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
117 { |
|
118 |
|
119 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
120 |
|
121 if (IN_type_symbol == NULL) |
|
122 IN_type_symbol = last_type_symbol; |
|
123 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
124 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
125 function_type_prefix = return_type_symbol; |
|
126 break; |
|
127 |
|
128 } |
|
129 |
|
130 |
|
131 ERROR; |
|
132 } |
|
133 |
|
134 }/*function_real_to_dint*/ |
|
135 break; |
|
136 |
|
137 /**** |
|
138 *REAL_TO_DATE |
|
139 */ |
|
140 case function_real_to_date : |
|
141 { |
|
142 symbol_c *last_type_symbol = NULL; |
|
143 |
|
144 { |
|
145 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
146 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
147 symbol_c *IN_param_value = &this->default_variable_name; |
|
148 |
|
149 symbol_c *IN_type_symbol = param_data_type; |
|
150 last_type_symbol = param_data_type; |
|
151 |
|
152 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
153 { |
|
154 |
|
155 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
156 |
|
157 if (IN_type_symbol == NULL) |
|
158 IN_type_symbol = last_type_symbol; |
|
159 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
160 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
161 function_type_prefix = return_type_symbol; |
|
162 break; |
|
163 |
|
164 } |
|
165 |
|
166 |
|
167 ERROR; |
|
168 } |
|
169 |
|
170 }/*function_real_to_date*/ |
|
171 break; |
|
172 |
|
173 /**** |
|
174 *REAL_TO_DWORD |
|
175 */ |
|
176 case function_real_to_dword : |
|
177 { |
|
178 symbol_c *last_type_symbol = NULL; |
|
179 |
|
180 { |
|
181 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
182 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
183 symbol_c *IN_param_value = &this->default_variable_name; |
|
184 |
|
185 symbol_c *IN_type_symbol = param_data_type; |
|
186 last_type_symbol = param_data_type; |
|
187 |
|
188 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
189 { |
|
190 |
|
191 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
192 |
|
193 if (IN_type_symbol == NULL) |
|
194 IN_type_symbol = last_type_symbol; |
|
195 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
196 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
197 function_type_prefix = return_type_symbol; |
|
198 break; |
|
199 |
|
200 } |
|
201 |
|
202 |
|
203 ERROR; |
|
204 } |
|
205 |
|
206 }/*function_real_to_dword*/ |
|
207 break; |
|
208 |
|
209 /**** |
|
210 *REAL_TO_DT |
|
211 */ |
|
212 case function_real_to_dt : |
|
213 { |
|
214 symbol_c *last_type_symbol = NULL; |
|
215 |
|
216 { |
|
217 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
218 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
219 symbol_c *IN_param_value = &this->default_variable_name; |
|
220 |
|
221 symbol_c *IN_type_symbol = param_data_type; |
|
222 last_type_symbol = param_data_type; |
|
223 |
|
224 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
225 { |
|
226 |
|
227 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
228 |
|
229 if (IN_type_symbol == NULL) |
|
230 IN_type_symbol = last_type_symbol; |
|
231 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
232 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
233 function_type_prefix = return_type_symbol; |
|
234 break; |
|
235 |
|
236 } |
|
237 |
|
238 |
|
239 ERROR; |
|
240 } |
|
241 |
|
242 }/*function_real_to_dt*/ |
|
243 break; |
|
244 |
|
245 /**** |
|
246 *REAL_TO_TOD |
|
247 */ |
|
248 case function_real_to_tod : |
|
249 { |
|
250 symbol_c *last_type_symbol = NULL; |
|
251 |
|
252 { |
|
253 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
254 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
255 symbol_c *IN_param_value = &this->default_variable_name; |
|
256 |
|
257 symbol_c *IN_type_symbol = param_data_type; |
|
258 last_type_symbol = param_data_type; |
|
259 |
|
260 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
261 { |
|
262 |
|
263 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
264 |
|
265 if (IN_type_symbol == NULL) |
|
266 IN_type_symbol = last_type_symbol; |
|
267 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
268 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
269 function_type_prefix = return_type_symbol; |
|
270 break; |
|
271 |
|
272 } |
|
273 |
|
274 |
|
275 ERROR; |
|
276 } |
|
277 |
|
278 }/*function_real_to_tod*/ |
|
279 break; |
|
280 |
|
281 /**** |
|
282 *REAL_TO_UDINT |
|
283 */ |
|
284 case function_real_to_udint : |
|
285 { |
|
286 symbol_c *last_type_symbol = NULL; |
|
287 |
|
288 { |
|
289 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
291 symbol_c *IN_param_value = &this->default_variable_name; |
|
292 |
|
293 symbol_c *IN_type_symbol = param_data_type; |
|
294 last_type_symbol = param_data_type; |
|
295 |
|
296 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
297 { |
|
298 |
|
299 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
300 |
|
301 if (IN_type_symbol == NULL) |
|
302 IN_type_symbol = last_type_symbol; |
|
303 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
304 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
305 function_type_prefix = return_type_symbol; |
|
306 break; |
|
307 |
|
308 } |
|
309 |
|
310 |
|
311 ERROR; |
|
312 } |
|
313 |
|
314 }/*function_real_to_udint*/ |
|
315 break; |
|
316 |
|
317 /**** |
|
318 *REAL_TO_WORD |
|
319 */ |
|
320 case function_real_to_word : |
|
321 { |
|
322 symbol_c *last_type_symbol = NULL; |
|
323 |
|
324 { |
|
325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
327 symbol_c *IN_param_value = &this->default_variable_name; |
|
328 |
|
329 symbol_c *IN_type_symbol = param_data_type; |
|
330 last_type_symbol = param_data_type; |
|
331 |
|
332 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
333 { |
|
334 |
|
335 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
336 |
|
337 if (IN_type_symbol == NULL) |
|
338 IN_type_symbol = last_type_symbol; |
|
339 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
340 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
341 function_type_prefix = return_type_symbol; |
|
342 break; |
|
343 |
|
344 } |
|
345 |
|
346 |
|
347 ERROR; |
|
348 } |
|
349 |
|
350 }/*function_real_to_word*/ |
|
351 break; |
|
352 |
|
353 /**** |
|
354 *REAL_TO_STRING |
|
355 */ |
|
356 case function_real_to_string : |
|
357 { |
|
358 symbol_c *last_type_symbol = NULL; |
|
359 |
|
360 { |
|
361 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
362 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
363 symbol_c *IN_param_value = &this->default_variable_name; |
|
364 |
|
365 symbol_c *IN_type_symbol = param_data_type; |
|
366 last_type_symbol = param_data_type; |
|
367 |
|
368 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
369 { |
|
370 |
|
371 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
372 |
|
373 if (IN_type_symbol == NULL) |
|
374 IN_type_symbol = last_type_symbol; |
|
375 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
376 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
377 function_type_prefix = return_type_symbol; |
|
378 break; |
|
379 |
|
380 } |
|
381 |
|
382 |
|
383 ERROR; |
|
384 } |
|
385 |
|
386 }/*function_real_to_string*/ |
|
387 break; |
|
388 |
|
389 /**** |
|
390 *REAL_TO_LWORD |
|
391 */ |
|
392 case function_real_to_lword : |
|
393 { |
|
394 symbol_c *last_type_symbol = NULL; |
|
395 |
|
396 { |
|
397 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
398 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
399 symbol_c *IN_param_value = &this->default_variable_name; |
|
400 |
|
401 symbol_c *IN_type_symbol = param_data_type; |
|
402 last_type_symbol = param_data_type; |
|
403 |
|
404 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
405 { |
|
406 |
|
407 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
408 |
|
409 if (IN_type_symbol == NULL) |
|
410 IN_type_symbol = last_type_symbol; |
|
411 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
412 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
413 function_type_prefix = return_type_symbol; |
|
414 break; |
|
415 |
|
416 } |
|
417 |
|
418 |
|
419 ERROR; |
|
420 } |
|
421 |
|
422 }/*function_real_to_lword*/ |
|
423 break; |
|
424 |
|
425 /**** |
|
426 *REAL_TO_UINT |
|
427 */ |
|
428 case function_real_to_uint : |
|
429 { |
|
430 symbol_c *last_type_symbol = NULL; |
|
431 |
|
432 { |
|
433 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
434 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
435 symbol_c *IN_param_value = &this->default_variable_name; |
|
436 |
|
437 symbol_c *IN_type_symbol = param_data_type; |
|
438 last_type_symbol = param_data_type; |
|
439 |
|
440 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
441 { |
|
442 |
|
443 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
444 |
|
445 if (IN_type_symbol == NULL) |
|
446 IN_type_symbol = last_type_symbol; |
|
447 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
448 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
449 function_type_prefix = return_type_symbol; |
|
450 break; |
|
451 |
|
452 } |
|
453 |
|
454 |
|
455 ERROR; |
|
456 } |
|
457 |
|
458 }/*function_real_to_uint*/ |
|
459 break; |
|
460 |
|
461 /**** |
|
462 *REAL_TO_LREAL |
|
463 */ |
|
464 case function_real_to_lreal : |
|
465 { |
|
466 symbol_c *last_type_symbol = NULL; |
|
467 |
|
468 { |
|
469 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
470 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
471 symbol_c *IN_param_value = &this->default_variable_name; |
|
472 |
|
473 symbol_c *IN_type_symbol = param_data_type; |
|
474 last_type_symbol = param_data_type; |
|
475 |
|
476 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
477 { |
|
478 |
|
479 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
480 |
|
481 if (IN_type_symbol == NULL) |
|
482 IN_type_symbol = last_type_symbol; |
|
483 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
484 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
485 function_type_prefix = return_type_symbol; |
|
486 function_type_suffix = IN_type_symbol; |
|
487 break; |
|
488 |
|
489 } |
|
490 |
|
491 |
|
492 ERROR; |
|
493 } |
|
494 |
|
495 }/*function_real_to_lreal*/ |
|
496 break; |
|
497 |
|
498 /**** |
|
499 *REAL_TO_BYTE |
|
500 */ |
|
501 case function_real_to_byte : |
|
502 { |
|
503 symbol_c *last_type_symbol = NULL; |
|
504 |
|
505 { |
|
506 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
507 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
508 symbol_c *IN_param_value = &this->default_variable_name; |
|
509 |
|
510 symbol_c *IN_type_symbol = param_data_type; |
|
511 last_type_symbol = param_data_type; |
|
512 |
|
513 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
514 { |
|
515 |
|
516 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
517 |
|
518 if (IN_type_symbol == NULL) |
|
519 IN_type_symbol = last_type_symbol; |
|
520 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
521 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
522 function_type_prefix = return_type_symbol; |
|
523 break; |
|
524 |
|
525 } |
|
526 |
|
527 |
|
528 ERROR; |
|
529 } |
|
530 |
|
531 }/*function_real_to_byte*/ |
|
532 break; |
|
533 |
|
534 /**** |
|
535 *REAL_TO_USINT |
|
536 */ |
|
537 case function_real_to_usint : |
|
538 { |
|
539 symbol_c *last_type_symbol = NULL; |
|
540 |
|
541 { |
|
542 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
543 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
544 symbol_c *IN_param_value = &this->default_variable_name; |
|
545 |
|
546 symbol_c *IN_type_symbol = param_data_type; |
|
547 last_type_symbol = param_data_type; |
|
548 |
|
549 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
550 { |
|
551 |
|
552 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
553 |
|
554 if (IN_type_symbol == NULL) |
|
555 IN_type_symbol = last_type_symbol; |
|
556 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
557 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
558 function_type_prefix = return_type_symbol; |
|
559 break; |
|
560 |
|
561 } |
|
562 |
|
563 |
|
564 ERROR; |
|
565 } |
|
566 |
|
567 }/*function_real_to_usint*/ |
|
568 break; |
|
569 |
|
570 /**** |
|
571 *REAL_TO_ULINT |
|
572 */ |
|
573 case function_real_to_ulint : |
|
574 { |
|
575 symbol_c *last_type_symbol = NULL; |
|
576 |
|
577 { |
|
578 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
579 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
580 symbol_c *IN_param_value = &this->default_variable_name; |
|
581 |
|
582 symbol_c *IN_type_symbol = param_data_type; |
|
583 last_type_symbol = param_data_type; |
|
584 |
|
585 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
586 { |
|
587 |
|
588 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
589 |
|
590 if (IN_type_symbol == NULL) |
|
591 IN_type_symbol = last_type_symbol; |
|
592 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
593 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
594 function_type_prefix = return_type_symbol; |
|
595 break; |
|
596 |
|
597 } |
|
598 |
|
599 |
|
600 ERROR; |
|
601 } |
|
602 |
|
603 }/*function_real_to_ulint*/ |
|
604 break; |
|
605 |
|
606 /**** |
|
607 *REAL_TO_BOOL |
|
608 */ |
|
609 case function_real_to_bool : |
|
610 { |
|
611 symbol_c *last_type_symbol = NULL; |
|
612 |
|
613 { |
|
614 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
615 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
616 symbol_c *IN_param_value = &this->default_variable_name; |
|
617 |
|
618 symbol_c *IN_type_symbol = param_data_type; |
|
619 last_type_symbol = param_data_type; |
|
620 |
|
621 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
622 { |
|
623 |
|
624 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
625 |
|
626 if (IN_type_symbol == NULL) |
|
627 IN_type_symbol = last_type_symbol; |
|
628 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
629 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
630 function_type_prefix = return_type_symbol; |
|
631 break; |
|
632 |
|
633 } |
|
634 |
|
635 |
|
636 ERROR; |
|
637 } |
|
638 |
|
639 }/*function_real_to_bool*/ |
|
640 break; |
|
641 |
|
642 /**** |
|
643 *REAL_TO_TIME |
|
644 */ |
|
645 case function_real_to_time : |
|
646 { |
|
647 symbol_c *last_type_symbol = NULL; |
|
648 |
|
649 { |
|
650 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
652 symbol_c *IN_param_value = &this->default_variable_name; |
|
653 |
|
654 symbol_c *IN_type_symbol = param_data_type; |
|
655 last_type_symbol = param_data_type; |
|
656 |
|
657 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
658 { |
|
659 |
|
660 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
661 |
|
662 if (IN_type_symbol == NULL) |
|
663 IN_type_symbol = last_type_symbol; |
|
664 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
665 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
666 function_type_prefix = return_type_symbol; |
|
667 break; |
|
668 |
|
669 } |
|
670 |
|
671 |
|
672 ERROR; |
|
673 } |
|
674 |
|
675 }/*function_real_to_time*/ |
|
676 break; |
|
677 |
|
678 /**** |
|
679 *REAL_TO_INT |
|
680 */ |
|
681 case function_real_to_int : |
|
682 { |
|
683 symbol_c *last_type_symbol = NULL; |
|
684 |
|
685 { |
|
686 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
688 symbol_c *IN_param_value = &this->default_variable_name; |
|
689 |
|
690 symbol_c *IN_type_symbol = param_data_type; |
|
691 last_type_symbol = param_data_type; |
|
692 |
|
693 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
694 { |
|
695 |
|
696 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
697 |
|
698 if (IN_type_symbol == NULL) |
|
699 IN_type_symbol = last_type_symbol; |
|
700 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
701 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
702 function_type_prefix = return_type_symbol; |
|
703 break; |
|
704 |
|
705 } |
|
706 |
|
707 |
|
708 ERROR; |
|
709 } |
|
710 |
|
711 }/*function_real_to_int*/ |
|
712 break; |
|
713 |
|
714 /**** |
|
715 *SINT_TO_REAL |
|
716 */ |
|
717 case function_sint_to_real : |
|
718 { |
|
719 symbol_c *last_type_symbol = NULL; |
|
720 |
|
721 { |
|
722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
724 symbol_c *IN_param_value = &this->default_variable_name; |
|
725 |
|
726 symbol_c *IN_type_symbol = param_data_type; |
|
727 last_type_symbol = param_data_type; |
|
728 |
|
729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
730 { |
|
731 |
|
732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
733 |
|
734 if (IN_type_symbol == NULL) |
|
735 IN_type_symbol = last_type_symbol; |
|
736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
737 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
738 function_type_prefix = return_type_symbol; |
|
739 function_type_suffix = IN_type_symbol; |
|
740 break; |
|
741 |
|
742 } |
|
743 |
|
744 |
|
745 ERROR; |
|
746 } |
|
747 |
|
748 }/*function_sint_to_real*/ |
|
749 break; |
|
750 |
|
751 /**** |
|
752 *SINT_TO_LINT |
|
753 */ |
|
754 case function_sint_to_lint : |
|
755 { |
|
756 symbol_c *last_type_symbol = NULL; |
|
757 |
|
758 { |
|
759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
761 symbol_c *IN_param_value = &this->default_variable_name; |
|
762 |
|
763 symbol_c *IN_type_symbol = param_data_type; |
|
764 last_type_symbol = param_data_type; |
|
765 |
|
766 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
767 { |
|
768 |
|
769 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
770 |
|
771 if (IN_type_symbol == NULL) |
|
772 IN_type_symbol = last_type_symbol; |
|
773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
774 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
775 function_type_prefix = return_type_symbol; |
|
776 function_type_suffix = IN_type_symbol; |
|
777 break; |
|
778 |
|
779 } |
|
780 |
|
781 |
|
782 ERROR; |
|
783 } |
|
784 |
|
785 }/*function_sint_to_lint*/ |
|
786 break; |
|
787 |
|
788 /**** |
|
789 *SINT_TO_DINT |
|
790 */ |
|
791 case function_sint_to_dint : |
|
792 { |
|
793 symbol_c *last_type_symbol = NULL; |
|
794 |
|
795 { |
|
796 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
798 symbol_c *IN_param_value = &this->default_variable_name; |
|
799 |
|
800 symbol_c *IN_type_symbol = param_data_type; |
|
801 last_type_symbol = param_data_type; |
|
802 |
|
803 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
804 { |
|
805 |
|
806 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
807 |
|
808 if (IN_type_symbol == NULL) |
|
809 IN_type_symbol = last_type_symbol; |
|
810 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
811 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
812 function_type_prefix = return_type_symbol; |
|
813 function_type_suffix = IN_type_symbol; |
|
814 break; |
|
815 |
|
816 } |
|
817 |
|
818 |
|
819 ERROR; |
|
820 } |
|
821 |
|
822 }/*function_sint_to_dint*/ |
|
823 break; |
|
824 |
|
825 /**** |
|
826 *SINT_TO_DATE |
|
827 */ |
|
828 case function_sint_to_date : |
|
829 { |
|
830 symbol_c *last_type_symbol = NULL; |
|
831 |
|
832 { |
|
833 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
834 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
835 symbol_c *IN_param_value = &this->default_variable_name; |
|
836 |
|
837 symbol_c *IN_type_symbol = param_data_type; |
|
838 last_type_symbol = param_data_type; |
|
839 |
|
840 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
841 { |
|
842 |
|
843 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
844 |
|
845 if (IN_type_symbol == NULL) |
|
846 IN_type_symbol = last_type_symbol; |
|
847 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
848 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
849 function_type_prefix = return_type_symbol; |
|
850 break; |
|
851 |
|
852 } |
|
853 |
|
854 |
|
855 ERROR; |
|
856 } |
|
857 |
|
858 }/*function_sint_to_date*/ |
|
859 break; |
|
860 |
|
861 /**** |
|
862 *SINT_TO_DWORD |
|
863 */ |
|
864 case function_sint_to_dword : |
|
865 { |
|
866 symbol_c *last_type_symbol = NULL; |
|
867 |
|
868 { |
|
869 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
871 symbol_c *IN_param_value = &this->default_variable_name; |
|
872 |
|
873 symbol_c *IN_type_symbol = param_data_type; |
|
874 last_type_symbol = param_data_type; |
|
875 |
|
876 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
877 { |
|
878 |
|
879 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
880 |
|
881 if (IN_type_symbol == NULL) |
|
882 IN_type_symbol = last_type_symbol; |
|
883 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
884 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
885 function_type_prefix = return_type_symbol; |
|
886 function_type_suffix = IN_type_symbol; |
|
887 break; |
|
888 |
|
889 } |
|
890 |
|
891 |
|
892 ERROR; |
|
893 } |
|
894 |
|
895 }/*function_sint_to_dword*/ |
|
896 break; |
|
897 |
|
898 /**** |
|
899 *SINT_TO_DT |
|
900 */ |
|
901 case function_sint_to_dt : |
|
902 { |
|
903 symbol_c *last_type_symbol = NULL; |
|
904 |
|
905 { |
|
906 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
908 symbol_c *IN_param_value = &this->default_variable_name; |
|
909 |
|
910 symbol_c *IN_type_symbol = param_data_type; |
|
911 last_type_symbol = param_data_type; |
|
912 |
|
913 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
914 { |
|
915 |
|
916 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
917 |
|
918 if (IN_type_symbol == NULL) |
|
919 IN_type_symbol = last_type_symbol; |
|
920 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
921 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
922 function_type_prefix = return_type_symbol; |
|
923 break; |
|
924 |
|
925 } |
|
926 |
|
927 |
|
928 ERROR; |
|
929 } |
|
930 |
|
931 }/*function_sint_to_dt*/ |
|
932 break; |
|
933 |
|
934 /**** |
|
935 *SINT_TO_TOD |
|
936 */ |
|
937 case function_sint_to_tod : |
|
938 { |
|
939 symbol_c *last_type_symbol = NULL; |
|
940 |
|
941 { |
|
942 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
943 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
944 symbol_c *IN_param_value = &this->default_variable_name; |
|
945 |
|
946 symbol_c *IN_type_symbol = param_data_type; |
|
947 last_type_symbol = param_data_type; |
|
948 |
|
949 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
950 { |
|
951 |
|
952 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
953 |
|
954 if (IN_type_symbol == NULL) |
|
955 IN_type_symbol = last_type_symbol; |
|
956 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
957 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
958 function_type_prefix = return_type_symbol; |
|
959 break; |
|
960 |
|
961 } |
|
962 |
|
963 |
|
964 ERROR; |
|
965 } |
|
966 |
|
967 }/*function_sint_to_tod*/ |
|
968 break; |
|
969 |
|
970 /**** |
|
971 *SINT_TO_UDINT |
|
972 */ |
|
973 case function_sint_to_udint : |
|
974 { |
|
975 symbol_c *last_type_symbol = NULL; |
|
976 |
|
977 { |
|
978 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
979 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
980 symbol_c *IN_param_value = &this->default_variable_name; |
|
981 |
|
982 symbol_c *IN_type_symbol = param_data_type; |
|
983 last_type_symbol = param_data_type; |
|
984 |
|
985 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
986 { |
|
987 |
|
988 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
989 |
|
990 if (IN_type_symbol == NULL) |
|
991 IN_type_symbol = last_type_symbol; |
|
992 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
993 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
994 function_type_prefix = return_type_symbol; |
|
995 function_type_suffix = IN_type_symbol; |
|
996 break; |
|
997 |
|
998 } |
|
999 |
|
1000 |
|
1001 ERROR; |
|
1002 } |
|
1003 |
|
1004 }/*function_sint_to_udint*/ |
|
1005 break; |
|
1006 |
|
1007 /**** |
|
1008 *SINT_TO_WORD |
|
1009 */ |
|
1010 case function_sint_to_word : |
|
1011 { |
|
1012 symbol_c *last_type_symbol = NULL; |
|
1013 |
|
1014 { |
|
1015 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1016 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1017 symbol_c *IN_param_value = &this->default_variable_name; |
|
1018 |
|
1019 symbol_c *IN_type_symbol = param_data_type; |
|
1020 last_type_symbol = param_data_type; |
|
1021 |
|
1022 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1023 { |
|
1024 |
|
1025 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1026 |
|
1027 if (IN_type_symbol == NULL) |
|
1028 IN_type_symbol = last_type_symbol; |
|
1029 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1030 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1031 function_type_prefix = return_type_symbol; |
|
1032 function_type_suffix = IN_type_symbol; |
|
1033 break; |
|
1034 |
|
1035 } |
|
1036 |
|
1037 |
|
1038 ERROR; |
|
1039 } |
|
1040 |
|
1041 }/*function_sint_to_word*/ |
|
1042 break; |
|
1043 |
|
1044 /**** |
|
1045 *SINT_TO_STRING |
|
1046 */ |
|
1047 case function_sint_to_string : |
|
1048 { |
|
1049 symbol_c *last_type_symbol = NULL; |
|
1050 |
|
1051 { |
|
1052 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1053 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1054 symbol_c *IN_param_value = &this->default_variable_name; |
|
1055 |
|
1056 symbol_c *IN_type_symbol = param_data_type; |
|
1057 last_type_symbol = param_data_type; |
|
1058 |
|
1059 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1060 { |
|
1061 |
|
1062 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1063 |
|
1064 if (IN_type_symbol == NULL) |
|
1065 IN_type_symbol = last_type_symbol; |
|
1066 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1067 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1068 function_type_prefix = return_type_symbol; |
|
1069 break; |
|
1070 |
|
1071 } |
|
1072 |
|
1073 |
|
1074 ERROR; |
|
1075 } |
|
1076 |
|
1077 }/*function_sint_to_string*/ |
|
1078 break; |
|
1079 |
|
1080 /**** |
|
1081 *SINT_TO_LWORD |
|
1082 */ |
|
1083 case function_sint_to_lword : |
|
1084 { |
|
1085 symbol_c *last_type_symbol = NULL; |
|
1086 |
|
1087 { |
|
1088 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1089 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1090 symbol_c *IN_param_value = &this->default_variable_name; |
|
1091 |
|
1092 symbol_c *IN_type_symbol = param_data_type; |
|
1093 last_type_symbol = param_data_type; |
|
1094 |
|
1095 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1096 { |
|
1097 |
|
1098 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1099 |
|
1100 if (IN_type_symbol == NULL) |
|
1101 IN_type_symbol = last_type_symbol; |
|
1102 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1103 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1104 function_type_prefix = return_type_symbol; |
|
1105 function_type_suffix = IN_type_symbol; |
|
1106 break; |
|
1107 |
|
1108 } |
|
1109 |
|
1110 |
|
1111 ERROR; |
|
1112 } |
|
1113 |
|
1114 }/*function_sint_to_lword*/ |
|
1115 break; |
|
1116 |
|
1117 /**** |
|
1118 *SINT_TO_UINT |
|
1119 */ |
|
1120 case function_sint_to_uint : |
|
1121 { |
|
1122 symbol_c *last_type_symbol = NULL; |
|
1123 |
|
1124 { |
|
1125 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1127 symbol_c *IN_param_value = &this->default_variable_name; |
|
1128 |
|
1129 symbol_c *IN_type_symbol = param_data_type; |
|
1130 last_type_symbol = param_data_type; |
|
1131 |
|
1132 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1133 { |
|
1134 |
|
1135 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1136 |
|
1137 if (IN_type_symbol == NULL) |
|
1138 IN_type_symbol = last_type_symbol; |
|
1139 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1140 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1141 function_type_prefix = return_type_symbol; |
|
1142 function_type_suffix = IN_type_symbol; |
|
1143 break; |
|
1144 |
|
1145 } |
|
1146 |
|
1147 |
|
1148 ERROR; |
|
1149 } |
|
1150 |
|
1151 }/*function_sint_to_uint*/ |
|
1152 break; |
|
1153 |
|
1154 /**** |
|
1155 *SINT_TO_LREAL |
|
1156 */ |
|
1157 case function_sint_to_lreal : |
|
1158 { |
|
1159 symbol_c *last_type_symbol = NULL; |
|
1160 |
|
1161 { |
|
1162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1164 symbol_c *IN_param_value = &this->default_variable_name; |
|
1165 |
|
1166 symbol_c *IN_type_symbol = param_data_type; |
|
1167 last_type_symbol = param_data_type; |
|
1168 |
|
1169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1170 { |
|
1171 |
|
1172 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1173 |
|
1174 if (IN_type_symbol == NULL) |
|
1175 IN_type_symbol = last_type_symbol; |
|
1176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1177 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1178 function_type_prefix = return_type_symbol; |
|
1179 function_type_suffix = IN_type_symbol; |
|
1180 break; |
|
1181 |
|
1182 } |
|
1183 |
|
1184 |
|
1185 ERROR; |
|
1186 } |
|
1187 |
|
1188 }/*function_sint_to_lreal*/ |
|
1189 break; |
|
1190 |
|
1191 /**** |
|
1192 *SINT_TO_BYTE |
|
1193 */ |
|
1194 case function_sint_to_byte : |
|
1195 { |
|
1196 symbol_c *last_type_symbol = NULL; |
|
1197 |
|
1198 { |
|
1199 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1201 symbol_c *IN_param_value = &this->default_variable_name; |
|
1202 |
|
1203 symbol_c *IN_type_symbol = param_data_type; |
|
1204 last_type_symbol = param_data_type; |
|
1205 |
|
1206 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1207 { |
|
1208 |
|
1209 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1210 |
|
1211 if (IN_type_symbol == NULL) |
|
1212 IN_type_symbol = last_type_symbol; |
|
1213 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1214 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1215 function_type_prefix = return_type_symbol; |
|
1216 function_type_suffix = IN_type_symbol; |
|
1217 break; |
|
1218 |
|
1219 } |
|
1220 |
|
1221 |
|
1222 ERROR; |
|
1223 } |
|
1224 |
|
1225 }/*function_sint_to_byte*/ |
|
1226 break; |
|
1227 |
|
1228 /**** |
|
1229 *SINT_TO_USINT |
|
1230 */ |
|
1231 case function_sint_to_usint : |
|
1232 { |
|
1233 symbol_c *last_type_symbol = NULL; |
|
1234 |
|
1235 { |
|
1236 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1237 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1238 symbol_c *IN_param_value = &this->default_variable_name; |
|
1239 |
|
1240 symbol_c *IN_type_symbol = param_data_type; |
|
1241 last_type_symbol = param_data_type; |
|
1242 |
|
1243 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1244 { |
|
1245 |
|
1246 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1247 |
|
1248 if (IN_type_symbol == NULL) |
|
1249 IN_type_symbol = last_type_symbol; |
|
1250 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1251 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1252 function_type_prefix = return_type_symbol; |
|
1253 function_type_suffix = IN_type_symbol; |
|
1254 break; |
|
1255 |
|
1256 } |
|
1257 |
|
1258 |
|
1259 ERROR; |
|
1260 } |
|
1261 |
|
1262 }/*function_sint_to_usint*/ |
|
1263 break; |
|
1264 |
|
1265 /**** |
|
1266 *SINT_TO_ULINT |
|
1267 */ |
|
1268 case function_sint_to_ulint : |
|
1269 { |
|
1270 symbol_c *last_type_symbol = NULL; |
|
1271 |
|
1272 { |
|
1273 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1274 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1275 symbol_c *IN_param_value = &this->default_variable_name; |
|
1276 |
|
1277 symbol_c *IN_type_symbol = param_data_type; |
|
1278 last_type_symbol = param_data_type; |
|
1279 |
|
1280 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1281 { |
|
1282 |
|
1283 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1284 |
|
1285 if (IN_type_symbol == NULL) |
|
1286 IN_type_symbol = last_type_symbol; |
|
1287 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1288 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1289 function_type_prefix = return_type_symbol; |
|
1290 function_type_suffix = IN_type_symbol; |
|
1291 break; |
|
1292 |
|
1293 } |
|
1294 |
|
1295 |
|
1296 ERROR; |
|
1297 } |
|
1298 |
|
1299 }/*function_sint_to_ulint*/ |
|
1300 break; |
|
1301 |
|
1302 /**** |
|
1303 *SINT_TO_BOOL |
|
1304 */ |
|
1305 case function_sint_to_bool : |
|
1306 { |
|
1307 symbol_c *last_type_symbol = NULL; |
|
1308 |
|
1309 { |
|
1310 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1312 symbol_c *IN_param_value = &this->default_variable_name; |
|
1313 |
|
1314 symbol_c *IN_type_symbol = param_data_type; |
|
1315 last_type_symbol = param_data_type; |
|
1316 |
|
1317 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1318 { |
|
1319 |
|
1320 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1321 |
|
1322 if (IN_type_symbol == NULL) |
|
1323 IN_type_symbol = last_type_symbol; |
|
1324 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1325 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1326 function_type_prefix = return_type_symbol; |
|
1327 function_type_suffix = IN_type_symbol; |
|
1328 break; |
|
1329 |
|
1330 } |
|
1331 |
|
1332 |
|
1333 ERROR; |
|
1334 } |
|
1335 |
|
1336 }/*function_sint_to_bool*/ |
|
1337 break; |
|
1338 |
|
1339 /**** |
|
1340 *SINT_TO_TIME |
|
1341 */ |
|
1342 case function_sint_to_time : |
|
1343 { |
|
1344 symbol_c *last_type_symbol = NULL; |
|
1345 |
|
1346 { |
|
1347 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1348 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1349 symbol_c *IN_param_value = &this->default_variable_name; |
|
1350 |
|
1351 symbol_c *IN_type_symbol = param_data_type; |
|
1352 last_type_symbol = param_data_type; |
|
1353 |
|
1354 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1355 { |
|
1356 |
|
1357 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1358 |
|
1359 if (IN_type_symbol == NULL) |
|
1360 IN_type_symbol = last_type_symbol; |
|
1361 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1362 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1363 function_type_prefix = return_type_symbol; |
|
1364 break; |
|
1365 |
|
1366 } |
|
1367 |
|
1368 |
|
1369 ERROR; |
|
1370 } |
|
1371 |
|
1372 }/*function_sint_to_time*/ |
|
1373 break; |
|
1374 |
|
1375 /**** |
|
1376 *SINT_TO_INT |
|
1377 */ |
|
1378 case function_sint_to_int : |
|
1379 { |
|
1380 symbol_c *last_type_symbol = NULL; |
|
1381 |
|
1382 { |
|
1383 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1384 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1385 symbol_c *IN_param_value = &this->default_variable_name; |
|
1386 |
|
1387 symbol_c *IN_type_symbol = param_data_type; |
|
1388 last_type_symbol = param_data_type; |
|
1389 |
|
1390 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1391 { |
|
1392 |
|
1393 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1394 |
|
1395 if (IN_type_symbol == NULL) |
|
1396 IN_type_symbol = last_type_symbol; |
|
1397 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1398 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
1399 function_type_prefix = return_type_symbol; |
|
1400 function_type_suffix = IN_type_symbol; |
|
1401 break; |
|
1402 |
|
1403 } |
|
1404 |
|
1405 |
|
1406 ERROR; |
|
1407 } |
|
1408 |
|
1409 }/*function_sint_to_int*/ |
|
1410 break; |
|
1411 |
|
1412 /**** |
|
1413 *LINT_TO_REAL |
|
1414 */ |
|
1415 case function_lint_to_real : |
|
1416 { |
|
1417 symbol_c *last_type_symbol = NULL; |
|
1418 |
|
1419 { |
|
1420 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1422 symbol_c *IN_param_value = &this->default_variable_name; |
|
1423 |
|
1424 symbol_c *IN_type_symbol = param_data_type; |
|
1425 last_type_symbol = param_data_type; |
|
1426 |
|
1427 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1428 { |
|
1429 |
|
1430 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1431 |
|
1432 if (IN_type_symbol == NULL) |
|
1433 IN_type_symbol = last_type_symbol; |
|
1434 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1435 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
1436 function_type_prefix = return_type_symbol; |
|
1437 function_type_suffix = IN_type_symbol; |
|
1438 break; |
|
1439 |
|
1440 } |
|
1441 |
|
1442 |
|
1443 ERROR; |
|
1444 } |
|
1445 |
|
1446 }/*function_lint_to_real*/ |
|
1447 break; |
|
1448 |
|
1449 /**** |
|
1450 *LINT_TO_SINT |
|
1451 */ |
|
1452 case function_lint_to_sint : |
|
1453 { |
|
1454 symbol_c *last_type_symbol = NULL; |
|
1455 |
|
1456 { |
|
1457 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1459 symbol_c *IN_param_value = &this->default_variable_name; |
|
1460 |
|
1461 symbol_c *IN_type_symbol = param_data_type; |
|
1462 last_type_symbol = param_data_type; |
|
1463 |
|
1464 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1465 { |
|
1466 |
|
1467 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1468 |
|
1469 if (IN_type_symbol == NULL) |
|
1470 IN_type_symbol = last_type_symbol; |
|
1471 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1472 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1473 function_type_prefix = return_type_symbol; |
|
1474 function_type_suffix = IN_type_symbol; |
|
1475 break; |
|
1476 |
|
1477 } |
|
1478 |
|
1479 |
|
1480 ERROR; |
|
1481 } |
|
1482 |
|
1483 }/*function_lint_to_sint*/ |
|
1484 break; |
|
1485 |
|
1486 /**** |
|
1487 *LINT_TO_DINT |
|
1488 */ |
|
1489 case function_lint_to_dint : |
|
1490 { |
|
1491 symbol_c *last_type_symbol = NULL; |
|
1492 |
|
1493 { |
|
1494 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1495 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1496 symbol_c *IN_param_value = &this->default_variable_name; |
|
1497 |
|
1498 symbol_c *IN_type_symbol = param_data_type; |
|
1499 last_type_symbol = param_data_type; |
|
1500 |
|
1501 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1502 { |
|
1503 |
|
1504 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1505 |
|
1506 if (IN_type_symbol == NULL) |
|
1507 IN_type_symbol = last_type_symbol; |
|
1508 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1509 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
1510 function_type_prefix = return_type_symbol; |
|
1511 function_type_suffix = IN_type_symbol; |
|
1512 break; |
|
1513 |
|
1514 } |
|
1515 |
|
1516 |
|
1517 ERROR; |
|
1518 } |
|
1519 |
|
1520 }/*function_lint_to_dint*/ |
|
1521 break; |
|
1522 |
|
1523 /**** |
|
1524 *LINT_TO_DATE |
|
1525 */ |
|
1526 case function_lint_to_date : |
|
1527 { |
|
1528 symbol_c *last_type_symbol = NULL; |
|
1529 |
|
1530 { |
|
1531 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1532 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1533 symbol_c *IN_param_value = &this->default_variable_name; |
|
1534 |
|
1535 symbol_c *IN_type_symbol = param_data_type; |
|
1536 last_type_symbol = param_data_type; |
|
1537 |
|
1538 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1539 { |
|
1540 |
|
1541 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1542 |
|
1543 if (IN_type_symbol == NULL) |
|
1544 IN_type_symbol = last_type_symbol; |
|
1545 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1546 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1547 function_type_prefix = return_type_symbol; |
|
1548 break; |
|
1549 |
|
1550 } |
|
1551 |
|
1552 |
|
1553 ERROR; |
|
1554 } |
|
1555 |
|
1556 }/*function_lint_to_date*/ |
|
1557 break; |
|
1558 |
|
1559 /**** |
|
1560 *LINT_TO_DWORD |
|
1561 */ |
|
1562 case function_lint_to_dword : |
|
1563 { |
|
1564 symbol_c *last_type_symbol = NULL; |
|
1565 |
|
1566 { |
|
1567 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1568 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1569 symbol_c *IN_param_value = &this->default_variable_name; |
|
1570 |
|
1571 symbol_c *IN_type_symbol = param_data_type; |
|
1572 last_type_symbol = param_data_type; |
|
1573 |
|
1574 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1575 { |
|
1576 |
|
1577 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1578 |
|
1579 if (IN_type_symbol == NULL) |
|
1580 IN_type_symbol = last_type_symbol; |
|
1581 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1582 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1583 function_type_prefix = return_type_symbol; |
|
1584 function_type_suffix = IN_type_symbol; |
|
1585 break; |
|
1586 |
|
1587 } |
|
1588 |
|
1589 |
|
1590 ERROR; |
|
1591 } |
|
1592 |
|
1593 }/*function_lint_to_dword*/ |
|
1594 break; |
|
1595 |
|
1596 /**** |
|
1597 *LINT_TO_DT |
|
1598 */ |
|
1599 case function_lint_to_dt : |
|
1600 { |
|
1601 symbol_c *last_type_symbol = NULL; |
|
1602 |
|
1603 { |
|
1604 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1605 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1606 symbol_c *IN_param_value = &this->default_variable_name; |
|
1607 |
|
1608 symbol_c *IN_type_symbol = param_data_type; |
|
1609 last_type_symbol = param_data_type; |
|
1610 |
|
1611 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1612 { |
|
1613 |
|
1614 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1615 |
|
1616 if (IN_type_symbol == NULL) |
|
1617 IN_type_symbol = last_type_symbol; |
|
1618 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1619 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1620 function_type_prefix = return_type_symbol; |
|
1621 break; |
|
1622 |
|
1623 } |
|
1624 |
|
1625 |
|
1626 ERROR; |
|
1627 } |
|
1628 |
|
1629 }/*function_lint_to_dt*/ |
|
1630 break; |
|
1631 |
|
1632 /**** |
|
1633 *LINT_TO_TOD |
|
1634 */ |
|
1635 case function_lint_to_tod : |
|
1636 { |
|
1637 symbol_c *last_type_symbol = NULL; |
|
1638 |
|
1639 { |
|
1640 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1642 symbol_c *IN_param_value = &this->default_variable_name; |
|
1643 |
|
1644 symbol_c *IN_type_symbol = param_data_type; |
|
1645 last_type_symbol = param_data_type; |
|
1646 |
|
1647 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1648 { |
|
1649 |
|
1650 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1651 |
|
1652 if (IN_type_symbol == NULL) |
|
1653 IN_type_symbol = last_type_symbol; |
|
1654 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1655 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1656 function_type_prefix = return_type_symbol; |
|
1657 break; |
|
1658 |
|
1659 } |
|
1660 |
|
1661 |
|
1662 ERROR; |
|
1663 } |
|
1664 |
|
1665 }/*function_lint_to_tod*/ |
|
1666 break; |
|
1667 |
|
1668 /**** |
|
1669 *LINT_TO_UDINT |
|
1670 */ |
|
1671 case function_lint_to_udint : |
|
1672 { |
|
1673 symbol_c *last_type_symbol = NULL; |
|
1674 |
|
1675 { |
|
1676 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1677 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1678 symbol_c *IN_param_value = &this->default_variable_name; |
|
1679 |
|
1680 symbol_c *IN_type_symbol = param_data_type; |
|
1681 last_type_symbol = param_data_type; |
|
1682 |
|
1683 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1684 { |
|
1685 |
|
1686 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1687 |
|
1688 if (IN_type_symbol == NULL) |
|
1689 IN_type_symbol = last_type_symbol; |
|
1690 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1691 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
1692 function_type_prefix = return_type_symbol; |
|
1693 function_type_suffix = IN_type_symbol; |
|
1694 break; |
|
1695 |
|
1696 } |
|
1697 |
|
1698 |
|
1699 ERROR; |
|
1700 } |
|
1701 |
|
1702 }/*function_lint_to_udint*/ |
|
1703 break; |
|
1704 |
|
1705 /**** |
|
1706 *LINT_TO_WORD |
|
1707 */ |
|
1708 case function_lint_to_word : |
|
1709 { |
|
1710 symbol_c *last_type_symbol = NULL; |
|
1711 |
|
1712 { |
|
1713 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1714 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1715 symbol_c *IN_param_value = &this->default_variable_name; |
|
1716 |
|
1717 symbol_c *IN_type_symbol = param_data_type; |
|
1718 last_type_symbol = param_data_type; |
|
1719 |
|
1720 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1721 { |
|
1722 |
|
1723 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1724 |
|
1725 if (IN_type_symbol == NULL) |
|
1726 IN_type_symbol = last_type_symbol; |
|
1727 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1728 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1729 function_type_prefix = return_type_symbol; |
|
1730 function_type_suffix = IN_type_symbol; |
|
1731 break; |
|
1732 |
|
1733 } |
|
1734 |
|
1735 |
|
1736 ERROR; |
|
1737 } |
|
1738 |
|
1739 }/*function_lint_to_word*/ |
|
1740 break; |
|
1741 |
|
1742 /**** |
|
1743 *LINT_TO_STRING |
|
1744 */ |
|
1745 case function_lint_to_string : |
|
1746 { |
|
1747 symbol_c *last_type_symbol = NULL; |
|
1748 |
|
1749 { |
|
1750 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1751 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1752 symbol_c *IN_param_value = &this->default_variable_name; |
|
1753 |
|
1754 symbol_c *IN_type_symbol = param_data_type; |
|
1755 last_type_symbol = param_data_type; |
|
1756 |
|
1757 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1758 { |
|
1759 |
|
1760 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1761 |
|
1762 if (IN_type_symbol == NULL) |
|
1763 IN_type_symbol = last_type_symbol; |
|
1764 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1765 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1766 function_type_prefix = return_type_symbol; |
|
1767 break; |
|
1768 |
|
1769 } |
|
1770 |
|
1771 |
|
1772 ERROR; |
|
1773 } |
|
1774 |
|
1775 }/*function_lint_to_string*/ |
|
1776 break; |
|
1777 |
|
1778 /**** |
|
1779 *LINT_TO_LWORD |
|
1780 */ |
|
1781 case function_lint_to_lword : |
|
1782 { |
|
1783 symbol_c *last_type_symbol = NULL; |
|
1784 |
|
1785 { |
|
1786 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1787 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1788 symbol_c *IN_param_value = &this->default_variable_name; |
|
1789 |
|
1790 symbol_c *IN_type_symbol = param_data_type; |
|
1791 last_type_symbol = param_data_type; |
|
1792 |
|
1793 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1794 { |
|
1795 |
|
1796 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1797 |
|
1798 if (IN_type_symbol == NULL) |
|
1799 IN_type_symbol = last_type_symbol; |
|
1800 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1801 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1802 function_type_prefix = return_type_symbol; |
|
1803 function_type_suffix = IN_type_symbol; |
|
1804 break; |
|
1805 |
|
1806 } |
|
1807 |
|
1808 |
|
1809 ERROR; |
|
1810 } |
|
1811 |
|
1812 }/*function_lint_to_lword*/ |
|
1813 break; |
|
1814 |
|
1815 /**** |
|
1816 *LINT_TO_UINT |
|
1817 */ |
|
1818 case function_lint_to_uint : |
|
1819 { |
|
1820 symbol_c *last_type_symbol = NULL; |
|
1821 |
|
1822 { |
|
1823 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1824 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1825 symbol_c *IN_param_value = &this->default_variable_name; |
|
1826 |
|
1827 symbol_c *IN_type_symbol = param_data_type; |
|
1828 last_type_symbol = param_data_type; |
|
1829 |
|
1830 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1831 { |
|
1832 |
|
1833 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1834 |
|
1835 if (IN_type_symbol == NULL) |
|
1836 IN_type_symbol = last_type_symbol; |
|
1837 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1838 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1839 function_type_prefix = return_type_symbol; |
|
1840 function_type_suffix = IN_type_symbol; |
|
1841 break; |
|
1842 |
|
1843 } |
|
1844 |
|
1845 |
|
1846 ERROR; |
|
1847 } |
|
1848 |
|
1849 }/*function_lint_to_uint*/ |
|
1850 break; |
|
1851 |
|
1852 /**** |
|
1853 *LINT_TO_LREAL |
|
1854 */ |
|
1855 case function_lint_to_lreal : |
|
1856 { |
|
1857 symbol_c *last_type_symbol = NULL; |
|
1858 |
|
1859 { |
|
1860 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1861 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1862 symbol_c *IN_param_value = &this->default_variable_name; |
|
1863 |
|
1864 symbol_c *IN_type_symbol = param_data_type; |
|
1865 last_type_symbol = param_data_type; |
|
1866 |
|
1867 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1868 { |
|
1869 |
|
1870 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1871 |
|
1872 if (IN_type_symbol == NULL) |
|
1873 IN_type_symbol = last_type_symbol; |
|
1874 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1875 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1876 function_type_prefix = return_type_symbol; |
|
1877 function_type_suffix = IN_type_symbol; |
|
1878 break; |
|
1879 |
|
1880 } |
|
1881 |
|
1882 |
|
1883 ERROR; |
|
1884 } |
|
1885 |
|
1886 }/*function_lint_to_lreal*/ |
|
1887 break; |
|
1888 |
|
1889 /**** |
|
1890 *LINT_TO_BYTE |
|
1891 */ |
|
1892 case function_lint_to_byte : |
|
1893 { |
|
1894 symbol_c *last_type_symbol = NULL; |
|
1895 |
|
1896 { |
|
1897 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1898 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1899 symbol_c *IN_param_value = &this->default_variable_name; |
|
1900 |
|
1901 symbol_c *IN_type_symbol = param_data_type; |
|
1902 last_type_symbol = param_data_type; |
|
1903 |
|
1904 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1905 { |
|
1906 |
|
1907 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1908 |
|
1909 if (IN_type_symbol == NULL) |
|
1910 IN_type_symbol = last_type_symbol; |
|
1911 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1912 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1913 function_type_prefix = return_type_symbol; |
|
1914 function_type_suffix = IN_type_symbol; |
|
1915 break; |
|
1916 |
|
1917 } |
|
1918 |
|
1919 |
|
1920 ERROR; |
|
1921 } |
|
1922 |
|
1923 }/*function_lint_to_byte*/ |
|
1924 break; |
|
1925 |
|
1926 /**** |
|
1927 *LINT_TO_USINT |
|
1928 */ |
|
1929 case function_lint_to_usint : |
|
1930 { |
|
1931 symbol_c *last_type_symbol = NULL; |
|
1932 |
|
1933 { |
|
1934 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1935 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1936 symbol_c *IN_param_value = &this->default_variable_name; |
|
1937 |
|
1938 symbol_c *IN_type_symbol = param_data_type; |
|
1939 last_type_symbol = param_data_type; |
|
1940 |
|
1941 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1942 { |
|
1943 |
|
1944 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1945 |
|
1946 if (IN_type_symbol == NULL) |
|
1947 IN_type_symbol = last_type_symbol; |
|
1948 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1949 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1950 function_type_prefix = return_type_symbol; |
|
1951 function_type_suffix = IN_type_symbol; |
|
1952 break; |
|
1953 |
|
1954 } |
|
1955 |
|
1956 |
|
1957 ERROR; |
|
1958 } |
|
1959 |
|
1960 }/*function_lint_to_usint*/ |
|
1961 break; |
|
1962 |
|
1963 /**** |
|
1964 *LINT_TO_ULINT |
|
1965 */ |
|
1966 case function_lint_to_ulint : |
|
1967 { |
|
1968 symbol_c *last_type_symbol = NULL; |
|
1969 |
|
1970 { |
|
1971 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
1972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1973 symbol_c *IN_param_value = &this->default_variable_name; |
|
1974 |
|
1975 symbol_c *IN_type_symbol = param_data_type; |
|
1976 last_type_symbol = param_data_type; |
|
1977 |
|
1978 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1979 { |
|
1980 |
|
1981 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
1982 |
|
1983 if (IN_type_symbol == NULL) |
|
1984 IN_type_symbol = last_type_symbol; |
|
1985 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1986 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1987 function_type_prefix = return_type_symbol; |
|
1988 function_type_suffix = IN_type_symbol; |
|
1989 break; |
|
1990 |
|
1991 } |
|
1992 |
|
1993 |
|
1994 ERROR; |
|
1995 } |
|
1996 |
|
1997 }/*function_lint_to_ulint*/ |
|
1998 break; |
|
1999 |
|
2000 /**** |
|
2001 *LINT_TO_BOOL |
|
2002 */ |
|
2003 case function_lint_to_bool : |
|
2004 { |
|
2005 symbol_c *last_type_symbol = NULL; |
|
2006 |
|
2007 { |
|
2008 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2009 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2010 symbol_c *IN_param_value = &this->default_variable_name; |
|
2011 |
|
2012 symbol_c *IN_type_symbol = param_data_type; |
|
2013 last_type_symbol = param_data_type; |
|
2014 |
|
2015 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2016 { |
|
2017 |
|
2018 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2019 |
|
2020 if (IN_type_symbol == NULL) |
|
2021 IN_type_symbol = last_type_symbol; |
|
2022 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2023 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2024 function_type_prefix = return_type_symbol; |
|
2025 function_type_suffix = IN_type_symbol; |
|
2026 break; |
|
2027 |
|
2028 } |
|
2029 |
|
2030 |
|
2031 ERROR; |
|
2032 } |
|
2033 |
|
2034 }/*function_lint_to_bool*/ |
|
2035 break; |
|
2036 |
|
2037 /**** |
|
2038 *LINT_TO_TIME |
|
2039 */ |
|
2040 case function_lint_to_time : |
|
2041 { |
|
2042 symbol_c *last_type_symbol = NULL; |
|
2043 |
|
2044 { |
|
2045 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2046 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2047 symbol_c *IN_param_value = &this->default_variable_name; |
|
2048 |
|
2049 symbol_c *IN_type_symbol = param_data_type; |
|
2050 last_type_symbol = param_data_type; |
|
2051 |
|
2052 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2053 { |
|
2054 |
|
2055 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2056 |
|
2057 if (IN_type_symbol == NULL) |
|
2058 IN_type_symbol = last_type_symbol; |
|
2059 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2060 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2061 function_type_prefix = return_type_symbol; |
|
2062 break; |
|
2063 |
|
2064 } |
|
2065 |
|
2066 |
|
2067 ERROR; |
|
2068 } |
|
2069 |
|
2070 }/*function_lint_to_time*/ |
|
2071 break; |
|
2072 |
|
2073 /**** |
|
2074 *LINT_TO_INT |
|
2075 */ |
|
2076 case function_lint_to_int : |
|
2077 { |
|
2078 symbol_c *last_type_symbol = NULL; |
|
2079 |
|
2080 { |
|
2081 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2083 symbol_c *IN_param_value = &this->default_variable_name; |
|
2084 |
|
2085 symbol_c *IN_type_symbol = param_data_type; |
|
2086 last_type_symbol = param_data_type; |
|
2087 |
|
2088 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2089 { |
|
2090 |
|
2091 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2092 |
|
2093 if (IN_type_symbol == NULL) |
|
2094 IN_type_symbol = last_type_symbol; |
|
2095 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2096 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2097 function_type_prefix = return_type_symbol; |
|
2098 function_type_suffix = IN_type_symbol; |
|
2099 break; |
|
2100 |
|
2101 } |
|
2102 |
|
2103 |
|
2104 ERROR; |
|
2105 } |
|
2106 |
|
2107 }/*function_lint_to_int*/ |
|
2108 break; |
|
2109 |
|
2110 /**** |
|
2111 *DINT_TO_REAL |
|
2112 */ |
|
2113 case function_dint_to_real : |
|
2114 { |
|
2115 symbol_c *last_type_symbol = NULL; |
|
2116 |
|
2117 { |
|
2118 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2119 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2120 symbol_c *IN_param_value = &this->default_variable_name; |
|
2121 |
|
2122 symbol_c *IN_type_symbol = param_data_type; |
|
2123 last_type_symbol = param_data_type; |
|
2124 |
|
2125 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2126 { |
|
2127 |
|
2128 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2129 |
|
2130 if (IN_type_symbol == NULL) |
|
2131 IN_type_symbol = last_type_symbol; |
|
2132 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2133 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2134 function_type_prefix = return_type_symbol; |
|
2135 function_type_suffix = IN_type_symbol; |
|
2136 break; |
|
2137 |
|
2138 } |
|
2139 |
|
2140 |
|
2141 ERROR; |
|
2142 } |
|
2143 |
|
2144 }/*function_dint_to_real*/ |
|
2145 break; |
|
2146 |
|
2147 /**** |
|
2148 *DINT_TO_SINT |
|
2149 */ |
|
2150 case function_dint_to_sint : |
|
2151 { |
|
2152 symbol_c *last_type_symbol = NULL; |
|
2153 |
|
2154 { |
|
2155 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2156 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2157 symbol_c *IN_param_value = &this->default_variable_name; |
|
2158 |
|
2159 symbol_c *IN_type_symbol = param_data_type; |
|
2160 last_type_symbol = param_data_type; |
|
2161 |
|
2162 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2163 { |
|
2164 |
|
2165 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2166 |
|
2167 if (IN_type_symbol == NULL) |
|
2168 IN_type_symbol = last_type_symbol; |
|
2169 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2170 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2171 function_type_prefix = return_type_symbol; |
|
2172 function_type_suffix = IN_type_symbol; |
|
2173 break; |
|
2174 |
|
2175 } |
|
2176 |
|
2177 |
|
2178 ERROR; |
|
2179 } |
|
2180 |
|
2181 }/*function_dint_to_sint*/ |
|
2182 break; |
|
2183 |
|
2184 /**** |
|
2185 *DINT_TO_LINT |
|
2186 */ |
|
2187 case function_dint_to_lint : |
|
2188 { |
|
2189 symbol_c *last_type_symbol = NULL; |
|
2190 |
|
2191 { |
|
2192 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2193 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2194 symbol_c *IN_param_value = &this->default_variable_name; |
|
2195 |
|
2196 symbol_c *IN_type_symbol = param_data_type; |
|
2197 last_type_symbol = param_data_type; |
|
2198 |
|
2199 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2200 { |
|
2201 |
|
2202 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2203 |
|
2204 if (IN_type_symbol == NULL) |
|
2205 IN_type_symbol = last_type_symbol; |
|
2206 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2207 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2208 function_type_prefix = return_type_symbol; |
|
2209 function_type_suffix = IN_type_symbol; |
|
2210 break; |
|
2211 |
|
2212 } |
|
2213 |
|
2214 |
|
2215 ERROR; |
|
2216 } |
|
2217 |
|
2218 }/*function_dint_to_lint*/ |
|
2219 break; |
|
2220 |
|
2221 /**** |
|
2222 *DINT_TO_DATE |
|
2223 */ |
|
2224 case function_dint_to_date : |
|
2225 { |
|
2226 symbol_c *last_type_symbol = NULL; |
|
2227 |
|
2228 { |
|
2229 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2231 symbol_c *IN_param_value = &this->default_variable_name; |
|
2232 |
|
2233 symbol_c *IN_type_symbol = param_data_type; |
|
2234 last_type_symbol = param_data_type; |
|
2235 |
|
2236 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2237 { |
|
2238 |
|
2239 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2240 |
|
2241 if (IN_type_symbol == NULL) |
|
2242 IN_type_symbol = last_type_symbol; |
|
2243 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2244 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
2245 function_type_prefix = return_type_symbol; |
|
2246 break; |
|
2247 |
|
2248 } |
|
2249 |
|
2250 |
|
2251 ERROR; |
|
2252 } |
|
2253 |
|
2254 }/*function_dint_to_date*/ |
|
2255 break; |
|
2256 |
|
2257 /**** |
|
2258 *DINT_TO_DWORD |
|
2259 */ |
|
2260 case function_dint_to_dword : |
|
2261 { |
|
2262 symbol_c *last_type_symbol = NULL; |
|
2263 |
|
2264 { |
|
2265 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2267 symbol_c *IN_param_value = &this->default_variable_name; |
|
2268 |
|
2269 symbol_c *IN_type_symbol = param_data_type; |
|
2270 last_type_symbol = param_data_type; |
|
2271 |
|
2272 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2273 { |
|
2274 |
|
2275 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2276 |
|
2277 if (IN_type_symbol == NULL) |
|
2278 IN_type_symbol = last_type_symbol; |
|
2279 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2280 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2281 function_type_prefix = return_type_symbol; |
|
2282 function_type_suffix = IN_type_symbol; |
|
2283 break; |
|
2284 |
|
2285 } |
|
2286 |
|
2287 |
|
2288 ERROR; |
|
2289 } |
|
2290 |
|
2291 }/*function_dint_to_dword*/ |
|
2292 break; |
|
2293 |
|
2294 /**** |
|
2295 *DINT_TO_DT |
|
2296 */ |
|
2297 case function_dint_to_dt : |
|
2298 { |
|
2299 symbol_c *last_type_symbol = NULL; |
|
2300 |
|
2301 { |
|
2302 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2303 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2304 symbol_c *IN_param_value = &this->default_variable_name; |
|
2305 |
|
2306 symbol_c *IN_type_symbol = param_data_type; |
|
2307 last_type_symbol = param_data_type; |
|
2308 |
|
2309 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2310 { |
|
2311 |
|
2312 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2313 |
|
2314 if (IN_type_symbol == NULL) |
|
2315 IN_type_symbol = last_type_symbol; |
|
2316 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2317 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
2318 function_type_prefix = return_type_symbol; |
|
2319 break; |
|
2320 |
|
2321 } |
|
2322 |
|
2323 |
|
2324 ERROR; |
|
2325 } |
|
2326 |
|
2327 }/*function_dint_to_dt*/ |
|
2328 break; |
|
2329 |
|
2330 /**** |
|
2331 *DINT_TO_TOD |
|
2332 */ |
|
2333 case function_dint_to_tod : |
|
2334 { |
|
2335 symbol_c *last_type_symbol = NULL; |
|
2336 |
|
2337 { |
|
2338 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2339 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2340 symbol_c *IN_param_value = &this->default_variable_name; |
|
2341 |
|
2342 symbol_c *IN_type_symbol = param_data_type; |
|
2343 last_type_symbol = param_data_type; |
|
2344 |
|
2345 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2346 { |
|
2347 |
|
2348 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2349 |
|
2350 if (IN_type_symbol == NULL) |
|
2351 IN_type_symbol = last_type_symbol; |
|
2352 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2353 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2354 function_type_prefix = return_type_symbol; |
|
2355 break; |
|
2356 |
|
2357 } |
|
2358 |
|
2359 |
|
2360 ERROR; |
|
2361 } |
|
2362 |
|
2363 }/*function_dint_to_tod*/ |
|
2364 break; |
|
2365 |
|
2366 /**** |
|
2367 *DINT_TO_UDINT |
|
2368 */ |
|
2369 case function_dint_to_udint : |
|
2370 { |
|
2371 symbol_c *last_type_symbol = NULL; |
|
2372 |
|
2373 { |
|
2374 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2375 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2376 symbol_c *IN_param_value = &this->default_variable_name; |
|
2377 |
|
2378 symbol_c *IN_type_symbol = param_data_type; |
|
2379 last_type_symbol = param_data_type; |
|
2380 |
|
2381 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2382 { |
|
2383 |
|
2384 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2385 |
|
2386 if (IN_type_symbol == NULL) |
|
2387 IN_type_symbol = last_type_symbol; |
|
2388 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2389 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2390 function_type_prefix = return_type_symbol; |
|
2391 function_type_suffix = IN_type_symbol; |
|
2392 break; |
|
2393 |
|
2394 } |
|
2395 |
|
2396 |
|
2397 ERROR; |
|
2398 } |
|
2399 |
|
2400 }/*function_dint_to_udint*/ |
|
2401 break; |
|
2402 |
|
2403 /**** |
|
2404 *DINT_TO_WORD |
|
2405 */ |
|
2406 case function_dint_to_word : |
|
2407 { |
|
2408 symbol_c *last_type_symbol = NULL; |
|
2409 |
|
2410 { |
|
2411 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2412 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2413 symbol_c *IN_param_value = &this->default_variable_name; |
|
2414 |
|
2415 symbol_c *IN_type_symbol = param_data_type; |
|
2416 last_type_symbol = param_data_type; |
|
2417 |
|
2418 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2419 { |
|
2420 |
|
2421 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2422 |
|
2423 if (IN_type_symbol == NULL) |
|
2424 IN_type_symbol = last_type_symbol; |
|
2425 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2426 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2427 function_type_prefix = return_type_symbol; |
|
2428 function_type_suffix = IN_type_symbol; |
|
2429 break; |
|
2430 |
|
2431 } |
|
2432 |
|
2433 |
|
2434 ERROR; |
|
2435 } |
|
2436 |
|
2437 }/*function_dint_to_word*/ |
|
2438 break; |
|
2439 |
|
2440 /**** |
|
2441 *DINT_TO_STRING |
|
2442 */ |
|
2443 case function_dint_to_string : |
|
2444 { |
|
2445 symbol_c *last_type_symbol = NULL; |
|
2446 |
|
2447 { |
|
2448 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2449 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2450 symbol_c *IN_param_value = &this->default_variable_name; |
|
2451 |
|
2452 symbol_c *IN_type_symbol = param_data_type; |
|
2453 last_type_symbol = param_data_type; |
|
2454 |
|
2455 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2456 { |
|
2457 |
|
2458 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
2459 |
|
2460 if (IN_type_symbol == NULL) |
|
2461 IN_type_symbol = last_type_symbol; |
|
2462 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2463 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2464 function_type_prefix = return_type_symbol; |
|
2465 break; |
|
2466 |
|
2467 } |
|
2468 |
|
2469 |
|
2470 ERROR; |
|
2471 } |
|
2472 |
|
2473 }/*function_dint_to_string*/ |
|
2474 break; |
|
2475 |
|
2476 /**** |
|
2477 *DINT_TO_LWORD |
|
2478 */ |
|
2479 case function_dint_to_lword : |
|
2480 { |
|
2481 symbol_c *last_type_symbol = NULL; |
|
2482 |
|
2483 { |
|
2484 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2485 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2486 symbol_c *IN_param_value = &this->default_variable_name; |
|
2487 |
|
2488 symbol_c *IN_type_symbol = param_data_type; |
|
2489 last_type_symbol = param_data_type; |
|
2490 |
|
2491 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2492 { |
|
2493 |
|
2494 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2495 |
|
2496 if (IN_type_symbol == NULL) |
|
2497 IN_type_symbol = last_type_symbol; |
|
2498 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2499 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
2500 function_type_prefix = return_type_symbol; |
|
2501 function_type_suffix = IN_type_symbol; |
|
2502 break; |
|
2503 |
|
2504 } |
|
2505 |
|
2506 |
|
2507 ERROR; |
|
2508 } |
|
2509 |
|
2510 }/*function_dint_to_lword*/ |
|
2511 break; |
|
2512 |
|
2513 /**** |
|
2514 *DINT_TO_UINT |
|
2515 */ |
|
2516 case function_dint_to_uint : |
|
2517 { |
|
2518 symbol_c *last_type_symbol = NULL; |
|
2519 |
|
2520 { |
|
2521 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2522 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2523 symbol_c *IN_param_value = &this->default_variable_name; |
|
2524 |
|
2525 symbol_c *IN_type_symbol = param_data_type; |
|
2526 last_type_symbol = param_data_type; |
|
2527 |
|
2528 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2529 { |
|
2530 |
|
2531 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2532 |
|
2533 if (IN_type_symbol == NULL) |
|
2534 IN_type_symbol = last_type_symbol; |
|
2535 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2536 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2537 function_type_prefix = return_type_symbol; |
|
2538 function_type_suffix = IN_type_symbol; |
|
2539 break; |
|
2540 |
|
2541 } |
|
2542 |
|
2543 |
|
2544 ERROR; |
|
2545 } |
|
2546 |
|
2547 }/*function_dint_to_uint*/ |
|
2548 break; |
|
2549 |
|
2550 /**** |
|
2551 *DINT_TO_LREAL |
|
2552 */ |
|
2553 case function_dint_to_lreal : |
|
2554 { |
|
2555 symbol_c *last_type_symbol = NULL; |
|
2556 |
|
2557 { |
|
2558 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2560 symbol_c *IN_param_value = &this->default_variable_name; |
|
2561 |
|
2562 symbol_c *IN_type_symbol = param_data_type; |
|
2563 last_type_symbol = param_data_type; |
|
2564 |
|
2565 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2566 { |
|
2567 |
|
2568 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2569 |
|
2570 if (IN_type_symbol == NULL) |
|
2571 IN_type_symbol = last_type_symbol; |
|
2572 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2573 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2574 function_type_prefix = return_type_symbol; |
|
2575 function_type_suffix = IN_type_symbol; |
|
2576 break; |
|
2577 |
|
2578 } |
|
2579 |
|
2580 |
|
2581 ERROR; |
|
2582 } |
|
2583 |
|
2584 }/*function_dint_to_lreal*/ |
|
2585 break; |
|
2586 |
|
2587 /**** |
|
2588 *DINT_TO_BYTE |
|
2589 */ |
|
2590 case function_dint_to_byte : |
|
2591 { |
|
2592 symbol_c *last_type_symbol = NULL; |
|
2593 |
|
2594 { |
|
2595 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2596 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2597 symbol_c *IN_param_value = &this->default_variable_name; |
|
2598 |
|
2599 symbol_c *IN_type_symbol = param_data_type; |
|
2600 last_type_symbol = param_data_type; |
|
2601 |
|
2602 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2603 { |
|
2604 |
|
2605 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2606 |
|
2607 if (IN_type_symbol == NULL) |
|
2608 IN_type_symbol = last_type_symbol; |
|
2609 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2610 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2611 function_type_prefix = return_type_symbol; |
|
2612 function_type_suffix = IN_type_symbol; |
|
2613 break; |
|
2614 |
|
2615 } |
|
2616 |
|
2617 |
|
2618 ERROR; |
|
2619 } |
|
2620 |
|
2621 }/*function_dint_to_byte*/ |
|
2622 break; |
|
2623 |
|
2624 /**** |
|
2625 *DINT_TO_USINT |
|
2626 */ |
|
2627 case function_dint_to_usint : |
|
2628 { |
|
2629 symbol_c *last_type_symbol = NULL; |
|
2630 |
|
2631 { |
|
2632 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2633 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2634 symbol_c *IN_param_value = &this->default_variable_name; |
|
2635 |
|
2636 symbol_c *IN_type_symbol = param_data_type; |
|
2637 last_type_symbol = param_data_type; |
|
2638 |
|
2639 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2640 { |
|
2641 |
|
2642 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2643 |
|
2644 if (IN_type_symbol == NULL) |
|
2645 IN_type_symbol = last_type_symbol; |
|
2646 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2647 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2648 function_type_prefix = return_type_symbol; |
|
2649 function_type_suffix = IN_type_symbol; |
|
2650 break; |
|
2651 |
|
2652 } |
|
2653 |
|
2654 |
|
2655 ERROR; |
|
2656 } |
|
2657 |
|
2658 }/*function_dint_to_usint*/ |
|
2659 break; |
|
2660 |
|
2661 /**** |
|
2662 *DINT_TO_ULINT |
|
2663 */ |
|
2664 case function_dint_to_ulint : |
|
2665 { |
|
2666 symbol_c *last_type_symbol = NULL; |
|
2667 |
|
2668 { |
|
2669 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2670 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2671 symbol_c *IN_param_value = &this->default_variable_name; |
|
2672 |
|
2673 symbol_c *IN_type_symbol = param_data_type; |
|
2674 last_type_symbol = param_data_type; |
|
2675 |
|
2676 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2677 { |
|
2678 |
|
2679 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2680 |
|
2681 if (IN_type_symbol == NULL) |
|
2682 IN_type_symbol = last_type_symbol; |
|
2683 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2684 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2685 function_type_prefix = return_type_symbol; |
|
2686 function_type_suffix = IN_type_symbol; |
|
2687 break; |
|
2688 |
|
2689 } |
|
2690 |
|
2691 |
|
2692 ERROR; |
|
2693 } |
|
2694 |
|
2695 }/*function_dint_to_ulint*/ |
|
2696 break; |
|
2697 |
|
2698 /**** |
|
2699 *DINT_TO_BOOL |
|
2700 */ |
|
2701 case function_dint_to_bool : |
|
2702 { |
|
2703 symbol_c *last_type_symbol = NULL; |
|
2704 |
|
2705 { |
|
2706 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2707 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2708 symbol_c *IN_param_value = &this->default_variable_name; |
|
2709 |
|
2710 symbol_c *IN_type_symbol = param_data_type; |
|
2711 last_type_symbol = param_data_type; |
|
2712 |
|
2713 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2714 { |
|
2715 |
|
2716 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2717 |
|
2718 if (IN_type_symbol == NULL) |
|
2719 IN_type_symbol = last_type_symbol; |
|
2720 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2721 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2722 function_type_prefix = return_type_symbol; |
|
2723 function_type_suffix = IN_type_symbol; |
|
2724 break; |
|
2725 |
|
2726 } |
|
2727 |
|
2728 |
|
2729 ERROR; |
|
2730 } |
|
2731 |
|
2732 }/*function_dint_to_bool*/ |
|
2733 break; |
|
2734 |
|
2735 /**** |
|
2736 *DINT_TO_TIME |
|
2737 */ |
|
2738 case function_dint_to_time : |
|
2739 { |
|
2740 symbol_c *last_type_symbol = NULL; |
|
2741 |
|
2742 { |
|
2743 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2744 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2745 symbol_c *IN_param_value = &this->default_variable_name; |
|
2746 |
|
2747 symbol_c *IN_type_symbol = param_data_type; |
|
2748 last_type_symbol = param_data_type; |
|
2749 |
|
2750 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2751 { |
|
2752 |
|
2753 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2754 |
|
2755 if (IN_type_symbol == NULL) |
|
2756 IN_type_symbol = last_type_symbol; |
|
2757 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2758 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2759 function_type_prefix = return_type_symbol; |
|
2760 break; |
|
2761 |
|
2762 } |
|
2763 |
|
2764 |
|
2765 ERROR; |
|
2766 } |
|
2767 |
|
2768 }/*function_dint_to_time*/ |
|
2769 break; |
|
2770 |
|
2771 /**** |
|
2772 *DINT_TO_INT |
|
2773 */ |
|
2774 case function_dint_to_int : |
|
2775 { |
|
2776 symbol_c *last_type_symbol = NULL; |
|
2777 |
|
2778 { |
|
2779 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2780 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2781 symbol_c *IN_param_value = &this->default_variable_name; |
|
2782 |
|
2783 symbol_c *IN_type_symbol = param_data_type; |
|
2784 last_type_symbol = param_data_type; |
|
2785 |
|
2786 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2787 { |
|
2788 |
|
2789 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
2790 |
|
2791 if (IN_type_symbol == NULL) |
|
2792 IN_type_symbol = last_type_symbol; |
|
2793 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2794 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2795 function_type_prefix = return_type_symbol; |
|
2796 function_type_suffix = IN_type_symbol; |
|
2797 break; |
|
2798 |
|
2799 } |
|
2800 |
|
2801 |
|
2802 ERROR; |
|
2803 } |
|
2804 |
|
2805 }/*function_dint_to_int*/ |
|
2806 break; |
|
2807 |
|
2808 /**** |
|
2809 *DATE_TO_REAL |
|
2810 */ |
|
2811 case function_date_to_real : |
|
2812 { |
|
2813 symbol_c *last_type_symbol = NULL; |
|
2814 |
|
2815 { |
|
2816 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2817 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2818 symbol_c *IN_param_value = &this->default_variable_name; |
|
2819 |
|
2820 symbol_c *IN_type_symbol = param_data_type; |
|
2821 last_type_symbol = param_data_type; |
|
2822 |
|
2823 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2824 { |
|
2825 |
|
2826 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
2827 |
|
2828 if (IN_type_symbol == NULL) |
|
2829 IN_type_symbol = last_type_symbol; |
|
2830 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2831 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2832 function_type_prefix = return_type_symbol; |
|
2833 break; |
|
2834 |
|
2835 } |
|
2836 |
|
2837 |
|
2838 ERROR; |
|
2839 } |
|
2840 |
|
2841 }/*function_date_to_real*/ |
|
2842 break; |
|
2843 |
|
2844 /**** |
|
2845 *DATE_TO_SINT |
|
2846 */ |
|
2847 case function_date_to_sint : |
|
2848 { |
|
2849 symbol_c *last_type_symbol = NULL; |
|
2850 |
|
2851 { |
|
2852 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2853 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2854 symbol_c *IN_param_value = &this->default_variable_name; |
|
2855 |
|
2856 symbol_c *IN_type_symbol = param_data_type; |
|
2857 last_type_symbol = param_data_type; |
|
2858 |
|
2859 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2860 { |
|
2861 |
|
2862 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2863 |
|
2864 if (IN_type_symbol == NULL) |
|
2865 IN_type_symbol = last_type_symbol; |
|
2866 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2867 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2868 function_type_prefix = return_type_symbol; |
|
2869 break; |
|
2870 |
|
2871 } |
|
2872 |
|
2873 |
|
2874 ERROR; |
|
2875 } |
|
2876 |
|
2877 }/*function_date_to_sint*/ |
|
2878 break; |
|
2879 |
|
2880 /**** |
|
2881 *DATE_TO_LINT |
|
2882 */ |
|
2883 case function_date_to_lint : |
|
2884 { |
|
2885 symbol_c *last_type_symbol = NULL; |
|
2886 |
|
2887 { |
|
2888 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2889 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2890 symbol_c *IN_param_value = &this->default_variable_name; |
|
2891 |
|
2892 symbol_c *IN_type_symbol = param_data_type; |
|
2893 last_type_symbol = param_data_type; |
|
2894 |
|
2895 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2896 { |
|
2897 |
|
2898 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2899 |
|
2900 if (IN_type_symbol == NULL) |
|
2901 IN_type_symbol = last_type_symbol; |
|
2902 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2903 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2904 function_type_prefix = return_type_symbol; |
|
2905 break; |
|
2906 |
|
2907 } |
|
2908 |
|
2909 |
|
2910 ERROR; |
|
2911 } |
|
2912 |
|
2913 }/*function_date_to_lint*/ |
|
2914 break; |
|
2915 |
|
2916 /**** |
|
2917 *DATE_TO_DINT |
|
2918 */ |
|
2919 case function_date_to_dint : |
|
2920 { |
|
2921 symbol_c *last_type_symbol = NULL; |
|
2922 |
|
2923 { |
|
2924 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2925 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2926 symbol_c *IN_param_value = &this->default_variable_name; |
|
2927 |
|
2928 symbol_c *IN_type_symbol = param_data_type; |
|
2929 last_type_symbol = param_data_type; |
|
2930 |
|
2931 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2932 { |
|
2933 |
|
2934 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2935 |
|
2936 if (IN_type_symbol == NULL) |
|
2937 IN_type_symbol = last_type_symbol; |
|
2938 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2939 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
2940 function_type_prefix = return_type_symbol; |
|
2941 break; |
|
2942 |
|
2943 } |
|
2944 |
|
2945 |
|
2946 ERROR; |
|
2947 } |
|
2948 |
|
2949 }/*function_date_to_dint*/ |
|
2950 break; |
|
2951 |
|
2952 /**** |
|
2953 *DATE_TO_DWORD |
|
2954 */ |
|
2955 case function_date_to_dword : |
|
2956 { |
|
2957 symbol_c *last_type_symbol = NULL; |
|
2958 |
|
2959 { |
|
2960 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2961 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2962 symbol_c *IN_param_value = &this->default_variable_name; |
|
2963 |
|
2964 symbol_c *IN_type_symbol = param_data_type; |
|
2965 last_type_symbol = param_data_type; |
|
2966 |
|
2967 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2968 { |
|
2969 |
|
2970 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2971 |
|
2972 if (IN_type_symbol == NULL) |
|
2973 IN_type_symbol = last_type_symbol; |
|
2974 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2975 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2976 function_type_prefix = return_type_symbol; |
|
2977 break; |
|
2978 |
|
2979 } |
|
2980 |
|
2981 |
|
2982 ERROR; |
|
2983 } |
|
2984 |
|
2985 }/*function_date_to_dword*/ |
|
2986 break; |
|
2987 |
|
2988 /**** |
|
2989 *DATE_TO_UDINT |
|
2990 */ |
|
2991 case function_date_to_udint : |
|
2992 { |
|
2993 symbol_c *last_type_symbol = NULL; |
|
2994 |
|
2995 { |
|
2996 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
2997 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2998 symbol_c *IN_param_value = &this->default_variable_name; |
|
2999 |
|
3000 symbol_c *IN_type_symbol = param_data_type; |
|
3001 last_type_symbol = param_data_type; |
|
3002 |
|
3003 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3004 { |
|
3005 |
|
3006 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3007 |
|
3008 if (IN_type_symbol == NULL) |
|
3009 IN_type_symbol = last_type_symbol; |
|
3010 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3011 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3012 function_type_prefix = return_type_symbol; |
|
3013 break; |
|
3014 |
|
3015 } |
|
3016 |
|
3017 |
|
3018 ERROR; |
|
3019 } |
|
3020 |
|
3021 }/*function_date_to_udint*/ |
|
3022 break; |
|
3023 |
|
3024 /**** |
|
3025 *DATE_TO_WORD |
|
3026 */ |
|
3027 case function_date_to_word : |
|
3028 { |
|
3029 symbol_c *last_type_symbol = NULL; |
|
3030 |
|
3031 { |
|
3032 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3033 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3034 symbol_c *IN_param_value = &this->default_variable_name; |
|
3035 |
|
3036 symbol_c *IN_type_symbol = param_data_type; |
|
3037 last_type_symbol = param_data_type; |
|
3038 |
|
3039 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3040 { |
|
3041 |
|
3042 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3043 |
|
3044 if (IN_type_symbol == NULL) |
|
3045 IN_type_symbol = last_type_symbol; |
|
3046 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3047 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3048 function_type_prefix = return_type_symbol; |
|
3049 break; |
|
3050 |
|
3051 } |
|
3052 |
|
3053 |
|
3054 ERROR; |
|
3055 } |
|
3056 |
|
3057 }/*function_date_to_word*/ |
|
3058 break; |
|
3059 |
|
3060 /**** |
|
3061 *DATE_TO_STRING |
|
3062 */ |
|
3063 case function_date_to_string : |
|
3064 { |
|
3065 symbol_c *last_type_symbol = NULL; |
|
3066 |
|
3067 { |
|
3068 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3069 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3070 symbol_c *IN_param_value = &this->default_variable_name; |
|
3071 |
|
3072 symbol_c *IN_type_symbol = param_data_type; |
|
3073 last_type_symbol = param_data_type; |
|
3074 |
|
3075 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3076 { |
|
3077 |
|
3078 function_name = (symbol_c*)(new pragma_c("__date_to_string")); |
|
3079 |
|
3080 if (IN_type_symbol == NULL) |
|
3081 IN_type_symbol = last_type_symbol; |
|
3082 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3083 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3084 function_type_prefix = return_type_symbol; |
|
3085 break; |
|
3086 |
|
3087 } |
|
3088 |
|
3089 |
|
3090 ERROR; |
|
3091 } |
|
3092 |
|
3093 }/*function_date_to_string*/ |
|
3094 break; |
|
3095 |
|
3096 /**** |
|
3097 *DATE_TO_LWORD |
|
3098 */ |
|
3099 case function_date_to_lword : |
|
3100 { |
|
3101 symbol_c *last_type_symbol = NULL; |
|
3102 |
|
3103 { |
|
3104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3106 symbol_c *IN_param_value = &this->default_variable_name; |
|
3107 |
|
3108 symbol_c *IN_type_symbol = param_data_type; |
|
3109 last_type_symbol = param_data_type; |
|
3110 |
|
3111 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3112 { |
|
3113 |
|
3114 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3115 |
|
3116 if (IN_type_symbol == NULL) |
|
3117 IN_type_symbol = last_type_symbol; |
|
3118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3119 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3120 function_type_prefix = return_type_symbol; |
|
3121 break; |
|
3122 |
|
3123 } |
|
3124 |
|
3125 |
|
3126 ERROR; |
|
3127 } |
|
3128 |
|
3129 }/*function_date_to_lword*/ |
|
3130 break; |
|
3131 |
|
3132 /**** |
|
3133 *DATE_TO_UINT |
|
3134 */ |
|
3135 case function_date_to_uint : |
|
3136 { |
|
3137 symbol_c *last_type_symbol = NULL; |
|
3138 |
|
3139 { |
|
3140 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3141 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3142 symbol_c *IN_param_value = &this->default_variable_name; |
|
3143 |
|
3144 symbol_c *IN_type_symbol = param_data_type; |
|
3145 last_type_symbol = param_data_type; |
|
3146 |
|
3147 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3148 { |
|
3149 |
|
3150 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3151 |
|
3152 if (IN_type_symbol == NULL) |
|
3153 IN_type_symbol = last_type_symbol; |
|
3154 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3155 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3156 function_type_prefix = return_type_symbol; |
|
3157 break; |
|
3158 |
|
3159 } |
|
3160 |
|
3161 |
|
3162 ERROR; |
|
3163 } |
|
3164 |
|
3165 }/*function_date_to_uint*/ |
|
3166 break; |
|
3167 |
|
3168 /**** |
|
3169 *DATE_TO_LREAL |
|
3170 */ |
|
3171 case function_date_to_lreal : |
|
3172 { |
|
3173 symbol_c *last_type_symbol = NULL; |
|
3174 |
|
3175 { |
|
3176 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3177 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3178 symbol_c *IN_param_value = &this->default_variable_name; |
|
3179 |
|
3180 symbol_c *IN_type_symbol = param_data_type; |
|
3181 last_type_symbol = param_data_type; |
|
3182 |
|
3183 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3184 { |
|
3185 |
|
3186 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3187 |
|
3188 if (IN_type_symbol == NULL) |
|
3189 IN_type_symbol = last_type_symbol; |
|
3190 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3191 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3192 function_type_prefix = return_type_symbol; |
|
3193 break; |
|
3194 |
|
3195 } |
|
3196 |
|
3197 |
|
3198 ERROR; |
|
3199 } |
|
3200 |
|
3201 }/*function_date_to_lreal*/ |
|
3202 break; |
|
3203 |
|
3204 /**** |
|
3205 *DATE_TO_BYTE |
|
3206 */ |
|
3207 case function_date_to_byte : |
|
3208 { |
|
3209 symbol_c *last_type_symbol = NULL; |
|
3210 |
|
3211 { |
|
3212 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3220 { |
|
3221 |
|
3222 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3223 |
|
3224 if (IN_type_symbol == NULL) |
|
3225 IN_type_symbol = last_type_symbol; |
|
3226 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3227 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3228 function_type_prefix = return_type_symbol; |
|
3229 break; |
|
3230 |
|
3231 } |
|
3232 |
|
3233 |
|
3234 ERROR; |
|
3235 } |
|
3236 |
|
3237 }/*function_date_to_byte*/ |
|
3238 break; |
|
3239 |
|
3240 /**** |
|
3241 *DATE_TO_USINT |
|
3242 */ |
|
3243 case function_date_to_usint : |
|
3244 { |
|
3245 symbol_c *last_type_symbol = NULL; |
|
3246 |
|
3247 { |
|
3248 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3249 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3250 symbol_c *IN_param_value = &this->default_variable_name; |
|
3251 |
|
3252 symbol_c *IN_type_symbol = param_data_type; |
|
3253 last_type_symbol = param_data_type; |
|
3254 |
|
3255 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3256 { |
|
3257 |
|
3258 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3259 |
|
3260 if (IN_type_symbol == NULL) |
|
3261 IN_type_symbol = last_type_symbol; |
|
3262 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3263 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3264 function_type_prefix = return_type_symbol; |
|
3265 break; |
|
3266 |
|
3267 } |
|
3268 |
|
3269 |
|
3270 ERROR; |
|
3271 } |
|
3272 |
|
3273 }/*function_date_to_usint*/ |
|
3274 break; |
|
3275 |
|
3276 /**** |
|
3277 *DATE_TO_ULINT |
|
3278 */ |
|
3279 case function_date_to_ulint : |
|
3280 { |
|
3281 symbol_c *last_type_symbol = NULL; |
|
3282 |
|
3283 { |
|
3284 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3285 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3286 symbol_c *IN_param_value = &this->default_variable_name; |
|
3287 |
|
3288 symbol_c *IN_type_symbol = param_data_type; |
|
3289 last_type_symbol = param_data_type; |
|
3290 |
|
3291 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3292 { |
|
3293 |
|
3294 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3295 |
|
3296 if (IN_type_symbol == NULL) |
|
3297 IN_type_symbol = last_type_symbol; |
|
3298 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3299 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3300 function_type_prefix = return_type_symbol; |
|
3301 break; |
|
3302 |
|
3303 } |
|
3304 |
|
3305 |
|
3306 ERROR; |
|
3307 } |
|
3308 |
|
3309 }/*function_date_to_ulint*/ |
|
3310 break; |
|
3311 |
|
3312 /**** |
|
3313 *DATE_TO_INT |
|
3314 */ |
|
3315 case function_date_to_int : |
|
3316 { |
|
3317 symbol_c *last_type_symbol = NULL; |
|
3318 |
|
3319 { |
|
3320 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3321 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3322 symbol_c *IN_param_value = &this->default_variable_name; |
|
3323 |
|
3324 symbol_c *IN_type_symbol = param_data_type; |
|
3325 last_type_symbol = param_data_type; |
|
3326 |
|
3327 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
3328 { |
|
3329 |
|
3330 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3331 |
|
3332 if (IN_type_symbol == NULL) |
|
3333 IN_type_symbol = last_type_symbol; |
|
3334 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3335 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3336 function_type_prefix = return_type_symbol; |
|
3337 break; |
|
3338 |
|
3339 } |
|
3340 |
|
3341 |
|
3342 ERROR; |
|
3343 } |
|
3344 |
|
3345 }/*function_date_to_int*/ |
|
3346 break; |
|
3347 |
|
3348 /**** |
|
3349 *DWORD_TO_REAL |
|
3350 */ |
|
3351 case function_dword_to_real : |
|
3352 { |
|
3353 symbol_c *last_type_symbol = NULL; |
|
3354 |
|
3355 { |
|
3356 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3357 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3358 symbol_c *IN_param_value = &this->default_variable_name; |
|
3359 |
|
3360 symbol_c *IN_type_symbol = param_data_type; |
|
3361 last_type_symbol = param_data_type; |
|
3362 |
|
3363 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3364 { |
|
3365 |
|
3366 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3367 |
|
3368 if (IN_type_symbol == NULL) |
|
3369 IN_type_symbol = last_type_symbol; |
|
3370 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3371 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3372 function_type_prefix = return_type_symbol; |
|
3373 function_type_suffix = IN_type_symbol; |
|
3374 break; |
|
3375 |
|
3376 } |
|
3377 |
|
3378 |
|
3379 ERROR; |
|
3380 } |
|
3381 |
|
3382 }/*function_dword_to_real*/ |
|
3383 break; |
|
3384 |
|
3385 /**** |
|
3386 *DWORD_TO_SINT |
|
3387 */ |
|
3388 case function_dword_to_sint : |
|
3389 { |
|
3390 symbol_c *last_type_symbol = NULL; |
|
3391 |
|
3392 { |
|
3393 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3394 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3395 symbol_c *IN_param_value = &this->default_variable_name; |
|
3396 |
|
3397 symbol_c *IN_type_symbol = param_data_type; |
|
3398 last_type_symbol = param_data_type; |
|
3399 |
|
3400 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3401 { |
|
3402 |
|
3403 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3404 |
|
3405 if (IN_type_symbol == NULL) |
|
3406 IN_type_symbol = last_type_symbol; |
|
3407 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3408 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3409 function_type_prefix = return_type_symbol; |
|
3410 function_type_suffix = IN_type_symbol; |
|
3411 break; |
|
3412 |
|
3413 } |
|
3414 |
|
3415 |
|
3416 ERROR; |
|
3417 } |
|
3418 |
|
3419 }/*function_dword_to_sint*/ |
|
3420 break; |
|
3421 |
|
3422 /**** |
|
3423 *DWORD_TO_LINT |
|
3424 */ |
|
3425 case function_dword_to_lint : |
|
3426 { |
|
3427 symbol_c *last_type_symbol = NULL; |
|
3428 |
|
3429 { |
|
3430 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3431 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3432 symbol_c *IN_param_value = &this->default_variable_name; |
|
3433 |
|
3434 symbol_c *IN_type_symbol = param_data_type; |
|
3435 last_type_symbol = param_data_type; |
|
3436 |
|
3437 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3438 { |
|
3439 |
|
3440 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3441 |
|
3442 if (IN_type_symbol == NULL) |
|
3443 IN_type_symbol = last_type_symbol; |
|
3444 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3445 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
3446 function_type_prefix = return_type_symbol; |
|
3447 function_type_suffix = IN_type_symbol; |
|
3448 break; |
|
3449 |
|
3450 } |
|
3451 |
|
3452 |
|
3453 ERROR; |
|
3454 } |
|
3455 |
|
3456 }/*function_dword_to_lint*/ |
|
3457 break; |
|
3458 |
|
3459 /**** |
|
3460 *DWORD_TO_DINT |
|
3461 */ |
|
3462 case function_dword_to_dint : |
|
3463 { |
|
3464 symbol_c *last_type_symbol = NULL; |
|
3465 |
|
3466 { |
|
3467 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3469 symbol_c *IN_param_value = &this->default_variable_name; |
|
3470 |
|
3471 symbol_c *IN_type_symbol = param_data_type; |
|
3472 last_type_symbol = param_data_type; |
|
3473 |
|
3474 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3475 { |
|
3476 |
|
3477 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3478 |
|
3479 if (IN_type_symbol == NULL) |
|
3480 IN_type_symbol = last_type_symbol; |
|
3481 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3482 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3483 function_type_prefix = return_type_symbol; |
|
3484 function_type_suffix = IN_type_symbol; |
|
3485 break; |
|
3486 |
|
3487 } |
|
3488 |
|
3489 |
|
3490 ERROR; |
|
3491 } |
|
3492 |
|
3493 }/*function_dword_to_dint*/ |
|
3494 break; |
|
3495 |
|
3496 /**** |
|
3497 *DWORD_TO_DATE |
|
3498 */ |
|
3499 case function_dword_to_date : |
|
3500 { |
|
3501 symbol_c *last_type_symbol = NULL; |
|
3502 |
|
3503 { |
|
3504 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3505 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3506 symbol_c *IN_param_value = &this->default_variable_name; |
|
3507 |
|
3508 symbol_c *IN_type_symbol = param_data_type; |
|
3509 last_type_symbol = param_data_type; |
|
3510 |
|
3511 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3512 { |
|
3513 |
|
3514 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3515 |
|
3516 if (IN_type_symbol == NULL) |
|
3517 IN_type_symbol = last_type_symbol; |
|
3518 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3519 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3520 function_type_prefix = return_type_symbol; |
|
3521 break; |
|
3522 |
|
3523 } |
|
3524 |
|
3525 |
|
3526 ERROR; |
|
3527 } |
|
3528 |
|
3529 }/*function_dword_to_date*/ |
|
3530 break; |
|
3531 |
|
3532 /**** |
|
3533 *DWORD_TO_DT |
|
3534 */ |
|
3535 case function_dword_to_dt : |
|
3536 { |
|
3537 symbol_c *last_type_symbol = NULL; |
|
3538 |
|
3539 { |
|
3540 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3541 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3542 symbol_c *IN_param_value = &this->default_variable_name; |
|
3543 |
|
3544 symbol_c *IN_type_symbol = param_data_type; |
|
3545 last_type_symbol = param_data_type; |
|
3546 |
|
3547 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3548 { |
|
3549 |
|
3550 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3551 |
|
3552 if (IN_type_symbol == NULL) |
|
3553 IN_type_symbol = last_type_symbol; |
|
3554 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3555 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3556 function_type_prefix = return_type_symbol; |
|
3557 break; |
|
3558 |
|
3559 } |
|
3560 |
|
3561 |
|
3562 ERROR; |
|
3563 } |
|
3564 |
|
3565 }/*function_dword_to_dt*/ |
|
3566 break; |
|
3567 |
|
3568 /**** |
|
3569 *DWORD_TO_TOD |
|
3570 */ |
|
3571 case function_dword_to_tod : |
|
3572 { |
|
3573 symbol_c *last_type_symbol = NULL; |
|
3574 |
|
3575 { |
|
3576 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3577 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3578 symbol_c *IN_param_value = &this->default_variable_name; |
|
3579 |
|
3580 symbol_c *IN_type_symbol = param_data_type; |
|
3581 last_type_symbol = param_data_type; |
|
3582 |
|
3583 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3584 { |
|
3585 |
|
3586 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3587 |
|
3588 if (IN_type_symbol == NULL) |
|
3589 IN_type_symbol = last_type_symbol; |
|
3590 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3591 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3592 function_type_prefix = return_type_symbol; |
|
3593 break; |
|
3594 |
|
3595 } |
|
3596 |
|
3597 |
|
3598 ERROR; |
|
3599 } |
|
3600 |
|
3601 }/*function_dword_to_tod*/ |
|
3602 break; |
|
3603 |
|
3604 /**** |
|
3605 *DWORD_TO_UDINT |
|
3606 */ |
|
3607 case function_dword_to_udint : |
|
3608 { |
|
3609 symbol_c *last_type_symbol = NULL; |
|
3610 |
|
3611 { |
|
3612 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3613 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3614 symbol_c *IN_param_value = &this->default_variable_name; |
|
3615 |
|
3616 symbol_c *IN_type_symbol = param_data_type; |
|
3617 last_type_symbol = param_data_type; |
|
3618 |
|
3619 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3620 { |
|
3621 |
|
3622 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3623 |
|
3624 if (IN_type_symbol == NULL) |
|
3625 IN_type_symbol = last_type_symbol; |
|
3626 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3627 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3628 function_type_prefix = return_type_symbol; |
|
3629 function_type_suffix = IN_type_symbol; |
|
3630 break; |
|
3631 |
|
3632 } |
|
3633 |
|
3634 |
|
3635 ERROR; |
|
3636 } |
|
3637 |
|
3638 }/*function_dword_to_udint*/ |
|
3639 break; |
|
3640 |
|
3641 /**** |
|
3642 *DWORD_TO_WORD |
|
3643 */ |
|
3644 case function_dword_to_word : |
|
3645 { |
|
3646 symbol_c *last_type_symbol = NULL; |
|
3647 |
|
3648 { |
|
3649 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3650 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3651 symbol_c *IN_param_value = &this->default_variable_name; |
|
3652 |
|
3653 symbol_c *IN_type_symbol = param_data_type; |
|
3654 last_type_symbol = param_data_type; |
|
3655 |
|
3656 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3657 { |
|
3658 |
|
3659 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3660 |
|
3661 if (IN_type_symbol == NULL) |
|
3662 IN_type_symbol = last_type_symbol; |
|
3663 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3664 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3665 function_type_prefix = return_type_symbol; |
|
3666 function_type_suffix = IN_type_symbol; |
|
3667 break; |
|
3668 |
|
3669 } |
|
3670 |
|
3671 |
|
3672 ERROR; |
|
3673 } |
|
3674 |
|
3675 }/*function_dword_to_word*/ |
|
3676 break; |
|
3677 |
|
3678 /**** |
|
3679 *DWORD_TO_STRING |
|
3680 */ |
|
3681 case function_dword_to_string : |
|
3682 { |
|
3683 symbol_c *last_type_symbol = NULL; |
|
3684 |
|
3685 { |
|
3686 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3688 symbol_c *IN_param_value = &this->default_variable_name; |
|
3689 |
|
3690 symbol_c *IN_type_symbol = param_data_type; |
|
3691 last_type_symbol = param_data_type; |
|
3692 |
|
3693 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3694 { |
|
3695 |
|
3696 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
3697 |
|
3698 if (IN_type_symbol == NULL) |
|
3699 IN_type_symbol = last_type_symbol; |
|
3700 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3701 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3702 function_type_prefix = return_type_symbol; |
|
3703 break; |
|
3704 |
|
3705 } |
|
3706 |
|
3707 |
|
3708 ERROR; |
|
3709 } |
|
3710 |
|
3711 }/*function_dword_to_string*/ |
|
3712 break; |
|
3713 |
|
3714 /**** |
|
3715 *DWORD_TO_LWORD |
|
3716 */ |
|
3717 case function_dword_to_lword : |
|
3718 { |
|
3719 symbol_c *last_type_symbol = NULL; |
|
3720 |
|
3721 { |
|
3722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3724 symbol_c *IN_param_value = &this->default_variable_name; |
|
3725 |
|
3726 symbol_c *IN_type_symbol = param_data_type; |
|
3727 last_type_symbol = param_data_type; |
|
3728 |
|
3729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3730 { |
|
3731 |
|
3732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3733 |
|
3734 if (IN_type_symbol == NULL) |
|
3735 IN_type_symbol = last_type_symbol; |
|
3736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3737 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3738 function_type_prefix = return_type_symbol; |
|
3739 function_type_suffix = IN_type_symbol; |
|
3740 break; |
|
3741 |
|
3742 } |
|
3743 |
|
3744 |
|
3745 ERROR; |
|
3746 } |
|
3747 |
|
3748 }/*function_dword_to_lword*/ |
|
3749 break; |
|
3750 |
|
3751 /**** |
|
3752 *DWORD_TO_UINT |
|
3753 */ |
|
3754 case function_dword_to_uint : |
|
3755 { |
|
3756 symbol_c *last_type_symbol = NULL; |
|
3757 |
|
3758 { |
|
3759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3767 { |
|
3768 |
|
3769 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3770 |
|
3771 if (IN_type_symbol == NULL) |
|
3772 IN_type_symbol = last_type_symbol; |
|
3773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3774 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3775 function_type_prefix = return_type_symbol; |
|
3776 function_type_suffix = IN_type_symbol; |
|
3777 break; |
|
3778 |
|
3779 } |
|
3780 |
|
3781 |
|
3782 ERROR; |
|
3783 } |
|
3784 |
|
3785 }/*function_dword_to_uint*/ |
|
3786 break; |
|
3787 |
|
3788 /**** |
|
3789 *DWORD_TO_LREAL |
|
3790 */ |
|
3791 case function_dword_to_lreal : |
|
3792 { |
|
3793 symbol_c *last_type_symbol = NULL; |
|
3794 |
|
3795 { |
|
3796 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3798 symbol_c *IN_param_value = &this->default_variable_name; |
|
3799 |
|
3800 symbol_c *IN_type_symbol = param_data_type; |
|
3801 last_type_symbol = param_data_type; |
|
3802 |
|
3803 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3804 { |
|
3805 |
|
3806 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3807 |
|
3808 if (IN_type_symbol == NULL) |
|
3809 IN_type_symbol = last_type_symbol; |
|
3810 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3811 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3812 function_type_prefix = return_type_symbol; |
|
3813 function_type_suffix = IN_type_symbol; |
|
3814 break; |
|
3815 |
|
3816 } |
|
3817 |
|
3818 |
|
3819 ERROR; |
|
3820 } |
|
3821 |
|
3822 }/*function_dword_to_lreal*/ |
|
3823 break; |
|
3824 |
|
3825 /**** |
|
3826 *DWORD_TO_BYTE |
|
3827 */ |
|
3828 case function_dword_to_byte : |
|
3829 { |
|
3830 symbol_c *last_type_symbol = NULL; |
|
3831 |
|
3832 { |
|
3833 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3834 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3835 symbol_c *IN_param_value = &this->default_variable_name; |
|
3836 |
|
3837 symbol_c *IN_type_symbol = param_data_type; |
|
3838 last_type_symbol = param_data_type; |
|
3839 |
|
3840 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3841 { |
|
3842 |
|
3843 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3844 |
|
3845 if (IN_type_symbol == NULL) |
|
3846 IN_type_symbol = last_type_symbol; |
|
3847 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3848 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3849 function_type_prefix = return_type_symbol; |
|
3850 function_type_suffix = IN_type_symbol; |
|
3851 break; |
|
3852 |
|
3853 } |
|
3854 |
|
3855 |
|
3856 ERROR; |
|
3857 } |
|
3858 |
|
3859 }/*function_dword_to_byte*/ |
|
3860 break; |
|
3861 |
|
3862 /**** |
|
3863 *DWORD_TO_USINT |
|
3864 */ |
|
3865 case function_dword_to_usint : |
|
3866 { |
|
3867 symbol_c *last_type_symbol = NULL; |
|
3868 |
|
3869 { |
|
3870 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3871 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3872 symbol_c *IN_param_value = &this->default_variable_name; |
|
3873 |
|
3874 symbol_c *IN_type_symbol = param_data_type; |
|
3875 last_type_symbol = param_data_type; |
|
3876 |
|
3877 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3878 { |
|
3879 |
|
3880 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3881 |
|
3882 if (IN_type_symbol == NULL) |
|
3883 IN_type_symbol = last_type_symbol; |
|
3884 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3885 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3886 function_type_prefix = return_type_symbol; |
|
3887 function_type_suffix = IN_type_symbol; |
|
3888 break; |
|
3889 |
|
3890 } |
|
3891 |
|
3892 |
|
3893 ERROR; |
|
3894 } |
|
3895 |
|
3896 }/*function_dword_to_usint*/ |
|
3897 break; |
|
3898 |
|
3899 /**** |
|
3900 *DWORD_TO_ULINT |
|
3901 */ |
|
3902 case function_dword_to_ulint : |
|
3903 { |
|
3904 symbol_c *last_type_symbol = NULL; |
|
3905 |
|
3906 { |
|
3907 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3908 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3909 symbol_c *IN_param_value = &this->default_variable_name; |
|
3910 |
|
3911 symbol_c *IN_type_symbol = param_data_type; |
|
3912 last_type_symbol = param_data_type; |
|
3913 |
|
3914 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3915 { |
|
3916 |
|
3917 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3918 |
|
3919 if (IN_type_symbol == NULL) |
|
3920 IN_type_symbol = last_type_symbol; |
|
3921 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3922 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3923 function_type_prefix = return_type_symbol; |
|
3924 function_type_suffix = IN_type_symbol; |
|
3925 break; |
|
3926 |
|
3927 } |
|
3928 |
|
3929 |
|
3930 ERROR; |
|
3931 } |
|
3932 |
|
3933 }/*function_dword_to_ulint*/ |
|
3934 break; |
|
3935 |
|
3936 /**** |
|
3937 *DWORD_TO_BOOL |
|
3938 */ |
|
3939 case function_dword_to_bool : |
|
3940 { |
|
3941 symbol_c *last_type_symbol = NULL; |
|
3942 |
|
3943 { |
|
3944 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3945 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3946 symbol_c *IN_param_value = &this->default_variable_name; |
|
3947 |
|
3948 symbol_c *IN_type_symbol = param_data_type; |
|
3949 last_type_symbol = param_data_type; |
|
3950 |
|
3951 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3952 { |
|
3953 |
|
3954 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
3955 |
|
3956 if (IN_type_symbol == NULL) |
|
3957 IN_type_symbol = last_type_symbol; |
|
3958 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3959 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3960 function_type_prefix = return_type_symbol; |
|
3961 function_type_suffix = IN_type_symbol; |
|
3962 break; |
|
3963 |
|
3964 } |
|
3965 |
|
3966 |
|
3967 ERROR; |
|
3968 } |
|
3969 |
|
3970 }/*function_dword_to_bool*/ |
|
3971 break; |
|
3972 |
|
3973 /**** |
|
3974 *DWORD_TO_TIME |
|
3975 */ |
|
3976 case function_dword_to_time : |
|
3977 { |
|
3978 symbol_c *last_type_symbol = NULL; |
|
3979 |
|
3980 { |
|
3981 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
3982 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3983 symbol_c *IN_param_value = &this->default_variable_name; |
|
3984 |
|
3985 symbol_c *IN_type_symbol = param_data_type; |
|
3986 last_type_symbol = param_data_type; |
|
3987 |
|
3988 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3989 { |
|
3990 |
|
3991 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3992 |
|
3993 if (IN_type_symbol == NULL) |
|
3994 IN_type_symbol = last_type_symbol; |
|
3995 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3996 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
3997 function_type_prefix = return_type_symbol; |
|
3998 break; |
|
3999 |
|
4000 } |
|
4001 |
|
4002 |
|
4003 ERROR; |
|
4004 } |
|
4005 |
|
4006 }/*function_dword_to_time*/ |
|
4007 break; |
|
4008 |
|
4009 /**** |
|
4010 *DWORD_TO_INT |
|
4011 */ |
|
4012 case function_dword_to_int : |
|
4013 { |
|
4014 symbol_c *last_type_symbol = NULL; |
|
4015 |
|
4016 { |
|
4017 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4018 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4019 symbol_c *IN_param_value = &this->default_variable_name; |
|
4020 |
|
4021 symbol_c *IN_type_symbol = param_data_type; |
|
4022 last_type_symbol = param_data_type; |
|
4023 |
|
4024 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4025 { |
|
4026 |
|
4027 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
4028 |
|
4029 if (IN_type_symbol == NULL) |
|
4030 IN_type_symbol = last_type_symbol; |
|
4031 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4032 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4033 function_type_prefix = return_type_symbol; |
|
4034 function_type_suffix = IN_type_symbol; |
|
4035 break; |
|
4036 |
|
4037 } |
|
4038 |
|
4039 |
|
4040 ERROR; |
|
4041 } |
|
4042 |
|
4043 }/*function_dword_to_int*/ |
|
4044 break; |
|
4045 |
|
4046 /**** |
|
4047 *DT_TO_REAL |
|
4048 */ |
|
4049 case function_dt_to_real : |
|
4050 { |
|
4051 symbol_c *last_type_symbol = NULL; |
|
4052 |
|
4053 { |
|
4054 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4055 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4056 symbol_c *IN_param_value = &this->default_variable_name; |
|
4057 |
|
4058 symbol_c *IN_type_symbol = param_data_type; |
|
4059 last_type_symbol = param_data_type; |
|
4060 |
|
4061 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4062 { |
|
4063 |
|
4064 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4065 |
|
4066 if (IN_type_symbol == NULL) |
|
4067 IN_type_symbol = last_type_symbol; |
|
4068 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4069 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4070 function_type_prefix = return_type_symbol; |
|
4071 break; |
|
4072 |
|
4073 } |
|
4074 |
|
4075 |
|
4076 ERROR; |
|
4077 } |
|
4078 |
|
4079 }/*function_dt_to_real*/ |
|
4080 break; |
|
4081 |
|
4082 /**** |
|
4083 *DT_TO_SINT |
|
4084 */ |
|
4085 case function_dt_to_sint : |
|
4086 { |
|
4087 symbol_c *last_type_symbol = NULL; |
|
4088 |
|
4089 { |
|
4090 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4092 symbol_c *IN_param_value = &this->default_variable_name; |
|
4093 |
|
4094 symbol_c *IN_type_symbol = param_data_type; |
|
4095 last_type_symbol = param_data_type; |
|
4096 |
|
4097 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4098 { |
|
4099 |
|
4100 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4101 |
|
4102 if (IN_type_symbol == NULL) |
|
4103 IN_type_symbol = last_type_symbol; |
|
4104 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4105 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4106 function_type_prefix = return_type_symbol; |
|
4107 break; |
|
4108 |
|
4109 } |
|
4110 |
|
4111 |
|
4112 ERROR; |
|
4113 } |
|
4114 |
|
4115 }/*function_dt_to_sint*/ |
|
4116 break; |
|
4117 |
|
4118 /**** |
|
4119 *DT_TO_LINT |
|
4120 */ |
|
4121 case function_dt_to_lint : |
|
4122 { |
|
4123 symbol_c *last_type_symbol = NULL; |
|
4124 |
|
4125 { |
|
4126 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4127 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4128 symbol_c *IN_param_value = &this->default_variable_name; |
|
4129 |
|
4130 symbol_c *IN_type_symbol = param_data_type; |
|
4131 last_type_symbol = param_data_type; |
|
4132 |
|
4133 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4134 { |
|
4135 |
|
4136 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4137 |
|
4138 if (IN_type_symbol == NULL) |
|
4139 IN_type_symbol = last_type_symbol; |
|
4140 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4141 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4142 function_type_prefix = return_type_symbol; |
|
4143 break; |
|
4144 |
|
4145 } |
|
4146 |
|
4147 |
|
4148 ERROR; |
|
4149 } |
|
4150 |
|
4151 }/*function_dt_to_lint*/ |
|
4152 break; |
|
4153 |
|
4154 /**** |
|
4155 *DT_TO_DINT |
|
4156 */ |
|
4157 case function_dt_to_dint : |
|
4158 { |
|
4159 symbol_c *last_type_symbol = NULL; |
|
4160 |
|
4161 { |
|
4162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4164 symbol_c *IN_param_value = &this->default_variable_name; |
|
4165 |
|
4166 symbol_c *IN_type_symbol = param_data_type; |
|
4167 last_type_symbol = param_data_type; |
|
4168 |
|
4169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4170 { |
|
4171 |
|
4172 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4173 |
|
4174 if (IN_type_symbol == NULL) |
|
4175 IN_type_symbol = last_type_symbol; |
|
4176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4177 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4178 function_type_prefix = return_type_symbol; |
|
4179 break; |
|
4180 |
|
4181 } |
|
4182 |
|
4183 |
|
4184 ERROR; |
|
4185 } |
|
4186 |
|
4187 }/*function_dt_to_dint*/ |
|
4188 break; |
|
4189 |
|
4190 /**** |
|
4191 *DT_TO_DWORD |
|
4192 */ |
|
4193 case function_dt_to_dword : |
|
4194 { |
|
4195 symbol_c *last_type_symbol = NULL; |
|
4196 |
|
4197 { |
|
4198 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4200 symbol_c *IN_param_value = &this->default_variable_name; |
|
4201 |
|
4202 symbol_c *IN_type_symbol = param_data_type; |
|
4203 last_type_symbol = param_data_type; |
|
4204 |
|
4205 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4206 { |
|
4207 |
|
4208 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4209 |
|
4210 if (IN_type_symbol == NULL) |
|
4211 IN_type_symbol = last_type_symbol; |
|
4212 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4213 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4214 function_type_prefix = return_type_symbol; |
|
4215 break; |
|
4216 |
|
4217 } |
|
4218 |
|
4219 |
|
4220 ERROR; |
|
4221 } |
|
4222 |
|
4223 }/*function_dt_to_dword*/ |
|
4224 break; |
|
4225 |
|
4226 /**** |
|
4227 *DT_TO_UDINT |
|
4228 */ |
|
4229 case function_dt_to_udint : |
|
4230 { |
|
4231 symbol_c *last_type_symbol = NULL; |
|
4232 |
|
4233 { |
|
4234 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4235 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4236 symbol_c *IN_param_value = &this->default_variable_name; |
|
4237 |
|
4238 symbol_c *IN_type_symbol = param_data_type; |
|
4239 last_type_symbol = param_data_type; |
|
4240 |
|
4241 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4242 { |
|
4243 |
|
4244 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4245 |
|
4246 if (IN_type_symbol == NULL) |
|
4247 IN_type_symbol = last_type_symbol; |
|
4248 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4249 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4250 function_type_prefix = return_type_symbol; |
|
4251 break; |
|
4252 |
|
4253 } |
|
4254 |
|
4255 |
|
4256 ERROR; |
|
4257 } |
|
4258 |
|
4259 }/*function_dt_to_udint*/ |
|
4260 break; |
|
4261 |
|
4262 /**** |
|
4263 *DT_TO_WORD |
|
4264 */ |
|
4265 case function_dt_to_word : |
|
4266 { |
|
4267 symbol_c *last_type_symbol = NULL; |
|
4268 |
|
4269 { |
|
4270 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4271 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4272 symbol_c *IN_param_value = &this->default_variable_name; |
|
4273 |
|
4274 symbol_c *IN_type_symbol = param_data_type; |
|
4275 last_type_symbol = param_data_type; |
|
4276 |
|
4277 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4278 { |
|
4279 |
|
4280 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4281 |
|
4282 if (IN_type_symbol == NULL) |
|
4283 IN_type_symbol = last_type_symbol; |
|
4284 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4285 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4286 function_type_prefix = return_type_symbol; |
|
4287 break; |
|
4288 |
|
4289 } |
|
4290 |
|
4291 |
|
4292 ERROR; |
|
4293 } |
|
4294 |
|
4295 }/*function_dt_to_word*/ |
|
4296 break; |
|
4297 |
|
4298 /**** |
|
4299 *DT_TO_STRING |
|
4300 */ |
|
4301 case function_dt_to_string : |
|
4302 { |
|
4303 symbol_c *last_type_symbol = NULL; |
|
4304 |
|
4305 { |
|
4306 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4307 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4308 symbol_c *IN_param_value = &this->default_variable_name; |
|
4309 |
|
4310 symbol_c *IN_type_symbol = param_data_type; |
|
4311 last_type_symbol = param_data_type; |
|
4312 |
|
4313 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4314 { |
|
4315 |
|
4316 function_name = (symbol_c*)(new pragma_c("__dt_to_string")); |
|
4317 |
|
4318 if (IN_type_symbol == NULL) |
|
4319 IN_type_symbol = last_type_symbol; |
|
4320 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4321 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4322 function_type_prefix = return_type_symbol; |
|
4323 break; |
|
4324 |
|
4325 } |
|
4326 |
|
4327 |
|
4328 ERROR; |
|
4329 } |
|
4330 |
|
4331 }/*function_dt_to_string*/ |
|
4332 break; |
|
4333 |
|
4334 /**** |
|
4335 *DT_TO_LWORD |
|
4336 */ |
|
4337 case function_dt_to_lword : |
|
4338 { |
|
4339 symbol_c *last_type_symbol = NULL; |
|
4340 |
|
4341 { |
|
4342 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4343 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4344 symbol_c *IN_param_value = &this->default_variable_name; |
|
4345 |
|
4346 symbol_c *IN_type_symbol = param_data_type; |
|
4347 last_type_symbol = param_data_type; |
|
4348 |
|
4349 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4350 { |
|
4351 |
|
4352 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4353 |
|
4354 if (IN_type_symbol == NULL) |
|
4355 IN_type_symbol = last_type_symbol; |
|
4356 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4357 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4358 function_type_prefix = return_type_symbol; |
|
4359 break; |
|
4360 |
|
4361 } |
|
4362 |
|
4363 |
|
4364 ERROR; |
|
4365 } |
|
4366 |
|
4367 }/*function_dt_to_lword*/ |
|
4368 break; |
|
4369 |
|
4370 /**** |
|
4371 *DT_TO_UINT |
|
4372 */ |
|
4373 case function_dt_to_uint : |
|
4374 { |
|
4375 symbol_c *last_type_symbol = NULL; |
|
4376 |
|
4377 { |
|
4378 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4379 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4380 symbol_c *IN_param_value = &this->default_variable_name; |
|
4381 |
|
4382 symbol_c *IN_type_symbol = param_data_type; |
|
4383 last_type_symbol = param_data_type; |
|
4384 |
|
4385 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4386 { |
|
4387 |
|
4388 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4389 |
|
4390 if (IN_type_symbol == NULL) |
|
4391 IN_type_symbol = last_type_symbol; |
|
4392 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4393 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4394 function_type_prefix = return_type_symbol; |
|
4395 break; |
|
4396 |
|
4397 } |
|
4398 |
|
4399 |
|
4400 ERROR; |
|
4401 } |
|
4402 |
|
4403 }/*function_dt_to_uint*/ |
|
4404 break; |
|
4405 |
|
4406 /**** |
|
4407 *DT_TO_LREAL |
|
4408 */ |
|
4409 case function_dt_to_lreal : |
|
4410 { |
|
4411 symbol_c *last_type_symbol = NULL; |
|
4412 |
|
4413 { |
|
4414 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4415 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4416 symbol_c *IN_param_value = &this->default_variable_name; |
|
4417 |
|
4418 symbol_c *IN_type_symbol = param_data_type; |
|
4419 last_type_symbol = param_data_type; |
|
4420 |
|
4421 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4422 { |
|
4423 |
|
4424 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4425 |
|
4426 if (IN_type_symbol == NULL) |
|
4427 IN_type_symbol = last_type_symbol; |
|
4428 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4429 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4430 function_type_prefix = return_type_symbol; |
|
4431 break; |
|
4432 |
|
4433 } |
|
4434 |
|
4435 |
|
4436 ERROR; |
|
4437 } |
|
4438 |
|
4439 }/*function_dt_to_lreal*/ |
|
4440 break; |
|
4441 |
|
4442 /**** |
|
4443 *DT_TO_BYTE |
|
4444 */ |
|
4445 case function_dt_to_byte : |
|
4446 { |
|
4447 symbol_c *last_type_symbol = NULL; |
|
4448 |
|
4449 { |
|
4450 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4451 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4452 symbol_c *IN_param_value = &this->default_variable_name; |
|
4453 |
|
4454 symbol_c *IN_type_symbol = param_data_type; |
|
4455 last_type_symbol = param_data_type; |
|
4456 |
|
4457 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4458 { |
|
4459 |
|
4460 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4461 |
|
4462 if (IN_type_symbol == NULL) |
|
4463 IN_type_symbol = last_type_symbol; |
|
4464 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4465 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4466 function_type_prefix = return_type_symbol; |
|
4467 break; |
|
4468 |
|
4469 } |
|
4470 |
|
4471 |
|
4472 ERROR; |
|
4473 } |
|
4474 |
|
4475 }/*function_dt_to_byte*/ |
|
4476 break; |
|
4477 |
|
4478 /**** |
|
4479 *DT_TO_USINT |
|
4480 */ |
|
4481 case function_dt_to_usint : |
|
4482 { |
|
4483 symbol_c *last_type_symbol = NULL; |
|
4484 |
|
4485 { |
|
4486 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4488 symbol_c *IN_param_value = &this->default_variable_name; |
|
4489 |
|
4490 symbol_c *IN_type_symbol = param_data_type; |
|
4491 last_type_symbol = param_data_type; |
|
4492 |
|
4493 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4494 { |
|
4495 |
|
4496 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4497 |
|
4498 if (IN_type_symbol == NULL) |
|
4499 IN_type_symbol = last_type_symbol; |
|
4500 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4501 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4502 function_type_prefix = return_type_symbol; |
|
4503 break; |
|
4504 |
|
4505 } |
|
4506 |
|
4507 |
|
4508 ERROR; |
|
4509 } |
|
4510 |
|
4511 }/*function_dt_to_usint*/ |
|
4512 break; |
|
4513 |
|
4514 /**** |
|
4515 *DT_TO_ULINT |
|
4516 */ |
|
4517 case function_dt_to_ulint : |
|
4518 { |
|
4519 symbol_c *last_type_symbol = NULL; |
|
4520 |
|
4521 { |
|
4522 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4523 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4524 symbol_c *IN_param_value = &this->default_variable_name; |
|
4525 |
|
4526 symbol_c *IN_type_symbol = param_data_type; |
|
4527 last_type_symbol = param_data_type; |
|
4528 |
|
4529 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4530 { |
|
4531 |
|
4532 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4533 |
|
4534 if (IN_type_symbol == NULL) |
|
4535 IN_type_symbol = last_type_symbol; |
|
4536 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4537 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4538 function_type_prefix = return_type_symbol; |
|
4539 break; |
|
4540 |
|
4541 } |
|
4542 |
|
4543 |
|
4544 ERROR; |
|
4545 } |
|
4546 |
|
4547 }/*function_dt_to_ulint*/ |
|
4548 break; |
|
4549 |
|
4550 /**** |
|
4551 *DT_TO_INT |
|
4552 */ |
|
4553 case function_dt_to_int : |
|
4554 { |
|
4555 symbol_c *last_type_symbol = NULL; |
|
4556 |
|
4557 { |
|
4558 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4560 symbol_c *IN_param_value = &this->default_variable_name; |
|
4561 |
|
4562 symbol_c *IN_type_symbol = param_data_type; |
|
4563 last_type_symbol = param_data_type; |
|
4564 |
|
4565 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
4566 { |
|
4567 |
|
4568 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4569 |
|
4570 if (IN_type_symbol == NULL) |
|
4571 IN_type_symbol = last_type_symbol; |
|
4572 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4573 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4574 function_type_prefix = return_type_symbol; |
|
4575 break; |
|
4576 |
|
4577 } |
|
4578 |
|
4579 |
|
4580 ERROR; |
|
4581 } |
|
4582 |
|
4583 }/*function_dt_to_int*/ |
|
4584 break; |
|
4585 |
|
4586 /**** |
|
4587 *TOD_TO_REAL |
|
4588 */ |
|
4589 case function_tod_to_real : |
|
4590 { |
|
4591 symbol_c *last_type_symbol = NULL; |
|
4592 |
|
4593 { |
|
4594 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4595 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4596 symbol_c *IN_param_value = &this->default_variable_name; |
|
4597 |
|
4598 symbol_c *IN_type_symbol = param_data_type; |
|
4599 last_type_symbol = param_data_type; |
|
4600 |
|
4601 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4602 { |
|
4603 |
|
4604 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4605 |
|
4606 if (IN_type_symbol == NULL) |
|
4607 IN_type_symbol = last_type_symbol; |
|
4608 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4609 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4610 function_type_prefix = return_type_symbol; |
|
4611 break; |
|
4612 |
|
4613 } |
|
4614 |
|
4615 |
|
4616 ERROR; |
|
4617 } |
|
4618 |
|
4619 }/*function_tod_to_real*/ |
|
4620 break; |
|
4621 |
|
4622 /**** |
|
4623 *TOD_TO_SINT |
|
4624 */ |
|
4625 case function_tod_to_sint : |
|
4626 { |
|
4627 symbol_c *last_type_symbol = NULL; |
|
4628 |
|
4629 { |
|
4630 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4631 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4632 symbol_c *IN_param_value = &this->default_variable_name; |
|
4633 |
|
4634 symbol_c *IN_type_symbol = param_data_type; |
|
4635 last_type_symbol = param_data_type; |
|
4636 |
|
4637 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4638 { |
|
4639 |
|
4640 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4641 |
|
4642 if (IN_type_symbol == NULL) |
|
4643 IN_type_symbol = last_type_symbol; |
|
4644 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4645 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4646 function_type_prefix = return_type_symbol; |
|
4647 break; |
|
4648 |
|
4649 } |
|
4650 |
|
4651 |
|
4652 ERROR; |
|
4653 } |
|
4654 |
|
4655 }/*function_tod_to_sint*/ |
|
4656 break; |
|
4657 |
|
4658 /**** |
|
4659 *TOD_TO_LINT |
|
4660 */ |
|
4661 case function_tod_to_lint : |
|
4662 { |
|
4663 symbol_c *last_type_symbol = NULL; |
|
4664 |
|
4665 { |
|
4666 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4667 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4668 symbol_c *IN_param_value = &this->default_variable_name; |
|
4669 |
|
4670 symbol_c *IN_type_symbol = param_data_type; |
|
4671 last_type_symbol = param_data_type; |
|
4672 |
|
4673 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4674 { |
|
4675 |
|
4676 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4677 |
|
4678 if (IN_type_symbol == NULL) |
|
4679 IN_type_symbol = last_type_symbol; |
|
4680 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4681 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4682 function_type_prefix = return_type_symbol; |
|
4683 break; |
|
4684 |
|
4685 } |
|
4686 |
|
4687 |
|
4688 ERROR; |
|
4689 } |
|
4690 |
|
4691 }/*function_tod_to_lint*/ |
|
4692 break; |
|
4693 |
|
4694 /**** |
|
4695 *TOD_TO_DINT |
|
4696 */ |
|
4697 case function_tod_to_dint : |
|
4698 { |
|
4699 symbol_c *last_type_symbol = NULL; |
|
4700 |
|
4701 { |
|
4702 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4703 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4704 symbol_c *IN_param_value = &this->default_variable_name; |
|
4705 |
|
4706 symbol_c *IN_type_symbol = param_data_type; |
|
4707 last_type_symbol = param_data_type; |
|
4708 |
|
4709 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4710 { |
|
4711 |
|
4712 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4713 |
|
4714 if (IN_type_symbol == NULL) |
|
4715 IN_type_symbol = last_type_symbol; |
|
4716 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4717 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4718 function_type_prefix = return_type_symbol; |
|
4719 break; |
|
4720 |
|
4721 } |
|
4722 |
|
4723 |
|
4724 ERROR; |
|
4725 } |
|
4726 |
|
4727 }/*function_tod_to_dint*/ |
|
4728 break; |
|
4729 |
|
4730 /**** |
|
4731 *TOD_TO_DWORD |
|
4732 */ |
|
4733 case function_tod_to_dword : |
|
4734 { |
|
4735 symbol_c *last_type_symbol = NULL; |
|
4736 |
|
4737 { |
|
4738 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4740 symbol_c *IN_param_value = &this->default_variable_name; |
|
4741 |
|
4742 symbol_c *IN_type_symbol = param_data_type; |
|
4743 last_type_symbol = param_data_type; |
|
4744 |
|
4745 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4746 { |
|
4747 |
|
4748 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4749 |
|
4750 if (IN_type_symbol == NULL) |
|
4751 IN_type_symbol = last_type_symbol; |
|
4752 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4753 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4754 function_type_prefix = return_type_symbol; |
|
4755 break; |
|
4756 |
|
4757 } |
|
4758 |
|
4759 |
|
4760 ERROR; |
|
4761 } |
|
4762 |
|
4763 }/*function_tod_to_dword*/ |
|
4764 break; |
|
4765 |
|
4766 /**** |
|
4767 *TOD_TO_UDINT |
|
4768 */ |
|
4769 case function_tod_to_udint : |
|
4770 { |
|
4771 symbol_c *last_type_symbol = NULL; |
|
4772 |
|
4773 { |
|
4774 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4776 symbol_c *IN_param_value = &this->default_variable_name; |
|
4777 |
|
4778 symbol_c *IN_type_symbol = param_data_type; |
|
4779 last_type_symbol = param_data_type; |
|
4780 |
|
4781 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4782 { |
|
4783 |
|
4784 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4785 |
|
4786 if (IN_type_symbol == NULL) |
|
4787 IN_type_symbol = last_type_symbol; |
|
4788 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4789 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4790 function_type_prefix = return_type_symbol; |
|
4791 break; |
|
4792 |
|
4793 } |
|
4794 |
|
4795 |
|
4796 ERROR; |
|
4797 } |
|
4798 |
|
4799 }/*function_tod_to_udint*/ |
|
4800 break; |
|
4801 |
|
4802 /**** |
|
4803 *TOD_TO_WORD |
|
4804 */ |
|
4805 case function_tod_to_word : |
|
4806 { |
|
4807 symbol_c *last_type_symbol = NULL; |
|
4808 |
|
4809 { |
|
4810 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4812 symbol_c *IN_param_value = &this->default_variable_name; |
|
4813 |
|
4814 symbol_c *IN_type_symbol = param_data_type; |
|
4815 last_type_symbol = param_data_type; |
|
4816 |
|
4817 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4818 { |
|
4819 |
|
4820 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4821 |
|
4822 if (IN_type_symbol == NULL) |
|
4823 IN_type_symbol = last_type_symbol; |
|
4824 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4825 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4826 function_type_prefix = return_type_symbol; |
|
4827 break; |
|
4828 |
|
4829 } |
|
4830 |
|
4831 |
|
4832 ERROR; |
|
4833 } |
|
4834 |
|
4835 }/*function_tod_to_word*/ |
|
4836 break; |
|
4837 |
|
4838 /**** |
|
4839 *TOD_TO_STRING |
|
4840 */ |
|
4841 case function_tod_to_string : |
|
4842 { |
|
4843 symbol_c *last_type_symbol = NULL; |
|
4844 |
|
4845 { |
|
4846 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4847 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4848 symbol_c *IN_param_value = &this->default_variable_name; |
|
4849 |
|
4850 symbol_c *IN_type_symbol = param_data_type; |
|
4851 last_type_symbol = param_data_type; |
|
4852 |
|
4853 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4854 { |
|
4855 |
|
4856 function_name = (symbol_c*)(new pragma_c("__tod_to_string")); |
|
4857 |
|
4858 if (IN_type_symbol == NULL) |
|
4859 IN_type_symbol = last_type_symbol; |
|
4860 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4861 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4862 function_type_prefix = return_type_symbol; |
|
4863 break; |
|
4864 |
|
4865 } |
|
4866 |
|
4867 |
|
4868 ERROR; |
|
4869 } |
|
4870 |
|
4871 }/*function_tod_to_string*/ |
|
4872 break; |
|
4873 |
|
4874 /**** |
|
4875 *TOD_TO_LWORD |
|
4876 */ |
|
4877 case function_tod_to_lword : |
|
4878 { |
|
4879 symbol_c *last_type_symbol = NULL; |
|
4880 |
|
4881 { |
|
4882 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4883 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4884 symbol_c *IN_param_value = &this->default_variable_name; |
|
4885 |
|
4886 symbol_c *IN_type_symbol = param_data_type; |
|
4887 last_type_symbol = param_data_type; |
|
4888 |
|
4889 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4890 { |
|
4891 |
|
4892 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4893 |
|
4894 if (IN_type_symbol == NULL) |
|
4895 IN_type_symbol = last_type_symbol; |
|
4896 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4897 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4898 function_type_prefix = return_type_symbol; |
|
4899 break; |
|
4900 |
|
4901 } |
|
4902 |
|
4903 |
|
4904 ERROR; |
|
4905 } |
|
4906 |
|
4907 }/*function_tod_to_lword*/ |
|
4908 break; |
|
4909 |
|
4910 /**** |
|
4911 *TOD_TO_UINT |
|
4912 */ |
|
4913 case function_tod_to_uint : |
|
4914 { |
|
4915 symbol_c *last_type_symbol = NULL; |
|
4916 |
|
4917 { |
|
4918 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4919 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4920 symbol_c *IN_param_value = &this->default_variable_name; |
|
4921 |
|
4922 symbol_c *IN_type_symbol = param_data_type; |
|
4923 last_type_symbol = param_data_type; |
|
4924 |
|
4925 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4926 { |
|
4927 |
|
4928 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4929 |
|
4930 if (IN_type_symbol == NULL) |
|
4931 IN_type_symbol = last_type_symbol; |
|
4932 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4933 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4934 function_type_prefix = return_type_symbol; |
|
4935 break; |
|
4936 |
|
4937 } |
|
4938 |
|
4939 |
|
4940 ERROR; |
|
4941 } |
|
4942 |
|
4943 }/*function_tod_to_uint*/ |
|
4944 break; |
|
4945 |
|
4946 /**** |
|
4947 *TOD_TO_LREAL |
|
4948 */ |
|
4949 case function_tod_to_lreal : |
|
4950 { |
|
4951 symbol_c *last_type_symbol = NULL; |
|
4952 |
|
4953 { |
|
4954 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4962 { |
|
4963 |
|
4964 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4965 |
|
4966 if (IN_type_symbol == NULL) |
|
4967 IN_type_symbol = last_type_symbol; |
|
4968 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4969 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4970 function_type_prefix = return_type_symbol; |
|
4971 break; |
|
4972 |
|
4973 } |
|
4974 |
|
4975 |
|
4976 ERROR; |
|
4977 } |
|
4978 |
|
4979 }/*function_tod_to_lreal*/ |
|
4980 break; |
|
4981 |
|
4982 /**** |
|
4983 *TOD_TO_BYTE |
|
4984 */ |
|
4985 case function_tod_to_byte : |
|
4986 { |
|
4987 symbol_c *last_type_symbol = NULL; |
|
4988 |
|
4989 { |
|
4990 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
4991 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4992 symbol_c *IN_param_value = &this->default_variable_name; |
|
4993 |
|
4994 symbol_c *IN_type_symbol = param_data_type; |
|
4995 last_type_symbol = param_data_type; |
|
4996 |
|
4997 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4998 { |
|
4999 |
|
5000 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5001 |
|
5002 if (IN_type_symbol == NULL) |
|
5003 IN_type_symbol = last_type_symbol; |
|
5004 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5005 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5006 function_type_prefix = return_type_symbol; |
|
5007 break; |
|
5008 |
|
5009 } |
|
5010 |
|
5011 |
|
5012 ERROR; |
|
5013 } |
|
5014 |
|
5015 }/*function_tod_to_byte*/ |
|
5016 break; |
|
5017 |
|
5018 /**** |
|
5019 *TOD_TO_USINT |
|
5020 */ |
|
5021 case function_tod_to_usint : |
|
5022 { |
|
5023 symbol_c *last_type_symbol = NULL; |
|
5024 |
|
5025 { |
|
5026 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5027 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5028 symbol_c *IN_param_value = &this->default_variable_name; |
|
5029 |
|
5030 symbol_c *IN_type_symbol = param_data_type; |
|
5031 last_type_symbol = param_data_type; |
|
5032 |
|
5033 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5034 { |
|
5035 |
|
5036 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5037 |
|
5038 if (IN_type_symbol == NULL) |
|
5039 IN_type_symbol = last_type_symbol; |
|
5040 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5041 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5042 function_type_prefix = return_type_symbol; |
|
5043 break; |
|
5044 |
|
5045 } |
|
5046 |
|
5047 |
|
5048 ERROR; |
|
5049 } |
|
5050 |
|
5051 }/*function_tod_to_usint*/ |
|
5052 break; |
|
5053 |
|
5054 /**** |
|
5055 *TOD_TO_ULINT |
|
5056 */ |
|
5057 case function_tod_to_ulint : |
|
5058 { |
|
5059 symbol_c *last_type_symbol = NULL; |
|
5060 |
|
5061 { |
|
5062 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5063 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5064 symbol_c *IN_param_value = &this->default_variable_name; |
|
5065 |
|
5066 symbol_c *IN_type_symbol = param_data_type; |
|
5067 last_type_symbol = param_data_type; |
|
5068 |
|
5069 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5070 { |
|
5071 |
|
5072 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5073 |
|
5074 if (IN_type_symbol == NULL) |
|
5075 IN_type_symbol = last_type_symbol; |
|
5076 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5077 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5078 function_type_prefix = return_type_symbol; |
|
5079 break; |
|
5080 |
|
5081 } |
|
5082 |
|
5083 |
|
5084 ERROR; |
|
5085 } |
|
5086 |
|
5087 }/*function_tod_to_ulint*/ |
|
5088 break; |
|
5089 |
|
5090 /**** |
|
5091 *TOD_TO_INT |
|
5092 */ |
|
5093 case function_tod_to_int : |
|
5094 { |
|
5095 symbol_c *last_type_symbol = NULL; |
|
5096 |
|
5097 { |
|
5098 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5099 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5100 symbol_c *IN_param_value = &this->default_variable_name; |
|
5101 |
|
5102 symbol_c *IN_type_symbol = param_data_type; |
|
5103 last_type_symbol = param_data_type; |
|
5104 |
|
5105 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
5106 { |
|
5107 |
|
5108 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5109 |
|
5110 if (IN_type_symbol == NULL) |
|
5111 IN_type_symbol = last_type_symbol; |
|
5112 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5113 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5114 function_type_prefix = return_type_symbol; |
|
5115 break; |
|
5116 |
|
5117 } |
|
5118 |
|
5119 |
|
5120 ERROR; |
|
5121 } |
|
5122 |
|
5123 }/*function_tod_to_int*/ |
|
5124 break; |
|
5125 |
|
5126 /**** |
|
5127 *UDINT_TO_REAL |
|
5128 */ |
|
5129 case function_udint_to_real : |
|
5130 { |
|
5131 symbol_c *last_type_symbol = NULL; |
|
5132 |
|
5133 { |
|
5134 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5136 symbol_c *IN_param_value = &this->default_variable_name; |
|
5137 |
|
5138 symbol_c *IN_type_symbol = param_data_type; |
|
5139 last_type_symbol = param_data_type; |
|
5140 |
|
5141 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5142 { |
|
5143 |
|
5144 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5145 |
|
5146 if (IN_type_symbol == NULL) |
|
5147 IN_type_symbol = last_type_symbol; |
|
5148 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5149 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5150 function_type_prefix = return_type_symbol; |
|
5151 function_type_suffix = IN_type_symbol; |
|
5152 break; |
|
5153 |
|
5154 } |
|
5155 |
|
5156 |
|
5157 ERROR; |
|
5158 } |
|
5159 |
|
5160 }/*function_udint_to_real*/ |
|
5161 break; |
|
5162 |
|
5163 /**** |
|
5164 *UDINT_TO_SINT |
|
5165 */ |
|
5166 case function_udint_to_sint : |
|
5167 { |
|
5168 symbol_c *last_type_symbol = NULL; |
|
5169 |
|
5170 { |
|
5171 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5172 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5173 symbol_c *IN_param_value = &this->default_variable_name; |
|
5174 |
|
5175 symbol_c *IN_type_symbol = param_data_type; |
|
5176 last_type_symbol = param_data_type; |
|
5177 |
|
5178 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5179 { |
|
5180 |
|
5181 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5182 |
|
5183 if (IN_type_symbol == NULL) |
|
5184 IN_type_symbol = last_type_symbol; |
|
5185 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5186 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5187 function_type_prefix = return_type_symbol; |
|
5188 function_type_suffix = IN_type_symbol; |
|
5189 break; |
|
5190 |
|
5191 } |
|
5192 |
|
5193 |
|
5194 ERROR; |
|
5195 } |
|
5196 |
|
5197 }/*function_udint_to_sint*/ |
|
5198 break; |
|
5199 |
|
5200 /**** |
|
5201 *UDINT_TO_LINT |
|
5202 */ |
|
5203 case function_udint_to_lint : |
|
5204 { |
|
5205 symbol_c *last_type_symbol = NULL; |
|
5206 |
|
5207 { |
|
5208 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5209 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5210 symbol_c *IN_param_value = &this->default_variable_name; |
|
5211 |
|
5212 symbol_c *IN_type_symbol = param_data_type; |
|
5213 last_type_symbol = param_data_type; |
|
5214 |
|
5215 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5216 { |
|
5217 |
|
5218 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5219 |
|
5220 if (IN_type_symbol == NULL) |
|
5221 IN_type_symbol = last_type_symbol; |
|
5222 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5223 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5224 function_type_prefix = return_type_symbol; |
|
5225 function_type_suffix = IN_type_symbol; |
|
5226 break; |
|
5227 |
|
5228 } |
|
5229 |
|
5230 |
|
5231 ERROR; |
|
5232 } |
|
5233 |
|
5234 }/*function_udint_to_lint*/ |
|
5235 break; |
|
5236 |
|
5237 /**** |
|
5238 *UDINT_TO_DINT |
|
5239 */ |
|
5240 case function_udint_to_dint : |
|
5241 { |
|
5242 symbol_c *last_type_symbol = NULL; |
|
5243 |
|
5244 { |
|
5245 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5246 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5247 symbol_c *IN_param_value = &this->default_variable_name; |
|
5248 |
|
5249 symbol_c *IN_type_symbol = param_data_type; |
|
5250 last_type_symbol = param_data_type; |
|
5251 |
|
5252 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5253 { |
|
5254 |
|
5255 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5256 |
|
5257 if (IN_type_symbol == NULL) |
|
5258 IN_type_symbol = last_type_symbol; |
|
5259 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5260 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5261 function_type_prefix = return_type_symbol; |
|
5262 function_type_suffix = IN_type_symbol; |
|
5263 break; |
|
5264 |
|
5265 } |
|
5266 |
|
5267 |
|
5268 ERROR; |
|
5269 } |
|
5270 |
|
5271 }/*function_udint_to_dint*/ |
|
5272 break; |
|
5273 |
|
5274 /**** |
|
5275 *UDINT_TO_DATE |
|
5276 */ |
|
5277 case function_udint_to_date : |
|
5278 { |
|
5279 symbol_c *last_type_symbol = NULL; |
|
5280 |
|
5281 { |
|
5282 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5283 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5284 symbol_c *IN_param_value = &this->default_variable_name; |
|
5285 |
|
5286 symbol_c *IN_type_symbol = param_data_type; |
|
5287 last_type_symbol = param_data_type; |
|
5288 |
|
5289 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5290 { |
|
5291 |
|
5292 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5293 |
|
5294 if (IN_type_symbol == NULL) |
|
5295 IN_type_symbol = last_type_symbol; |
|
5296 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5297 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5298 function_type_prefix = return_type_symbol; |
|
5299 break; |
|
5300 |
|
5301 } |
|
5302 |
|
5303 |
|
5304 ERROR; |
|
5305 } |
|
5306 |
|
5307 }/*function_udint_to_date*/ |
|
5308 break; |
|
5309 |
|
5310 /**** |
|
5311 *UDINT_TO_DWORD |
|
5312 */ |
|
5313 case function_udint_to_dword : |
|
5314 { |
|
5315 symbol_c *last_type_symbol = NULL; |
|
5316 |
|
5317 { |
|
5318 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5319 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5320 symbol_c *IN_param_value = &this->default_variable_name; |
|
5321 |
|
5322 symbol_c *IN_type_symbol = param_data_type; |
|
5323 last_type_symbol = param_data_type; |
|
5324 |
|
5325 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5326 { |
|
5327 |
|
5328 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5329 |
|
5330 if (IN_type_symbol == NULL) |
|
5331 IN_type_symbol = last_type_symbol; |
|
5332 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5333 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5334 function_type_prefix = return_type_symbol; |
|
5335 function_type_suffix = IN_type_symbol; |
|
5336 break; |
|
5337 |
|
5338 } |
|
5339 |
|
5340 |
|
5341 ERROR; |
|
5342 } |
|
5343 |
|
5344 }/*function_udint_to_dword*/ |
|
5345 break; |
|
5346 |
|
5347 /**** |
|
5348 *UDINT_TO_DT |
|
5349 */ |
|
5350 case function_udint_to_dt : |
|
5351 { |
|
5352 symbol_c *last_type_symbol = NULL; |
|
5353 |
|
5354 { |
|
5355 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5356 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5357 symbol_c *IN_param_value = &this->default_variable_name; |
|
5358 |
|
5359 symbol_c *IN_type_symbol = param_data_type; |
|
5360 last_type_symbol = param_data_type; |
|
5361 |
|
5362 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5363 { |
|
5364 |
|
5365 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5366 |
|
5367 if (IN_type_symbol == NULL) |
|
5368 IN_type_symbol = last_type_symbol; |
|
5369 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5370 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5371 function_type_prefix = return_type_symbol; |
|
5372 break; |
|
5373 |
|
5374 } |
|
5375 |
|
5376 |
|
5377 ERROR; |
|
5378 } |
|
5379 |
|
5380 }/*function_udint_to_dt*/ |
|
5381 break; |
|
5382 |
|
5383 /**** |
|
5384 *UDINT_TO_TOD |
|
5385 */ |
|
5386 case function_udint_to_tod : |
|
5387 { |
|
5388 symbol_c *last_type_symbol = NULL; |
|
5389 |
|
5390 { |
|
5391 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5392 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5393 symbol_c *IN_param_value = &this->default_variable_name; |
|
5394 |
|
5395 symbol_c *IN_type_symbol = param_data_type; |
|
5396 last_type_symbol = param_data_type; |
|
5397 |
|
5398 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5399 { |
|
5400 |
|
5401 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5402 |
|
5403 if (IN_type_symbol == NULL) |
|
5404 IN_type_symbol = last_type_symbol; |
|
5405 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5406 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5407 function_type_prefix = return_type_symbol; |
|
5408 break; |
|
5409 |
|
5410 } |
|
5411 |
|
5412 |
|
5413 ERROR; |
|
5414 } |
|
5415 |
|
5416 }/*function_udint_to_tod*/ |
|
5417 break; |
|
5418 |
|
5419 /**** |
|
5420 *UDINT_TO_WORD |
|
5421 */ |
|
5422 case function_udint_to_word : |
|
5423 { |
|
5424 symbol_c *last_type_symbol = NULL; |
|
5425 |
|
5426 { |
|
5427 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5428 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5429 symbol_c *IN_param_value = &this->default_variable_name; |
|
5430 |
|
5431 symbol_c *IN_type_symbol = param_data_type; |
|
5432 last_type_symbol = param_data_type; |
|
5433 |
|
5434 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5435 { |
|
5436 |
|
5437 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5438 |
|
5439 if (IN_type_symbol == NULL) |
|
5440 IN_type_symbol = last_type_symbol; |
|
5441 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5442 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
5443 function_type_prefix = return_type_symbol; |
|
5444 function_type_suffix = IN_type_symbol; |
|
5445 break; |
|
5446 |
|
5447 } |
|
5448 |
|
5449 |
|
5450 ERROR; |
|
5451 } |
|
5452 |
|
5453 }/*function_udint_to_word*/ |
|
5454 break; |
|
5455 |
|
5456 /**** |
|
5457 *UDINT_TO_STRING |
|
5458 */ |
|
5459 case function_udint_to_string : |
|
5460 { |
|
5461 symbol_c *last_type_symbol = NULL; |
|
5462 |
|
5463 { |
|
5464 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5465 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5466 symbol_c *IN_param_value = &this->default_variable_name; |
|
5467 |
|
5468 symbol_c *IN_type_symbol = param_data_type; |
|
5469 last_type_symbol = param_data_type; |
|
5470 |
|
5471 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5472 { |
|
5473 |
|
5474 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
5475 |
|
5476 if (IN_type_symbol == NULL) |
|
5477 IN_type_symbol = last_type_symbol; |
|
5478 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5479 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5480 function_type_prefix = return_type_symbol; |
|
5481 break; |
|
5482 |
|
5483 } |
|
5484 |
|
5485 |
|
5486 ERROR; |
|
5487 } |
|
5488 |
|
5489 }/*function_udint_to_string*/ |
|
5490 break; |
|
5491 |
|
5492 /**** |
|
5493 *UDINT_TO_LWORD |
|
5494 */ |
|
5495 case function_udint_to_lword : |
|
5496 { |
|
5497 symbol_c *last_type_symbol = NULL; |
|
5498 |
|
5499 { |
|
5500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5502 symbol_c *IN_param_value = &this->default_variable_name; |
|
5503 |
|
5504 symbol_c *IN_type_symbol = param_data_type; |
|
5505 last_type_symbol = param_data_type; |
|
5506 |
|
5507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5508 { |
|
5509 |
|
5510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5511 |
|
5512 if (IN_type_symbol == NULL) |
|
5513 IN_type_symbol = last_type_symbol; |
|
5514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5515 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5516 function_type_prefix = return_type_symbol; |
|
5517 function_type_suffix = IN_type_symbol; |
|
5518 break; |
|
5519 |
|
5520 } |
|
5521 |
|
5522 |
|
5523 ERROR; |
|
5524 } |
|
5525 |
|
5526 }/*function_udint_to_lword*/ |
|
5527 break; |
|
5528 |
|
5529 /**** |
|
5530 *UDINT_TO_UINT |
|
5531 */ |
|
5532 case function_udint_to_uint : |
|
5533 { |
|
5534 symbol_c *last_type_symbol = NULL; |
|
5535 |
|
5536 { |
|
5537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5539 symbol_c *IN_param_value = &this->default_variable_name; |
|
5540 |
|
5541 symbol_c *IN_type_symbol = param_data_type; |
|
5542 last_type_symbol = param_data_type; |
|
5543 |
|
5544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5545 { |
|
5546 |
|
5547 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5548 |
|
5549 if (IN_type_symbol == NULL) |
|
5550 IN_type_symbol = last_type_symbol; |
|
5551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5552 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5553 function_type_prefix = return_type_symbol; |
|
5554 function_type_suffix = IN_type_symbol; |
|
5555 break; |
|
5556 |
|
5557 } |
|
5558 |
|
5559 |
|
5560 ERROR; |
|
5561 } |
|
5562 |
|
5563 }/*function_udint_to_uint*/ |
|
5564 break; |
|
5565 |
|
5566 /**** |
|
5567 *UDINT_TO_LREAL |
|
5568 */ |
|
5569 case function_udint_to_lreal : |
|
5570 { |
|
5571 symbol_c *last_type_symbol = NULL; |
|
5572 |
|
5573 { |
|
5574 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5576 symbol_c *IN_param_value = &this->default_variable_name; |
|
5577 |
|
5578 symbol_c *IN_type_symbol = param_data_type; |
|
5579 last_type_symbol = param_data_type; |
|
5580 |
|
5581 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5582 { |
|
5583 |
|
5584 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5585 |
|
5586 if (IN_type_symbol == NULL) |
|
5587 IN_type_symbol = last_type_symbol; |
|
5588 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5589 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5590 function_type_prefix = return_type_symbol; |
|
5591 function_type_suffix = IN_type_symbol; |
|
5592 break; |
|
5593 |
|
5594 } |
|
5595 |
|
5596 |
|
5597 ERROR; |
|
5598 } |
|
5599 |
|
5600 }/*function_udint_to_lreal*/ |
|
5601 break; |
|
5602 |
|
5603 /**** |
|
5604 *UDINT_TO_BYTE |
|
5605 */ |
|
5606 case function_udint_to_byte : |
|
5607 { |
|
5608 symbol_c *last_type_symbol = NULL; |
|
5609 |
|
5610 { |
|
5611 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5612 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5613 symbol_c *IN_param_value = &this->default_variable_name; |
|
5614 |
|
5615 symbol_c *IN_type_symbol = param_data_type; |
|
5616 last_type_symbol = param_data_type; |
|
5617 |
|
5618 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5619 { |
|
5620 |
|
5621 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5622 |
|
5623 if (IN_type_symbol == NULL) |
|
5624 IN_type_symbol = last_type_symbol; |
|
5625 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5626 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5627 function_type_prefix = return_type_symbol; |
|
5628 function_type_suffix = IN_type_symbol; |
|
5629 break; |
|
5630 |
|
5631 } |
|
5632 |
|
5633 |
|
5634 ERROR; |
|
5635 } |
|
5636 |
|
5637 }/*function_udint_to_byte*/ |
|
5638 break; |
|
5639 |
|
5640 /**** |
|
5641 *UDINT_TO_USINT |
|
5642 */ |
|
5643 case function_udint_to_usint : |
|
5644 { |
|
5645 symbol_c *last_type_symbol = NULL; |
|
5646 |
|
5647 { |
|
5648 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5649 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5650 symbol_c *IN_param_value = &this->default_variable_name; |
|
5651 |
|
5652 symbol_c *IN_type_symbol = param_data_type; |
|
5653 last_type_symbol = param_data_type; |
|
5654 |
|
5655 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5656 { |
|
5657 |
|
5658 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5659 |
|
5660 if (IN_type_symbol == NULL) |
|
5661 IN_type_symbol = last_type_symbol; |
|
5662 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5663 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5664 function_type_prefix = return_type_symbol; |
|
5665 function_type_suffix = IN_type_symbol; |
|
5666 break; |
|
5667 |
|
5668 } |
|
5669 |
|
5670 |
|
5671 ERROR; |
|
5672 } |
|
5673 |
|
5674 }/*function_udint_to_usint*/ |
|
5675 break; |
|
5676 |
|
5677 /**** |
|
5678 *UDINT_TO_ULINT |
|
5679 */ |
|
5680 case function_udint_to_ulint : |
|
5681 { |
|
5682 symbol_c *last_type_symbol = NULL; |
|
5683 |
|
5684 { |
|
5685 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5687 symbol_c *IN_param_value = &this->default_variable_name; |
|
5688 |
|
5689 symbol_c *IN_type_symbol = param_data_type; |
|
5690 last_type_symbol = param_data_type; |
|
5691 |
|
5692 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5693 { |
|
5694 |
|
5695 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5696 |
|
5697 if (IN_type_symbol == NULL) |
|
5698 IN_type_symbol = last_type_symbol; |
|
5699 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5700 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5701 function_type_prefix = return_type_symbol; |
|
5702 function_type_suffix = IN_type_symbol; |
|
5703 break; |
|
5704 |
|
5705 } |
|
5706 |
|
5707 |
|
5708 ERROR; |
|
5709 } |
|
5710 |
|
5711 }/*function_udint_to_ulint*/ |
|
5712 break; |
|
5713 |
|
5714 /**** |
|
5715 *UDINT_TO_BOOL |
|
5716 */ |
|
5717 case function_udint_to_bool : |
|
5718 { |
|
5719 symbol_c *last_type_symbol = NULL; |
|
5720 |
|
5721 { |
|
5722 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5723 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5724 symbol_c *IN_param_value = &this->default_variable_name; |
|
5725 |
|
5726 symbol_c *IN_type_symbol = param_data_type; |
|
5727 last_type_symbol = param_data_type; |
|
5728 |
|
5729 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5730 { |
|
5731 |
|
5732 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5733 |
|
5734 if (IN_type_symbol == NULL) |
|
5735 IN_type_symbol = last_type_symbol; |
|
5736 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5737 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
5738 function_type_prefix = return_type_symbol; |
|
5739 function_type_suffix = IN_type_symbol; |
|
5740 break; |
|
5741 |
|
5742 } |
|
5743 |
|
5744 |
|
5745 ERROR; |
|
5746 } |
|
5747 |
|
5748 }/*function_udint_to_bool*/ |
|
5749 break; |
|
5750 |
|
5751 /**** |
|
5752 *UDINT_TO_TIME |
|
5753 */ |
|
5754 case function_udint_to_time : |
|
5755 { |
|
5756 symbol_c *last_type_symbol = NULL; |
|
5757 |
|
5758 { |
|
5759 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5761 symbol_c *IN_param_value = &this->default_variable_name; |
|
5762 |
|
5763 symbol_c *IN_type_symbol = param_data_type; |
|
5764 last_type_symbol = param_data_type; |
|
5765 |
|
5766 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5767 { |
|
5768 |
|
5769 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5770 |
|
5771 if (IN_type_symbol == NULL) |
|
5772 IN_type_symbol = last_type_symbol; |
|
5773 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5774 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5775 function_type_prefix = return_type_symbol; |
|
5776 break; |
|
5777 |
|
5778 } |
|
5779 |
|
5780 |
|
5781 ERROR; |
|
5782 } |
|
5783 |
|
5784 }/*function_udint_to_time*/ |
|
5785 break; |
|
5786 |
|
5787 /**** |
|
5788 *UDINT_TO_INT |
|
5789 */ |
|
5790 case function_udint_to_int : |
|
5791 { |
|
5792 symbol_c *last_type_symbol = NULL; |
|
5793 |
|
5794 { |
|
5795 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5797 symbol_c *IN_param_value = &this->default_variable_name; |
|
5798 |
|
5799 symbol_c *IN_type_symbol = param_data_type; |
|
5800 last_type_symbol = param_data_type; |
|
5801 |
|
5802 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5803 { |
|
5804 |
|
5805 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5806 |
|
5807 if (IN_type_symbol == NULL) |
|
5808 IN_type_symbol = last_type_symbol; |
|
5809 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5810 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5811 function_type_prefix = return_type_symbol; |
|
5812 function_type_suffix = IN_type_symbol; |
|
5813 break; |
|
5814 |
|
5815 } |
|
5816 |
|
5817 |
|
5818 ERROR; |
|
5819 } |
|
5820 |
|
5821 }/*function_udint_to_int*/ |
|
5822 break; |
|
5823 |
|
5824 /**** |
|
5825 *WORD_TO_REAL |
|
5826 */ |
|
5827 case function_word_to_real : |
|
5828 { |
|
5829 symbol_c *last_type_symbol = NULL; |
|
5830 |
|
5831 { |
|
5832 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5833 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5834 symbol_c *IN_param_value = &this->default_variable_name; |
|
5835 |
|
5836 symbol_c *IN_type_symbol = param_data_type; |
|
5837 last_type_symbol = param_data_type; |
|
5838 |
|
5839 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5840 { |
|
5841 |
|
5842 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5843 |
|
5844 if (IN_type_symbol == NULL) |
|
5845 IN_type_symbol = last_type_symbol; |
|
5846 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5847 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5848 function_type_prefix = return_type_symbol; |
|
5849 function_type_suffix = IN_type_symbol; |
|
5850 break; |
|
5851 |
|
5852 } |
|
5853 |
|
5854 |
|
5855 ERROR; |
|
5856 } |
|
5857 |
|
5858 }/*function_word_to_real*/ |
|
5859 break; |
|
5860 |
|
5861 /**** |
|
5862 *WORD_TO_SINT |
|
5863 */ |
|
5864 case function_word_to_sint : |
|
5865 { |
|
5866 symbol_c *last_type_symbol = NULL; |
|
5867 |
|
5868 { |
|
5869 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5871 symbol_c *IN_param_value = &this->default_variable_name; |
|
5872 |
|
5873 symbol_c *IN_type_symbol = param_data_type; |
|
5874 last_type_symbol = param_data_type; |
|
5875 |
|
5876 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5877 { |
|
5878 |
|
5879 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5880 |
|
5881 if (IN_type_symbol == NULL) |
|
5882 IN_type_symbol = last_type_symbol; |
|
5883 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5884 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5885 function_type_prefix = return_type_symbol; |
|
5886 function_type_suffix = IN_type_symbol; |
|
5887 break; |
|
5888 |
|
5889 } |
|
5890 |
|
5891 |
|
5892 ERROR; |
|
5893 } |
|
5894 |
|
5895 }/*function_word_to_sint*/ |
|
5896 break; |
|
5897 |
|
5898 /**** |
|
5899 *WORD_TO_LINT |
|
5900 */ |
|
5901 case function_word_to_lint : |
|
5902 { |
|
5903 symbol_c *last_type_symbol = NULL; |
|
5904 |
|
5905 { |
|
5906 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5908 symbol_c *IN_param_value = &this->default_variable_name; |
|
5909 |
|
5910 symbol_c *IN_type_symbol = param_data_type; |
|
5911 last_type_symbol = param_data_type; |
|
5912 |
|
5913 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5914 { |
|
5915 |
|
5916 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5917 |
|
5918 if (IN_type_symbol == NULL) |
|
5919 IN_type_symbol = last_type_symbol; |
|
5920 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5921 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5922 function_type_prefix = return_type_symbol; |
|
5923 function_type_suffix = IN_type_symbol; |
|
5924 break; |
|
5925 |
|
5926 } |
|
5927 |
|
5928 |
|
5929 ERROR; |
|
5930 } |
|
5931 |
|
5932 }/*function_word_to_lint*/ |
|
5933 break; |
|
5934 |
|
5935 /**** |
|
5936 *WORD_TO_DINT |
|
5937 */ |
|
5938 case function_word_to_dint : |
|
5939 { |
|
5940 symbol_c *last_type_symbol = NULL; |
|
5941 |
|
5942 { |
|
5943 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5944 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5945 symbol_c *IN_param_value = &this->default_variable_name; |
|
5946 |
|
5947 symbol_c *IN_type_symbol = param_data_type; |
|
5948 last_type_symbol = param_data_type; |
|
5949 |
|
5950 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5951 { |
|
5952 |
|
5953 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
5954 |
|
5955 if (IN_type_symbol == NULL) |
|
5956 IN_type_symbol = last_type_symbol; |
|
5957 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5958 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5959 function_type_prefix = return_type_symbol; |
|
5960 function_type_suffix = IN_type_symbol; |
|
5961 break; |
|
5962 |
|
5963 } |
|
5964 |
|
5965 |
|
5966 ERROR; |
|
5967 } |
|
5968 |
|
5969 }/*function_word_to_dint*/ |
|
5970 break; |
|
5971 |
|
5972 /**** |
|
5973 *WORD_TO_DATE |
|
5974 */ |
|
5975 case function_word_to_date : |
|
5976 { |
|
5977 symbol_c *last_type_symbol = NULL; |
|
5978 |
|
5979 { |
|
5980 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
5981 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5982 symbol_c *IN_param_value = &this->default_variable_name; |
|
5983 |
|
5984 symbol_c *IN_type_symbol = param_data_type; |
|
5985 last_type_symbol = param_data_type; |
|
5986 |
|
5987 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5988 { |
|
5989 |
|
5990 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5991 |
|
5992 if (IN_type_symbol == NULL) |
|
5993 IN_type_symbol = last_type_symbol; |
|
5994 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5995 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5996 function_type_prefix = return_type_symbol; |
|
5997 break; |
|
5998 |
|
5999 } |
|
6000 |
|
6001 |
|
6002 ERROR; |
|
6003 } |
|
6004 |
|
6005 }/*function_word_to_date*/ |
|
6006 break; |
|
6007 |
|
6008 /**** |
|
6009 *WORD_TO_DWORD |
|
6010 */ |
|
6011 case function_word_to_dword : |
|
6012 { |
|
6013 symbol_c *last_type_symbol = NULL; |
|
6014 |
|
6015 { |
|
6016 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6017 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6018 symbol_c *IN_param_value = &this->default_variable_name; |
|
6019 |
|
6020 symbol_c *IN_type_symbol = param_data_type; |
|
6021 last_type_symbol = param_data_type; |
|
6022 |
|
6023 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6024 { |
|
6025 |
|
6026 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6027 |
|
6028 if (IN_type_symbol == NULL) |
|
6029 IN_type_symbol = last_type_symbol; |
|
6030 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6031 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6032 function_type_prefix = return_type_symbol; |
|
6033 function_type_suffix = IN_type_symbol; |
|
6034 break; |
|
6035 |
|
6036 } |
|
6037 |
|
6038 |
|
6039 ERROR; |
|
6040 } |
|
6041 |
|
6042 }/*function_word_to_dword*/ |
|
6043 break; |
|
6044 |
|
6045 /**** |
|
6046 *WORD_TO_DT |
|
6047 */ |
|
6048 case function_word_to_dt : |
|
6049 { |
|
6050 symbol_c *last_type_symbol = NULL; |
|
6051 |
|
6052 { |
|
6053 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6061 { |
|
6062 |
|
6063 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6064 |
|
6065 if (IN_type_symbol == NULL) |
|
6066 IN_type_symbol = last_type_symbol; |
|
6067 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6068 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6069 function_type_prefix = return_type_symbol; |
|
6070 break; |
|
6071 |
|
6072 } |
|
6073 |
|
6074 |
|
6075 ERROR; |
|
6076 } |
|
6077 |
|
6078 }/*function_word_to_dt*/ |
|
6079 break; |
|
6080 |
|
6081 /**** |
|
6082 *WORD_TO_TOD |
|
6083 */ |
|
6084 case function_word_to_tod : |
|
6085 { |
|
6086 symbol_c *last_type_symbol = NULL; |
|
6087 |
|
6088 { |
|
6089 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6090 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6091 symbol_c *IN_param_value = &this->default_variable_name; |
|
6092 |
|
6093 symbol_c *IN_type_symbol = param_data_type; |
|
6094 last_type_symbol = param_data_type; |
|
6095 |
|
6096 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6097 { |
|
6098 |
|
6099 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6100 |
|
6101 if (IN_type_symbol == NULL) |
|
6102 IN_type_symbol = last_type_symbol; |
|
6103 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6104 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6105 function_type_prefix = return_type_symbol; |
|
6106 break; |
|
6107 |
|
6108 } |
|
6109 |
|
6110 |
|
6111 ERROR; |
|
6112 } |
|
6113 |
|
6114 }/*function_word_to_tod*/ |
|
6115 break; |
|
6116 |
|
6117 /**** |
|
6118 *WORD_TO_UDINT |
|
6119 */ |
|
6120 case function_word_to_udint : |
|
6121 { |
|
6122 symbol_c *last_type_symbol = NULL; |
|
6123 |
|
6124 { |
|
6125 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6127 symbol_c *IN_param_value = &this->default_variable_name; |
|
6128 |
|
6129 symbol_c *IN_type_symbol = param_data_type; |
|
6130 last_type_symbol = param_data_type; |
|
6131 |
|
6132 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6133 { |
|
6134 |
|
6135 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6136 |
|
6137 if (IN_type_symbol == NULL) |
|
6138 IN_type_symbol = last_type_symbol; |
|
6139 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6140 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6141 function_type_prefix = return_type_symbol; |
|
6142 function_type_suffix = IN_type_symbol; |
|
6143 break; |
|
6144 |
|
6145 } |
|
6146 |
|
6147 |
|
6148 ERROR; |
|
6149 } |
|
6150 |
|
6151 }/*function_word_to_udint*/ |
|
6152 break; |
|
6153 |
|
6154 /**** |
|
6155 *WORD_TO_STRING |
|
6156 */ |
|
6157 case function_word_to_string : |
|
6158 { |
|
6159 symbol_c *last_type_symbol = NULL; |
|
6160 |
|
6161 { |
|
6162 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6164 symbol_c *IN_param_value = &this->default_variable_name; |
|
6165 |
|
6166 symbol_c *IN_type_symbol = param_data_type; |
|
6167 last_type_symbol = param_data_type; |
|
6168 |
|
6169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6170 { |
|
6171 |
|
6172 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
6173 |
|
6174 if (IN_type_symbol == NULL) |
|
6175 IN_type_symbol = last_type_symbol; |
|
6176 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6177 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6178 function_type_prefix = return_type_symbol; |
|
6179 break; |
|
6180 |
|
6181 } |
|
6182 |
|
6183 |
|
6184 ERROR; |
|
6185 } |
|
6186 |
|
6187 }/*function_word_to_string*/ |
|
6188 break; |
|
6189 |
|
6190 /**** |
|
6191 *WORD_TO_LWORD |
|
6192 */ |
|
6193 case function_word_to_lword : |
|
6194 { |
|
6195 symbol_c *last_type_symbol = NULL; |
|
6196 |
|
6197 { |
|
6198 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6200 symbol_c *IN_param_value = &this->default_variable_name; |
|
6201 |
|
6202 symbol_c *IN_type_symbol = param_data_type; |
|
6203 last_type_symbol = param_data_type; |
|
6204 |
|
6205 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6206 { |
|
6207 |
|
6208 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6209 |
|
6210 if (IN_type_symbol == NULL) |
|
6211 IN_type_symbol = last_type_symbol; |
|
6212 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6213 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6214 function_type_prefix = return_type_symbol; |
|
6215 function_type_suffix = IN_type_symbol; |
|
6216 break; |
|
6217 |
|
6218 } |
|
6219 |
|
6220 |
|
6221 ERROR; |
|
6222 } |
|
6223 |
|
6224 }/*function_word_to_lword*/ |
|
6225 break; |
|
6226 |
|
6227 /**** |
|
6228 *WORD_TO_UINT |
|
6229 */ |
|
6230 case function_word_to_uint : |
|
6231 { |
|
6232 symbol_c *last_type_symbol = NULL; |
|
6233 |
|
6234 { |
|
6235 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6236 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6237 symbol_c *IN_param_value = &this->default_variable_name; |
|
6238 |
|
6239 symbol_c *IN_type_symbol = param_data_type; |
|
6240 last_type_symbol = param_data_type; |
|
6241 |
|
6242 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6243 { |
|
6244 |
|
6245 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6246 |
|
6247 if (IN_type_symbol == NULL) |
|
6248 IN_type_symbol = last_type_symbol; |
|
6249 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6250 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6251 function_type_prefix = return_type_symbol; |
|
6252 function_type_suffix = IN_type_symbol; |
|
6253 break; |
|
6254 |
|
6255 } |
|
6256 |
|
6257 |
|
6258 ERROR; |
|
6259 } |
|
6260 |
|
6261 }/*function_word_to_uint*/ |
|
6262 break; |
|
6263 |
|
6264 /**** |
|
6265 *WORD_TO_LREAL |
|
6266 */ |
|
6267 case function_word_to_lreal : |
|
6268 { |
|
6269 symbol_c *last_type_symbol = NULL; |
|
6270 |
|
6271 { |
|
6272 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6273 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6274 symbol_c *IN_param_value = &this->default_variable_name; |
|
6275 |
|
6276 symbol_c *IN_type_symbol = param_data_type; |
|
6277 last_type_symbol = param_data_type; |
|
6278 |
|
6279 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6280 { |
|
6281 |
|
6282 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6283 |
|
6284 if (IN_type_symbol == NULL) |
|
6285 IN_type_symbol = last_type_symbol; |
|
6286 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6287 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6288 function_type_prefix = return_type_symbol; |
|
6289 function_type_suffix = IN_type_symbol; |
|
6290 break; |
|
6291 |
|
6292 } |
|
6293 |
|
6294 |
|
6295 ERROR; |
|
6296 } |
|
6297 |
|
6298 }/*function_word_to_lreal*/ |
|
6299 break; |
|
6300 |
|
6301 /**** |
|
6302 *WORD_TO_BYTE |
|
6303 */ |
|
6304 case function_word_to_byte : |
|
6305 { |
|
6306 symbol_c *last_type_symbol = NULL; |
|
6307 |
|
6308 { |
|
6309 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6310 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6311 symbol_c *IN_param_value = &this->default_variable_name; |
|
6312 |
|
6313 symbol_c *IN_type_symbol = param_data_type; |
|
6314 last_type_symbol = param_data_type; |
|
6315 |
|
6316 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6317 { |
|
6318 |
|
6319 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6320 |
|
6321 if (IN_type_symbol == NULL) |
|
6322 IN_type_symbol = last_type_symbol; |
|
6323 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6324 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6325 function_type_prefix = return_type_symbol; |
|
6326 function_type_suffix = IN_type_symbol; |
|
6327 break; |
|
6328 |
|
6329 } |
|
6330 |
|
6331 |
|
6332 ERROR; |
|
6333 } |
|
6334 |
|
6335 }/*function_word_to_byte*/ |
|
6336 break; |
|
6337 |
|
6338 /**** |
|
6339 *WORD_TO_USINT |
|
6340 */ |
|
6341 case function_word_to_usint : |
|
6342 { |
|
6343 symbol_c *last_type_symbol = NULL; |
|
6344 |
|
6345 { |
|
6346 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6347 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6348 symbol_c *IN_param_value = &this->default_variable_name; |
|
6349 |
|
6350 symbol_c *IN_type_symbol = param_data_type; |
|
6351 last_type_symbol = param_data_type; |
|
6352 |
|
6353 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6354 { |
|
6355 |
|
6356 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6357 |
|
6358 if (IN_type_symbol == NULL) |
|
6359 IN_type_symbol = last_type_symbol; |
|
6360 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6361 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6362 function_type_prefix = return_type_symbol; |
|
6363 function_type_suffix = IN_type_symbol; |
|
6364 break; |
|
6365 |
|
6366 } |
|
6367 |
|
6368 |
|
6369 ERROR; |
|
6370 } |
|
6371 |
|
6372 }/*function_word_to_usint*/ |
|
6373 break; |
|
6374 |
|
6375 /**** |
|
6376 *WORD_TO_ULINT |
|
6377 */ |
|
6378 case function_word_to_ulint : |
|
6379 { |
|
6380 symbol_c *last_type_symbol = NULL; |
|
6381 |
|
6382 { |
|
6383 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6384 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6385 symbol_c *IN_param_value = &this->default_variable_name; |
|
6386 |
|
6387 symbol_c *IN_type_symbol = param_data_type; |
|
6388 last_type_symbol = param_data_type; |
|
6389 |
|
6390 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6391 { |
|
6392 |
|
6393 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6394 |
|
6395 if (IN_type_symbol == NULL) |
|
6396 IN_type_symbol = last_type_symbol; |
|
6397 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6398 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6399 function_type_prefix = return_type_symbol; |
|
6400 function_type_suffix = IN_type_symbol; |
|
6401 break; |
|
6402 |
|
6403 } |
|
6404 |
|
6405 |
|
6406 ERROR; |
|
6407 } |
|
6408 |
|
6409 }/*function_word_to_ulint*/ |
|
6410 break; |
|
6411 |
|
6412 /**** |
|
6413 *WORD_TO_BOOL |
|
6414 */ |
|
6415 case function_word_to_bool : |
|
6416 { |
|
6417 symbol_c *last_type_symbol = NULL; |
|
6418 |
|
6419 { |
|
6420 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6422 symbol_c *IN_param_value = &this->default_variable_name; |
|
6423 |
|
6424 symbol_c *IN_type_symbol = param_data_type; |
|
6425 last_type_symbol = param_data_type; |
|
6426 |
|
6427 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6428 { |
|
6429 |
|
6430 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6431 |
|
6432 if (IN_type_symbol == NULL) |
|
6433 IN_type_symbol = last_type_symbol; |
|
6434 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6435 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6436 function_type_prefix = return_type_symbol; |
|
6437 function_type_suffix = IN_type_symbol; |
|
6438 break; |
|
6439 |
|
6440 } |
|
6441 |
|
6442 |
|
6443 ERROR; |
|
6444 } |
|
6445 |
|
6446 }/*function_word_to_bool*/ |
|
6447 break; |
|
6448 |
|
6449 /**** |
|
6450 *WORD_TO_TIME |
|
6451 */ |
|
6452 case function_word_to_time : |
|
6453 { |
|
6454 symbol_c *last_type_symbol = NULL; |
|
6455 |
|
6456 { |
|
6457 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6459 symbol_c *IN_param_value = &this->default_variable_name; |
|
6460 |
|
6461 symbol_c *IN_type_symbol = param_data_type; |
|
6462 last_type_symbol = param_data_type; |
|
6463 |
|
6464 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6465 { |
|
6466 |
|
6467 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6468 |
|
6469 if (IN_type_symbol == NULL) |
|
6470 IN_type_symbol = last_type_symbol; |
|
6471 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6472 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6473 function_type_prefix = return_type_symbol; |
|
6474 break; |
|
6475 |
|
6476 } |
|
6477 |
|
6478 |
|
6479 ERROR; |
|
6480 } |
|
6481 |
|
6482 }/*function_word_to_time*/ |
|
6483 break; |
|
6484 |
|
6485 /**** |
|
6486 *WORD_TO_INT |
|
6487 */ |
|
6488 case function_word_to_int : |
|
6489 { |
|
6490 symbol_c *last_type_symbol = NULL; |
|
6491 |
|
6492 { |
|
6493 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6494 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6495 symbol_c *IN_param_value = &this->default_variable_name; |
|
6496 |
|
6497 symbol_c *IN_type_symbol = param_data_type; |
|
6498 last_type_symbol = param_data_type; |
|
6499 |
|
6500 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6501 { |
|
6502 |
|
6503 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
6504 |
|
6505 if (IN_type_symbol == NULL) |
|
6506 IN_type_symbol = last_type_symbol; |
|
6507 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6508 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6509 function_type_prefix = return_type_symbol; |
|
6510 function_type_suffix = IN_type_symbol; |
|
6511 break; |
|
6512 |
|
6513 } |
|
6514 |
|
6515 |
|
6516 ERROR; |
|
6517 } |
|
6518 |
|
6519 }/*function_word_to_int*/ |
|
6520 break; |
|
6521 |
|
6522 /**** |
|
6523 *STRING_TO_REAL |
|
6524 */ |
|
6525 case function_string_to_real : |
|
6526 { |
|
6527 symbol_c *last_type_symbol = NULL; |
|
6528 |
|
6529 { |
|
6530 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6531 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6532 symbol_c *IN_param_value = &this->default_variable_name; |
|
6533 |
|
6534 symbol_c *IN_type_symbol = param_data_type; |
|
6535 last_type_symbol = param_data_type; |
|
6536 |
|
6537 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6538 { |
|
6539 |
|
6540 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
6541 |
|
6542 if (IN_type_symbol == NULL) |
|
6543 IN_type_symbol = last_type_symbol; |
|
6544 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6545 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6546 function_type_prefix = return_type_symbol; |
|
6547 break; |
|
6548 |
|
6549 } |
|
6550 |
|
6551 |
|
6552 ERROR; |
|
6553 } |
|
6554 |
|
6555 }/*function_string_to_real*/ |
|
6556 break; |
|
6557 |
|
6558 /**** |
|
6559 *STRING_TO_SINT |
|
6560 */ |
|
6561 case function_string_to_sint : |
|
6562 { |
|
6563 symbol_c *last_type_symbol = NULL; |
|
6564 |
|
6565 { |
|
6566 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6567 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6568 symbol_c *IN_param_value = &this->default_variable_name; |
|
6569 |
|
6570 symbol_c *IN_type_symbol = param_data_type; |
|
6571 last_type_symbol = param_data_type; |
|
6572 |
|
6573 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6574 { |
|
6575 |
|
6576 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6577 |
|
6578 if (IN_type_symbol == NULL) |
|
6579 IN_type_symbol = last_type_symbol; |
|
6580 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6581 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6582 function_type_prefix = return_type_symbol; |
|
6583 break; |
|
6584 |
|
6585 } |
|
6586 |
|
6587 |
|
6588 ERROR; |
|
6589 } |
|
6590 |
|
6591 }/*function_string_to_sint*/ |
|
6592 break; |
|
6593 |
|
6594 /**** |
|
6595 *STRING_TO_LINT |
|
6596 */ |
|
6597 case function_string_to_lint : |
|
6598 { |
|
6599 symbol_c *last_type_symbol = NULL; |
|
6600 |
|
6601 { |
|
6602 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6603 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6604 symbol_c *IN_param_value = &this->default_variable_name; |
|
6605 |
|
6606 symbol_c *IN_type_symbol = param_data_type; |
|
6607 last_type_symbol = param_data_type; |
|
6608 |
|
6609 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6610 { |
|
6611 |
|
6612 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6613 |
|
6614 if (IN_type_symbol == NULL) |
|
6615 IN_type_symbol = last_type_symbol; |
|
6616 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6617 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6618 function_type_prefix = return_type_symbol; |
|
6619 break; |
|
6620 |
|
6621 } |
|
6622 |
|
6623 |
|
6624 ERROR; |
|
6625 } |
|
6626 |
|
6627 }/*function_string_to_lint*/ |
|
6628 break; |
|
6629 |
|
6630 /**** |
|
6631 *STRING_TO_DINT |
|
6632 */ |
|
6633 case function_string_to_dint : |
|
6634 { |
|
6635 symbol_c *last_type_symbol = NULL; |
|
6636 |
|
6637 { |
|
6638 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6639 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6640 symbol_c *IN_param_value = &this->default_variable_name; |
|
6641 |
|
6642 symbol_c *IN_type_symbol = param_data_type; |
|
6643 last_type_symbol = param_data_type; |
|
6644 |
|
6645 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6646 { |
|
6647 |
|
6648 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6649 |
|
6650 if (IN_type_symbol == NULL) |
|
6651 IN_type_symbol = last_type_symbol; |
|
6652 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6653 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6654 function_type_prefix = return_type_symbol; |
|
6655 break; |
|
6656 |
|
6657 } |
|
6658 |
|
6659 |
|
6660 ERROR; |
|
6661 } |
|
6662 |
|
6663 }/*function_string_to_dint*/ |
|
6664 break; |
|
6665 |
|
6666 /**** |
|
6667 *STRING_TO_DATE |
|
6668 */ |
|
6669 case function_string_to_date : |
|
6670 { |
|
6671 symbol_c *last_type_symbol = NULL; |
|
6672 |
|
6673 { |
|
6674 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6675 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6676 symbol_c *IN_param_value = &this->default_variable_name; |
|
6677 |
|
6678 symbol_c *IN_type_symbol = param_data_type; |
|
6679 last_type_symbol = param_data_type; |
|
6680 |
|
6681 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6682 { |
|
6683 |
|
6684 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6685 |
|
6686 if (IN_type_symbol == NULL) |
|
6687 IN_type_symbol = last_type_symbol; |
|
6688 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6689 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6690 function_type_prefix = return_type_symbol; |
|
6691 break; |
|
6692 |
|
6693 } |
|
6694 |
|
6695 |
|
6696 ERROR; |
|
6697 } |
|
6698 |
|
6699 }/*function_string_to_date*/ |
|
6700 break; |
|
6701 |
|
6702 /**** |
|
6703 *STRING_TO_DWORD |
|
6704 */ |
|
6705 case function_string_to_dword : |
|
6706 { |
|
6707 symbol_c *last_type_symbol = NULL; |
|
6708 |
|
6709 { |
|
6710 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6711 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6712 symbol_c *IN_param_value = &this->default_variable_name; |
|
6713 |
|
6714 symbol_c *IN_type_symbol = param_data_type; |
|
6715 last_type_symbol = param_data_type; |
|
6716 |
|
6717 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6718 { |
|
6719 |
|
6720 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6721 |
|
6722 if (IN_type_symbol == NULL) |
|
6723 IN_type_symbol = last_type_symbol; |
|
6724 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6725 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6726 function_type_prefix = return_type_symbol; |
|
6727 break; |
|
6728 |
|
6729 } |
|
6730 |
|
6731 |
|
6732 ERROR; |
|
6733 } |
|
6734 |
|
6735 }/*function_string_to_dword*/ |
|
6736 break; |
|
6737 |
|
6738 /**** |
|
6739 *STRING_TO_DT |
|
6740 */ |
|
6741 case function_string_to_dt : |
|
6742 { |
|
6743 symbol_c *last_type_symbol = NULL; |
|
6744 |
|
6745 { |
|
6746 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6748 symbol_c *IN_param_value = &this->default_variable_name; |
|
6749 |
|
6750 symbol_c *IN_type_symbol = param_data_type; |
|
6751 last_type_symbol = param_data_type; |
|
6752 |
|
6753 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6754 { |
|
6755 |
|
6756 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6757 |
|
6758 if (IN_type_symbol == NULL) |
|
6759 IN_type_symbol = last_type_symbol; |
|
6760 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6761 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6762 function_type_prefix = return_type_symbol; |
|
6763 break; |
|
6764 |
|
6765 } |
|
6766 |
|
6767 |
|
6768 ERROR; |
|
6769 } |
|
6770 |
|
6771 }/*function_string_to_dt*/ |
|
6772 break; |
|
6773 |
|
6774 /**** |
|
6775 *STRING_TO_TOD |
|
6776 */ |
|
6777 case function_string_to_tod : |
|
6778 { |
|
6779 symbol_c *last_type_symbol = NULL; |
|
6780 |
|
6781 { |
|
6782 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6783 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6784 symbol_c *IN_param_value = &this->default_variable_name; |
|
6785 |
|
6786 symbol_c *IN_type_symbol = param_data_type; |
|
6787 last_type_symbol = param_data_type; |
|
6788 |
|
6789 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6790 { |
|
6791 |
|
6792 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6793 |
|
6794 if (IN_type_symbol == NULL) |
|
6795 IN_type_symbol = last_type_symbol; |
|
6796 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6797 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6798 function_type_prefix = return_type_symbol; |
|
6799 break; |
|
6800 |
|
6801 } |
|
6802 |
|
6803 |
|
6804 ERROR; |
|
6805 } |
|
6806 |
|
6807 }/*function_string_to_tod*/ |
|
6808 break; |
|
6809 |
|
6810 /**** |
|
6811 *STRING_TO_UDINT |
|
6812 */ |
|
6813 case function_string_to_udint : |
|
6814 { |
|
6815 symbol_c *last_type_symbol = NULL; |
|
6816 |
|
6817 { |
|
6818 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6819 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6820 symbol_c *IN_param_value = &this->default_variable_name; |
|
6821 |
|
6822 symbol_c *IN_type_symbol = param_data_type; |
|
6823 last_type_symbol = param_data_type; |
|
6824 |
|
6825 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6826 { |
|
6827 |
|
6828 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6829 |
|
6830 if (IN_type_symbol == NULL) |
|
6831 IN_type_symbol = last_type_symbol; |
|
6832 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6833 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6834 function_type_prefix = return_type_symbol; |
|
6835 break; |
|
6836 |
|
6837 } |
|
6838 |
|
6839 |
|
6840 ERROR; |
|
6841 } |
|
6842 |
|
6843 }/*function_string_to_udint*/ |
|
6844 break; |
|
6845 |
|
6846 /**** |
|
6847 *STRING_TO_WORD |
|
6848 */ |
|
6849 case function_string_to_word : |
|
6850 { |
|
6851 symbol_c *last_type_symbol = NULL; |
|
6852 |
|
6853 { |
|
6854 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6855 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6856 symbol_c *IN_param_value = &this->default_variable_name; |
|
6857 |
|
6858 symbol_c *IN_type_symbol = param_data_type; |
|
6859 last_type_symbol = param_data_type; |
|
6860 |
|
6861 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6862 { |
|
6863 |
|
6864 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6865 |
|
6866 if (IN_type_symbol == NULL) |
|
6867 IN_type_symbol = last_type_symbol; |
|
6868 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6869 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6870 function_type_prefix = return_type_symbol; |
|
6871 break; |
|
6872 |
|
6873 } |
|
6874 |
|
6875 |
|
6876 ERROR; |
|
6877 } |
|
6878 |
|
6879 }/*function_string_to_word*/ |
|
6880 break; |
|
6881 |
|
6882 /**** |
|
6883 *STRING_TO_LWORD |
|
6884 */ |
|
6885 case function_string_to_lword : |
|
6886 { |
|
6887 symbol_c *last_type_symbol = NULL; |
|
6888 |
|
6889 { |
|
6890 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6891 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6892 symbol_c *IN_param_value = &this->default_variable_name; |
|
6893 |
|
6894 symbol_c *IN_type_symbol = param_data_type; |
|
6895 last_type_symbol = param_data_type; |
|
6896 |
|
6897 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6898 { |
|
6899 |
|
6900 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6901 |
|
6902 if (IN_type_symbol == NULL) |
|
6903 IN_type_symbol = last_type_symbol; |
|
6904 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6905 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6906 function_type_prefix = return_type_symbol; |
|
6907 break; |
|
6908 |
|
6909 } |
|
6910 |
|
6911 |
|
6912 ERROR; |
|
6913 } |
|
6914 |
|
6915 }/*function_string_to_lword*/ |
|
6916 break; |
|
6917 |
|
6918 /**** |
|
6919 *STRING_TO_UINT |
|
6920 */ |
|
6921 case function_string_to_uint : |
|
6922 { |
|
6923 symbol_c *last_type_symbol = NULL; |
|
6924 |
|
6925 { |
|
6926 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6928 symbol_c *IN_param_value = &this->default_variable_name; |
|
6929 |
|
6930 symbol_c *IN_type_symbol = param_data_type; |
|
6931 last_type_symbol = param_data_type; |
|
6932 |
|
6933 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6934 { |
|
6935 |
|
6936 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6937 |
|
6938 if (IN_type_symbol == NULL) |
|
6939 IN_type_symbol = last_type_symbol; |
|
6940 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6941 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6942 function_type_prefix = return_type_symbol; |
|
6943 break; |
|
6944 |
|
6945 } |
|
6946 |
|
6947 |
|
6948 ERROR; |
|
6949 } |
|
6950 |
|
6951 }/*function_string_to_uint*/ |
|
6952 break; |
|
6953 |
|
6954 /**** |
|
6955 *STRING_TO_LREAL |
|
6956 */ |
|
6957 case function_string_to_lreal : |
|
6958 { |
|
6959 symbol_c *last_type_symbol = NULL; |
|
6960 |
|
6961 { |
|
6962 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6963 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6964 symbol_c *IN_param_value = &this->default_variable_name; |
|
6965 |
|
6966 symbol_c *IN_type_symbol = param_data_type; |
|
6967 last_type_symbol = param_data_type; |
|
6968 |
|
6969 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6970 { |
|
6971 |
|
6972 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
6973 |
|
6974 if (IN_type_symbol == NULL) |
|
6975 IN_type_symbol = last_type_symbol; |
|
6976 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6977 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6978 function_type_prefix = return_type_symbol; |
|
6979 break; |
|
6980 |
|
6981 } |
|
6982 |
|
6983 |
|
6984 ERROR; |
|
6985 } |
|
6986 |
|
6987 }/*function_string_to_lreal*/ |
|
6988 break; |
|
6989 |
|
6990 /**** |
|
6991 *STRING_TO_BYTE |
|
6992 */ |
|
6993 case function_string_to_byte : |
|
6994 { |
|
6995 symbol_c *last_type_symbol = NULL; |
|
6996 |
|
6997 { |
|
6998 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
6999 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7000 symbol_c *IN_param_value = &this->default_variable_name; |
|
7001 |
|
7002 symbol_c *IN_type_symbol = param_data_type; |
|
7003 last_type_symbol = param_data_type; |
|
7004 |
|
7005 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7006 { |
|
7007 |
|
7008 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7009 |
|
7010 if (IN_type_symbol == NULL) |
|
7011 IN_type_symbol = last_type_symbol; |
|
7012 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7013 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7014 function_type_prefix = return_type_symbol; |
|
7015 break; |
|
7016 |
|
7017 } |
|
7018 |
|
7019 |
|
7020 ERROR; |
|
7021 } |
|
7022 |
|
7023 }/*function_string_to_byte*/ |
|
7024 break; |
|
7025 |
|
7026 /**** |
|
7027 *STRING_TO_USINT |
|
7028 */ |
|
7029 case function_string_to_usint : |
|
7030 { |
|
7031 symbol_c *last_type_symbol = NULL; |
|
7032 |
|
7033 { |
|
7034 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7035 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7036 symbol_c *IN_param_value = &this->default_variable_name; |
|
7037 |
|
7038 symbol_c *IN_type_symbol = param_data_type; |
|
7039 last_type_symbol = param_data_type; |
|
7040 |
|
7041 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7042 { |
|
7043 |
|
7044 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7045 |
|
7046 if (IN_type_symbol == NULL) |
|
7047 IN_type_symbol = last_type_symbol; |
|
7048 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7049 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7050 function_type_prefix = return_type_symbol; |
|
7051 break; |
|
7052 |
|
7053 } |
|
7054 |
|
7055 |
|
7056 ERROR; |
|
7057 } |
|
7058 |
|
7059 }/*function_string_to_usint*/ |
|
7060 break; |
|
7061 |
|
7062 /**** |
|
7063 *STRING_TO_ULINT |
|
7064 */ |
|
7065 case function_string_to_ulint : |
|
7066 { |
|
7067 symbol_c *last_type_symbol = NULL; |
|
7068 |
|
7069 { |
|
7070 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7072 symbol_c *IN_param_value = &this->default_variable_name; |
|
7073 |
|
7074 symbol_c *IN_type_symbol = param_data_type; |
|
7075 last_type_symbol = param_data_type; |
|
7076 |
|
7077 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7078 { |
|
7079 |
|
7080 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7081 |
|
7082 if (IN_type_symbol == NULL) |
|
7083 IN_type_symbol = last_type_symbol; |
|
7084 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7085 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7086 function_type_prefix = return_type_symbol; |
|
7087 break; |
|
7088 |
|
7089 } |
|
7090 |
|
7091 |
|
7092 ERROR; |
|
7093 } |
|
7094 |
|
7095 }/*function_string_to_ulint*/ |
|
7096 break; |
|
7097 |
|
7098 /**** |
|
7099 *STRING_TO_BOOL |
|
7100 */ |
|
7101 case function_string_to_bool : |
|
7102 { |
|
7103 symbol_c *last_type_symbol = NULL; |
|
7104 |
|
7105 { |
|
7106 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7107 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7108 symbol_c *IN_param_value = &this->default_variable_name; |
|
7109 |
|
7110 symbol_c *IN_type_symbol = param_data_type; |
|
7111 last_type_symbol = param_data_type; |
|
7112 |
|
7113 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7114 { |
|
7115 |
|
7116 function_name = (symbol_c*)(new pragma_c("__string_to_bool")); |
|
7117 |
|
7118 if (IN_type_symbol == NULL) |
|
7119 IN_type_symbol = last_type_symbol; |
|
7120 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7121 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7122 function_type_prefix = return_type_symbol; |
|
7123 break; |
|
7124 |
|
7125 } |
|
7126 |
|
7127 |
|
7128 ERROR; |
|
7129 } |
|
7130 |
|
7131 }/*function_string_to_bool*/ |
|
7132 break; |
|
7133 |
|
7134 /**** |
|
7135 *STRING_TO_TIME |
|
7136 */ |
|
7137 case function_string_to_time : |
|
7138 { |
|
7139 symbol_c *last_type_symbol = NULL; |
|
7140 |
|
7141 { |
|
7142 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7143 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7144 symbol_c *IN_param_value = &this->default_variable_name; |
|
7145 |
|
7146 symbol_c *IN_type_symbol = param_data_type; |
|
7147 last_type_symbol = param_data_type; |
|
7148 |
|
7149 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7150 { |
|
7151 |
|
7152 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
7153 |
|
7154 if (IN_type_symbol == NULL) |
|
7155 IN_type_symbol = last_type_symbol; |
|
7156 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7157 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7158 function_type_prefix = return_type_symbol; |
|
7159 break; |
|
7160 |
|
7161 } |
|
7162 |
|
7163 |
|
7164 ERROR; |
|
7165 } |
|
7166 |
|
7167 }/*function_string_to_time*/ |
|
7168 break; |
|
7169 |
|
7170 /**** |
|
7171 *STRING_TO_INT |
|
7172 */ |
|
7173 case function_string_to_int : |
|
7174 { |
|
7175 symbol_c *last_type_symbol = NULL; |
|
7176 |
|
7177 { |
|
7178 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7180 symbol_c *IN_param_value = &this->default_variable_name; |
|
7181 |
|
7182 symbol_c *IN_type_symbol = param_data_type; |
|
7183 last_type_symbol = param_data_type; |
|
7184 |
|
7185 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
7186 { |
|
7187 |
|
7188 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
7189 |
|
7190 if (IN_type_symbol == NULL) |
|
7191 IN_type_symbol = last_type_symbol; |
|
7192 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7193 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7194 function_type_prefix = return_type_symbol; |
|
7195 break; |
|
7196 |
|
7197 } |
|
7198 |
|
7199 |
|
7200 ERROR; |
|
7201 } |
|
7202 |
|
7203 }/*function_string_to_int*/ |
|
7204 break; |
|
7205 |
|
7206 /**** |
|
7207 *LWORD_TO_REAL |
|
7208 */ |
|
7209 case function_lword_to_real : |
|
7210 { |
|
7211 symbol_c *last_type_symbol = NULL; |
|
7212 |
|
7213 { |
|
7214 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7216 symbol_c *IN_param_value = &this->default_variable_name; |
|
7217 |
|
7218 symbol_c *IN_type_symbol = param_data_type; |
|
7219 last_type_symbol = param_data_type; |
|
7220 |
|
7221 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7222 { |
|
7223 |
|
7224 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7225 |
|
7226 if (IN_type_symbol == NULL) |
|
7227 IN_type_symbol = last_type_symbol; |
|
7228 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7229 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7230 function_type_prefix = return_type_symbol; |
|
7231 function_type_suffix = IN_type_symbol; |
|
7232 break; |
|
7233 |
|
7234 } |
|
7235 |
|
7236 |
|
7237 ERROR; |
|
7238 } |
|
7239 |
|
7240 }/*function_lword_to_real*/ |
|
7241 break; |
|
7242 |
|
7243 /**** |
|
7244 *LWORD_TO_SINT |
|
7245 */ |
|
7246 case function_lword_to_sint : |
|
7247 { |
|
7248 symbol_c *last_type_symbol = NULL; |
|
7249 |
|
7250 { |
|
7251 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7252 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7253 symbol_c *IN_param_value = &this->default_variable_name; |
|
7254 |
|
7255 symbol_c *IN_type_symbol = param_data_type; |
|
7256 last_type_symbol = param_data_type; |
|
7257 |
|
7258 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7259 { |
|
7260 |
|
7261 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7262 |
|
7263 if (IN_type_symbol == NULL) |
|
7264 IN_type_symbol = last_type_symbol; |
|
7265 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7266 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7267 function_type_prefix = return_type_symbol; |
|
7268 function_type_suffix = IN_type_symbol; |
|
7269 break; |
|
7270 |
|
7271 } |
|
7272 |
|
7273 |
|
7274 ERROR; |
|
7275 } |
|
7276 |
|
7277 }/*function_lword_to_sint*/ |
|
7278 break; |
|
7279 |
|
7280 /**** |
|
7281 *LWORD_TO_LINT |
|
7282 */ |
|
7283 case function_lword_to_lint : |
|
7284 { |
|
7285 symbol_c *last_type_symbol = NULL; |
|
7286 |
|
7287 { |
|
7288 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7289 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7290 symbol_c *IN_param_value = &this->default_variable_name; |
|
7291 |
|
7292 symbol_c *IN_type_symbol = param_data_type; |
|
7293 last_type_symbol = param_data_type; |
|
7294 |
|
7295 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7296 { |
|
7297 |
|
7298 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7299 |
|
7300 if (IN_type_symbol == NULL) |
|
7301 IN_type_symbol = last_type_symbol; |
|
7302 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7303 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7304 function_type_prefix = return_type_symbol; |
|
7305 function_type_suffix = IN_type_symbol; |
|
7306 break; |
|
7307 |
|
7308 } |
|
7309 |
|
7310 |
|
7311 ERROR; |
|
7312 } |
|
7313 |
|
7314 }/*function_lword_to_lint*/ |
|
7315 break; |
|
7316 |
|
7317 /**** |
|
7318 *LWORD_TO_DINT |
|
7319 */ |
|
7320 case function_lword_to_dint : |
|
7321 { |
|
7322 symbol_c *last_type_symbol = NULL; |
|
7323 |
|
7324 { |
|
7325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7327 symbol_c *IN_param_value = &this->default_variable_name; |
|
7328 |
|
7329 symbol_c *IN_type_symbol = param_data_type; |
|
7330 last_type_symbol = param_data_type; |
|
7331 |
|
7332 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7333 { |
|
7334 |
|
7335 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7336 |
|
7337 if (IN_type_symbol == NULL) |
|
7338 IN_type_symbol = last_type_symbol; |
|
7339 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7340 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7341 function_type_prefix = return_type_symbol; |
|
7342 function_type_suffix = IN_type_symbol; |
|
7343 break; |
|
7344 |
|
7345 } |
|
7346 |
|
7347 |
|
7348 ERROR; |
|
7349 } |
|
7350 |
|
7351 }/*function_lword_to_dint*/ |
|
7352 break; |
|
7353 |
|
7354 /**** |
|
7355 *LWORD_TO_DATE |
|
7356 */ |
|
7357 case function_lword_to_date : |
|
7358 { |
|
7359 symbol_c *last_type_symbol = NULL; |
|
7360 |
|
7361 { |
|
7362 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7363 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7364 symbol_c *IN_param_value = &this->default_variable_name; |
|
7365 |
|
7366 symbol_c *IN_type_symbol = param_data_type; |
|
7367 last_type_symbol = param_data_type; |
|
7368 |
|
7369 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7370 { |
|
7371 |
|
7372 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7373 |
|
7374 if (IN_type_symbol == NULL) |
|
7375 IN_type_symbol = last_type_symbol; |
|
7376 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7377 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
7378 function_type_prefix = return_type_symbol; |
|
7379 break; |
|
7380 |
|
7381 } |
|
7382 |
|
7383 |
|
7384 ERROR; |
|
7385 } |
|
7386 |
|
7387 }/*function_lword_to_date*/ |
|
7388 break; |
|
7389 |
|
7390 /**** |
|
7391 *LWORD_TO_DWORD |
|
7392 */ |
|
7393 case function_lword_to_dword : |
|
7394 { |
|
7395 symbol_c *last_type_symbol = NULL; |
|
7396 |
|
7397 { |
|
7398 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7400 symbol_c *IN_param_value = &this->default_variable_name; |
|
7401 |
|
7402 symbol_c *IN_type_symbol = param_data_type; |
|
7403 last_type_symbol = param_data_type; |
|
7404 |
|
7405 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7406 { |
|
7407 |
|
7408 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7409 |
|
7410 if (IN_type_symbol == NULL) |
|
7411 IN_type_symbol = last_type_symbol; |
|
7412 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7413 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7414 function_type_prefix = return_type_symbol; |
|
7415 function_type_suffix = IN_type_symbol; |
|
7416 break; |
|
7417 |
|
7418 } |
|
7419 |
|
7420 |
|
7421 ERROR; |
|
7422 } |
|
7423 |
|
7424 }/*function_lword_to_dword*/ |
|
7425 break; |
|
7426 |
|
7427 /**** |
|
7428 *LWORD_TO_DT |
|
7429 */ |
|
7430 case function_lword_to_dt : |
|
7431 { |
|
7432 symbol_c *last_type_symbol = NULL; |
|
7433 |
|
7434 { |
|
7435 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7437 symbol_c *IN_param_value = &this->default_variable_name; |
|
7438 |
|
7439 symbol_c *IN_type_symbol = param_data_type; |
|
7440 last_type_symbol = param_data_type; |
|
7441 |
|
7442 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7443 { |
|
7444 |
|
7445 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7446 |
|
7447 if (IN_type_symbol == NULL) |
|
7448 IN_type_symbol = last_type_symbol; |
|
7449 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7450 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
7451 function_type_prefix = return_type_symbol; |
|
7452 break; |
|
7453 |
|
7454 } |
|
7455 |
|
7456 |
|
7457 ERROR; |
|
7458 } |
|
7459 |
|
7460 }/*function_lword_to_dt*/ |
|
7461 break; |
|
7462 |
|
7463 /**** |
|
7464 *LWORD_TO_TOD |
|
7465 */ |
|
7466 case function_lword_to_tod : |
|
7467 { |
|
7468 symbol_c *last_type_symbol = NULL; |
|
7469 |
|
7470 { |
|
7471 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7473 symbol_c *IN_param_value = &this->default_variable_name; |
|
7474 |
|
7475 symbol_c *IN_type_symbol = param_data_type; |
|
7476 last_type_symbol = param_data_type; |
|
7477 |
|
7478 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7479 { |
|
7480 |
|
7481 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7482 |
|
7483 if (IN_type_symbol == NULL) |
|
7484 IN_type_symbol = last_type_symbol; |
|
7485 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7486 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
7487 function_type_prefix = return_type_symbol; |
|
7488 break; |
|
7489 |
|
7490 } |
|
7491 |
|
7492 |
|
7493 ERROR; |
|
7494 } |
|
7495 |
|
7496 }/*function_lword_to_tod*/ |
|
7497 break; |
|
7498 |
|
7499 /**** |
|
7500 *LWORD_TO_UDINT |
|
7501 */ |
|
7502 case function_lword_to_udint : |
|
7503 { |
|
7504 symbol_c *last_type_symbol = NULL; |
|
7505 |
|
7506 { |
|
7507 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7508 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7509 symbol_c *IN_param_value = &this->default_variable_name; |
|
7510 |
|
7511 symbol_c *IN_type_symbol = param_data_type; |
|
7512 last_type_symbol = param_data_type; |
|
7513 |
|
7514 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7515 { |
|
7516 |
|
7517 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7518 |
|
7519 if (IN_type_symbol == NULL) |
|
7520 IN_type_symbol = last_type_symbol; |
|
7521 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7522 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7523 function_type_prefix = return_type_symbol; |
|
7524 function_type_suffix = IN_type_symbol; |
|
7525 break; |
|
7526 |
|
7527 } |
|
7528 |
|
7529 |
|
7530 ERROR; |
|
7531 } |
|
7532 |
|
7533 }/*function_lword_to_udint*/ |
|
7534 break; |
|
7535 |
|
7536 /**** |
|
7537 *LWORD_TO_WORD |
|
7538 */ |
|
7539 case function_lword_to_word : |
|
7540 { |
|
7541 symbol_c *last_type_symbol = NULL; |
|
7542 |
|
7543 { |
|
7544 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7546 symbol_c *IN_param_value = &this->default_variable_name; |
|
7547 |
|
7548 symbol_c *IN_type_symbol = param_data_type; |
|
7549 last_type_symbol = param_data_type; |
|
7550 |
|
7551 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7552 { |
|
7553 |
|
7554 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7555 |
|
7556 if (IN_type_symbol == NULL) |
|
7557 IN_type_symbol = last_type_symbol; |
|
7558 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7559 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7560 function_type_prefix = return_type_symbol; |
|
7561 function_type_suffix = IN_type_symbol; |
|
7562 break; |
|
7563 |
|
7564 } |
|
7565 |
|
7566 |
|
7567 ERROR; |
|
7568 } |
|
7569 |
|
7570 }/*function_lword_to_word*/ |
|
7571 break; |
|
7572 |
|
7573 /**** |
|
7574 *LWORD_TO_STRING |
|
7575 */ |
|
7576 case function_lword_to_string : |
|
7577 { |
|
7578 symbol_c *last_type_symbol = NULL; |
|
7579 |
|
7580 { |
|
7581 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7583 symbol_c *IN_param_value = &this->default_variable_name; |
|
7584 |
|
7585 symbol_c *IN_type_symbol = param_data_type; |
|
7586 last_type_symbol = param_data_type; |
|
7587 |
|
7588 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7589 { |
|
7590 |
|
7591 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
7592 |
|
7593 if (IN_type_symbol == NULL) |
|
7594 IN_type_symbol = last_type_symbol; |
|
7595 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7596 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7597 function_type_prefix = return_type_symbol; |
|
7598 break; |
|
7599 |
|
7600 } |
|
7601 |
|
7602 |
|
7603 ERROR; |
|
7604 } |
|
7605 |
|
7606 }/*function_lword_to_string*/ |
|
7607 break; |
|
7608 |
|
7609 /**** |
|
7610 *LWORD_TO_UINT |
|
7611 */ |
|
7612 case function_lword_to_uint : |
|
7613 { |
|
7614 symbol_c *last_type_symbol = NULL; |
|
7615 |
|
7616 { |
|
7617 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7618 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7619 symbol_c *IN_param_value = &this->default_variable_name; |
|
7620 |
|
7621 symbol_c *IN_type_symbol = param_data_type; |
|
7622 last_type_symbol = param_data_type; |
|
7623 |
|
7624 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7625 { |
|
7626 |
|
7627 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7628 |
|
7629 if (IN_type_symbol == NULL) |
|
7630 IN_type_symbol = last_type_symbol; |
|
7631 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7632 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7633 function_type_prefix = return_type_symbol; |
|
7634 function_type_suffix = IN_type_symbol; |
|
7635 break; |
|
7636 |
|
7637 } |
|
7638 |
|
7639 |
|
7640 ERROR; |
|
7641 } |
|
7642 |
|
7643 }/*function_lword_to_uint*/ |
|
7644 break; |
|
7645 |
|
7646 /**** |
|
7647 *LWORD_TO_LREAL |
|
7648 */ |
|
7649 case function_lword_to_lreal : |
|
7650 { |
|
7651 symbol_c *last_type_symbol = NULL; |
|
7652 |
|
7653 { |
|
7654 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7656 symbol_c *IN_param_value = &this->default_variable_name; |
|
7657 |
|
7658 symbol_c *IN_type_symbol = param_data_type; |
|
7659 last_type_symbol = param_data_type; |
|
7660 |
|
7661 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7662 { |
|
7663 |
|
7664 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7665 |
|
7666 if (IN_type_symbol == NULL) |
|
7667 IN_type_symbol = last_type_symbol; |
|
7668 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7669 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7670 function_type_prefix = return_type_symbol; |
|
7671 function_type_suffix = IN_type_symbol; |
|
7672 break; |
|
7673 |
|
7674 } |
|
7675 |
|
7676 |
|
7677 ERROR; |
|
7678 } |
|
7679 |
|
7680 }/*function_lword_to_lreal*/ |
|
7681 break; |
|
7682 |
|
7683 /**** |
|
7684 *LWORD_TO_BYTE |
|
7685 */ |
|
7686 case function_lword_to_byte : |
|
7687 { |
|
7688 symbol_c *last_type_symbol = NULL; |
|
7689 |
|
7690 { |
|
7691 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7692 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7693 symbol_c *IN_param_value = &this->default_variable_name; |
|
7694 |
|
7695 symbol_c *IN_type_symbol = param_data_type; |
|
7696 last_type_symbol = param_data_type; |
|
7697 |
|
7698 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7699 { |
|
7700 |
|
7701 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7702 |
|
7703 if (IN_type_symbol == NULL) |
|
7704 IN_type_symbol = last_type_symbol; |
|
7705 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7706 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7707 function_type_prefix = return_type_symbol; |
|
7708 function_type_suffix = IN_type_symbol; |
|
7709 break; |
|
7710 |
|
7711 } |
|
7712 |
|
7713 |
|
7714 ERROR; |
|
7715 } |
|
7716 |
|
7717 }/*function_lword_to_byte*/ |
|
7718 break; |
|
7719 |
|
7720 /**** |
|
7721 *LWORD_TO_USINT |
|
7722 */ |
|
7723 case function_lword_to_usint : |
|
7724 { |
|
7725 symbol_c *last_type_symbol = NULL; |
|
7726 |
|
7727 { |
|
7728 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7730 symbol_c *IN_param_value = &this->default_variable_name; |
|
7731 |
|
7732 symbol_c *IN_type_symbol = param_data_type; |
|
7733 last_type_symbol = param_data_type; |
|
7734 |
|
7735 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7736 { |
|
7737 |
|
7738 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7739 |
|
7740 if (IN_type_symbol == NULL) |
|
7741 IN_type_symbol = last_type_symbol; |
|
7742 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7743 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7744 function_type_prefix = return_type_symbol; |
|
7745 function_type_suffix = IN_type_symbol; |
|
7746 break; |
|
7747 |
|
7748 } |
|
7749 |
|
7750 |
|
7751 ERROR; |
|
7752 } |
|
7753 |
|
7754 }/*function_lword_to_usint*/ |
|
7755 break; |
|
7756 |
|
7757 /**** |
|
7758 *LWORD_TO_ULINT |
|
7759 */ |
|
7760 case function_lword_to_ulint : |
|
7761 { |
|
7762 symbol_c *last_type_symbol = NULL; |
|
7763 |
|
7764 { |
|
7765 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7767 symbol_c *IN_param_value = &this->default_variable_name; |
|
7768 |
|
7769 symbol_c *IN_type_symbol = param_data_type; |
|
7770 last_type_symbol = param_data_type; |
|
7771 |
|
7772 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7773 { |
|
7774 |
|
7775 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7776 |
|
7777 if (IN_type_symbol == NULL) |
|
7778 IN_type_symbol = last_type_symbol; |
|
7779 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7780 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7781 function_type_prefix = return_type_symbol; |
|
7782 function_type_suffix = IN_type_symbol; |
|
7783 break; |
|
7784 |
|
7785 } |
|
7786 |
|
7787 |
|
7788 ERROR; |
|
7789 } |
|
7790 |
|
7791 }/*function_lword_to_ulint*/ |
|
7792 break; |
|
7793 |
|
7794 /**** |
|
7795 *LWORD_TO_BOOL |
|
7796 */ |
|
7797 case function_lword_to_bool : |
|
7798 { |
|
7799 symbol_c *last_type_symbol = NULL; |
|
7800 |
|
7801 { |
|
7802 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7803 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7804 symbol_c *IN_param_value = &this->default_variable_name; |
|
7805 |
|
7806 symbol_c *IN_type_symbol = param_data_type; |
|
7807 last_type_symbol = param_data_type; |
|
7808 |
|
7809 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7810 { |
|
7811 |
|
7812 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7813 |
|
7814 if (IN_type_symbol == NULL) |
|
7815 IN_type_symbol = last_type_symbol; |
|
7816 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7817 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7818 function_type_prefix = return_type_symbol; |
|
7819 function_type_suffix = IN_type_symbol; |
|
7820 break; |
|
7821 |
|
7822 } |
|
7823 |
|
7824 |
|
7825 ERROR; |
|
7826 } |
|
7827 |
|
7828 }/*function_lword_to_bool*/ |
|
7829 break; |
|
7830 |
|
7831 /**** |
|
7832 *LWORD_TO_TIME |
|
7833 */ |
|
7834 case function_lword_to_time : |
|
7835 { |
|
7836 symbol_c *last_type_symbol = NULL; |
|
7837 |
|
7838 { |
|
7839 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7840 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7841 symbol_c *IN_param_value = &this->default_variable_name; |
|
7842 |
|
7843 symbol_c *IN_type_symbol = param_data_type; |
|
7844 last_type_symbol = param_data_type; |
|
7845 |
|
7846 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7847 { |
|
7848 |
|
7849 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7850 |
|
7851 if (IN_type_symbol == NULL) |
|
7852 IN_type_symbol = last_type_symbol; |
|
7853 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7854 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7855 function_type_prefix = return_type_symbol; |
|
7856 break; |
|
7857 |
|
7858 } |
|
7859 |
|
7860 |
|
7861 ERROR; |
|
7862 } |
|
7863 |
|
7864 }/*function_lword_to_time*/ |
|
7865 break; |
|
7866 |
|
7867 /**** |
|
7868 *LWORD_TO_INT |
|
7869 */ |
|
7870 case function_lword_to_int : |
|
7871 { |
|
7872 symbol_c *last_type_symbol = NULL; |
|
7873 |
|
7874 { |
|
7875 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7877 symbol_c *IN_param_value = &this->default_variable_name; |
|
7878 |
|
7879 symbol_c *IN_type_symbol = param_data_type; |
|
7880 last_type_symbol = param_data_type; |
|
7881 |
|
7882 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
7883 { |
|
7884 |
|
7885 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7886 |
|
7887 if (IN_type_symbol == NULL) |
|
7888 IN_type_symbol = last_type_symbol; |
|
7889 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7890 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7891 function_type_prefix = return_type_symbol; |
|
7892 function_type_suffix = IN_type_symbol; |
|
7893 break; |
|
7894 |
|
7895 } |
|
7896 |
|
7897 |
|
7898 ERROR; |
|
7899 } |
|
7900 |
|
7901 }/*function_lword_to_int*/ |
|
7902 break; |
|
7903 |
|
7904 /**** |
|
7905 *UINT_TO_REAL |
|
7906 */ |
|
7907 case function_uint_to_real : |
|
7908 { |
|
7909 symbol_c *last_type_symbol = NULL; |
|
7910 |
|
7911 { |
|
7912 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7913 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7914 symbol_c *IN_param_value = &this->default_variable_name; |
|
7915 |
|
7916 symbol_c *IN_type_symbol = param_data_type; |
|
7917 last_type_symbol = param_data_type; |
|
7918 |
|
7919 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7920 { |
|
7921 |
|
7922 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7923 |
|
7924 if (IN_type_symbol == NULL) |
|
7925 IN_type_symbol = last_type_symbol; |
|
7926 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7927 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7928 function_type_prefix = return_type_symbol; |
|
7929 function_type_suffix = IN_type_symbol; |
|
7930 break; |
|
7931 |
|
7932 } |
|
7933 |
|
7934 |
|
7935 ERROR; |
|
7936 } |
|
7937 |
|
7938 }/*function_uint_to_real*/ |
|
7939 break; |
|
7940 |
|
7941 /**** |
|
7942 *UINT_TO_SINT |
|
7943 */ |
|
7944 case function_uint_to_sint : |
|
7945 { |
|
7946 symbol_c *last_type_symbol = NULL; |
|
7947 |
|
7948 { |
|
7949 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7950 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7951 symbol_c *IN_param_value = &this->default_variable_name; |
|
7952 |
|
7953 symbol_c *IN_type_symbol = param_data_type; |
|
7954 last_type_symbol = param_data_type; |
|
7955 |
|
7956 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7957 { |
|
7958 |
|
7959 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7960 |
|
7961 if (IN_type_symbol == NULL) |
|
7962 IN_type_symbol = last_type_symbol; |
|
7963 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7964 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7965 function_type_prefix = return_type_symbol; |
|
7966 function_type_suffix = IN_type_symbol; |
|
7967 break; |
|
7968 |
|
7969 } |
|
7970 |
|
7971 |
|
7972 ERROR; |
|
7973 } |
|
7974 |
|
7975 }/*function_uint_to_sint*/ |
|
7976 break; |
|
7977 |
|
7978 /**** |
|
7979 *UINT_TO_LINT |
|
7980 */ |
|
7981 case function_uint_to_lint : |
|
7982 { |
|
7983 symbol_c *last_type_symbol = NULL; |
|
7984 |
|
7985 { |
|
7986 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
7987 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7988 symbol_c *IN_param_value = &this->default_variable_name; |
|
7989 |
|
7990 symbol_c *IN_type_symbol = param_data_type; |
|
7991 last_type_symbol = param_data_type; |
|
7992 |
|
7993 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7994 { |
|
7995 |
|
7996 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
7997 |
|
7998 if (IN_type_symbol == NULL) |
|
7999 IN_type_symbol = last_type_symbol; |
|
8000 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8001 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8002 function_type_prefix = return_type_symbol; |
|
8003 function_type_suffix = IN_type_symbol; |
|
8004 break; |
|
8005 |
|
8006 } |
|
8007 |
|
8008 |
|
8009 ERROR; |
|
8010 } |
|
8011 |
|
8012 }/*function_uint_to_lint*/ |
|
8013 break; |
|
8014 |
|
8015 /**** |
|
8016 *UINT_TO_DINT |
|
8017 */ |
|
8018 case function_uint_to_dint : |
|
8019 { |
|
8020 symbol_c *last_type_symbol = NULL; |
|
8021 |
|
8022 { |
|
8023 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8024 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8025 symbol_c *IN_param_value = &this->default_variable_name; |
|
8026 |
|
8027 symbol_c *IN_type_symbol = param_data_type; |
|
8028 last_type_symbol = param_data_type; |
|
8029 |
|
8030 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8031 { |
|
8032 |
|
8033 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8034 |
|
8035 if (IN_type_symbol == NULL) |
|
8036 IN_type_symbol = last_type_symbol; |
|
8037 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8038 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8039 function_type_prefix = return_type_symbol; |
|
8040 function_type_suffix = IN_type_symbol; |
|
8041 break; |
|
8042 |
|
8043 } |
|
8044 |
|
8045 |
|
8046 ERROR; |
|
8047 } |
|
8048 |
|
8049 }/*function_uint_to_dint*/ |
|
8050 break; |
|
8051 |
|
8052 /**** |
|
8053 *UINT_TO_DATE |
|
8054 */ |
|
8055 case function_uint_to_date : |
|
8056 { |
|
8057 symbol_c *last_type_symbol = NULL; |
|
8058 |
|
8059 { |
|
8060 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8061 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8062 symbol_c *IN_param_value = &this->default_variable_name; |
|
8063 |
|
8064 symbol_c *IN_type_symbol = param_data_type; |
|
8065 last_type_symbol = param_data_type; |
|
8066 |
|
8067 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8068 { |
|
8069 |
|
8070 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8071 |
|
8072 if (IN_type_symbol == NULL) |
|
8073 IN_type_symbol = last_type_symbol; |
|
8074 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8075 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8076 function_type_prefix = return_type_symbol; |
|
8077 break; |
|
8078 |
|
8079 } |
|
8080 |
|
8081 |
|
8082 ERROR; |
|
8083 } |
|
8084 |
|
8085 }/*function_uint_to_date*/ |
|
8086 break; |
|
8087 |
|
8088 /**** |
|
8089 *UINT_TO_DWORD |
|
8090 */ |
|
8091 case function_uint_to_dword : |
|
8092 { |
|
8093 symbol_c *last_type_symbol = NULL; |
|
8094 |
|
8095 { |
|
8096 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8097 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8098 symbol_c *IN_param_value = &this->default_variable_name; |
|
8099 |
|
8100 symbol_c *IN_type_symbol = param_data_type; |
|
8101 last_type_symbol = param_data_type; |
|
8102 |
|
8103 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8104 { |
|
8105 |
|
8106 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8107 |
|
8108 if (IN_type_symbol == NULL) |
|
8109 IN_type_symbol = last_type_symbol; |
|
8110 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8111 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8112 function_type_prefix = return_type_symbol; |
|
8113 function_type_suffix = IN_type_symbol; |
|
8114 break; |
|
8115 |
|
8116 } |
|
8117 |
|
8118 |
|
8119 ERROR; |
|
8120 } |
|
8121 |
|
8122 }/*function_uint_to_dword*/ |
|
8123 break; |
|
8124 |
|
8125 /**** |
|
8126 *UINT_TO_DT |
|
8127 */ |
|
8128 case function_uint_to_dt : |
|
8129 { |
|
8130 symbol_c *last_type_symbol = NULL; |
|
8131 |
|
8132 { |
|
8133 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8134 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8135 symbol_c *IN_param_value = &this->default_variable_name; |
|
8136 |
|
8137 symbol_c *IN_type_symbol = param_data_type; |
|
8138 last_type_symbol = param_data_type; |
|
8139 |
|
8140 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8141 { |
|
8142 |
|
8143 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8144 |
|
8145 if (IN_type_symbol == NULL) |
|
8146 IN_type_symbol = last_type_symbol; |
|
8147 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8148 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8149 function_type_prefix = return_type_symbol; |
|
8150 break; |
|
8151 |
|
8152 } |
|
8153 |
|
8154 |
|
8155 ERROR; |
|
8156 } |
|
8157 |
|
8158 }/*function_uint_to_dt*/ |
|
8159 break; |
|
8160 |
|
8161 /**** |
|
8162 *UINT_TO_TOD |
|
8163 */ |
|
8164 case function_uint_to_tod : |
|
8165 { |
|
8166 symbol_c *last_type_symbol = NULL; |
|
8167 |
|
8168 { |
|
8169 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8170 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8171 symbol_c *IN_param_value = &this->default_variable_name; |
|
8172 |
|
8173 symbol_c *IN_type_symbol = param_data_type; |
|
8174 last_type_symbol = param_data_type; |
|
8175 |
|
8176 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8177 { |
|
8178 |
|
8179 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8180 |
|
8181 if (IN_type_symbol == NULL) |
|
8182 IN_type_symbol = last_type_symbol; |
|
8183 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8184 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8185 function_type_prefix = return_type_symbol; |
|
8186 break; |
|
8187 |
|
8188 } |
|
8189 |
|
8190 |
|
8191 ERROR; |
|
8192 } |
|
8193 |
|
8194 }/*function_uint_to_tod*/ |
|
8195 break; |
|
8196 |
|
8197 /**** |
|
8198 *UINT_TO_UDINT |
|
8199 */ |
|
8200 case function_uint_to_udint : |
|
8201 { |
|
8202 symbol_c *last_type_symbol = NULL; |
|
8203 |
|
8204 { |
|
8205 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8206 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8207 symbol_c *IN_param_value = &this->default_variable_name; |
|
8208 |
|
8209 symbol_c *IN_type_symbol = param_data_type; |
|
8210 last_type_symbol = param_data_type; |
|
8211 |
|
8212 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8213 { |
|
8214 |
|
8215 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8216 |
|
8217 if (IN_type_symbol == NULL) |
|
8218 IN_type_symbol = last_type_symbol; |
|
8219 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8220 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8221 function_type_prefix = return_type_symbol; |
|
8222 function_type_suffix = IN_type_symbol; |
|
8223 break; |
|
8224 |
|
8225 } |
|
8226 |
|
8227 |
|
8228 ERROR; |
|
8229 } |
|
8230 |
|
8231 }/*function_uint_to_udint*/ |
|
8232 break; |
|
8233 |
|
8234 /**** |
|
8235 *UINT_TO_WORD |
|
8236 */ |
|
8237 case function_uint_to_word : |
|
8238 { |
|
8239 symbol_c *last_type_symbol = NULL; |
|
8240 |
|
8241 { |
|
8242 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8243 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8244 symbol_c *IN_param_value = &this->default_variable_name; |
|
8245 |
|
8246 symbol_c *IN_type_symbol = param_data_type; |
|
8247 last_type_symbol = param_data_type; |
|
8248 |
|
8249 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8250 { |
|
8251 |
|
8252 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8253 |
|
8254 if (IN_type_symbol == NULL) |
|
8255 IN_type_symbol = last_type_symbol; |
|
8256 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8257 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8258 function_type_prefix = return_type_symbol; |
|
8259 function_type_suffix = IN_type_symbol; |
|
8260 break; |
|
8261 |
|
8262 } |
|
8263 |
|
8264 |
|
8265 ERROR; |
|
8266 } |
|
8267 |
|
8268 }/*function_uint_to_word*/ |
|
8269 break; |
|
8270 |
|
8271 /**** |
|
8272 *UINT_TO_STRING |
|
8273 */ |
|
8274 case function_uint_to_string : |
|
8275 { |
|
8276 symbol_c *last_type_symbol = NULL; |
|
8277 |
|
8278 { |
|
8279 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8281 symbol_c *IN_param_value = &this->default_variable_name; |
|
8282 |
|
8283 symbol_c *IN_type_symbol = param_data_type; |
|
8284 last_type_symbol = param_data_type; |
|
8285 |
|
8286 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8287 { |
|
8288 |
|
8289 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
8290 |
|
8291 if (IN_type_symbol == NULL) |
|
8292 IN_type_symbol = last_type_symbol; |
|
8293 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8294 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8295 function_type_prefix = return_type_symbol; |
|
8296 break; |
|
8297 |
|
8298 } |
|
8299 |
|
8300 |
|
8301 ERROR; |
|
8302 } |
|
8303 |
|
8304 }/*function_uint_to_string*/ |
|
8305 break; |
|
8306 |
|
8307 /**** |
|
8308 *UINT_TO_LWORD |
|
8309 */ |
|
8310 case function_uint_to_lword : |
|
8311 { |
|
8312 symbol_c *last_type_symbol = NULL; |
|
8313 |
|
8314 { |
|
8315 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8316 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8317 symbol_c *IN_param_value = &this->default_variable_name; |
|
8318 |
|
8319 symbol_c *IN_type_symbol = param_data_type; |
|
8320 last_type_symbol = param_data_type; |
|
8321 |
|
8322 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8323 { |
|
8324 |
|
8325 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8326 |
|
8327 if (IN_type_symbol == NULL) |
|
8328 IN_type_symbol = last_type_symbol; |
|
8329 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8330 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8331 function_type_prefix = return_type_symbol; |
|
8332 function_type_suffix = IN_type_symbol; |
|
8333 break; |
|
8334 |
|
8335 } |
|
8336 |
|
8337 |
|
8338 ERROR; |
|
8339 } |
|
8340 |
|
8341 }/*function_uint_to_lword*/ |
|
8342 break; |
|
8343 |
|
8344 /**** |
|
8345 *UINT_TO_LREAL |
|
8346 */ |
|
8347 case function_uint_to_lreal : |
|
8348 { |
|
8349 symbol_c *last_type_symbol = NULL; |
|
8350 |
|
8351 { |
|
8352 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8353 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8354 symbol_c *IN_param_value = &this->default_variable_name; |
|
8355 |
|
8356 symbol_c *IN_type_symbol = param_data_type; |
|
8357 last_type_symbol = param_data_type; |
|
8358 |
|
8359 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8360 { |
|
8361 |
|
8362 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8363 |
|
8364 if (IN_type_symbol == NULL) |
|
8365 IN_type_symbol = last_type_symbol; |
|
8366 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8367 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8368 function_type_prefix = return_type_symbol; |
|
8369 function_type_suffix = IN_type_symbol; |
|
8370 break; |
|
8371 |
|
8372 } |
|
8373 |
|
8374 |
|
8375 ERROR; |
|
8376 } |
|
8377 |
|
8378 }/*function_uint_to_lreal*/ |
|
8379 break; |
|
8380 |
|
8381 /**** |
|
8382 *UINT_TO_BYTE |
|
8383 */ |
|
8384 case function_uint_to_byte : |
|
8385 { |
|
8386 symbol_c *last_type_symbol = NULL; |
|
8387 |
|
8388 { |
|
8389 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8391 symbol_c *IN_param_value = &this->default_variable_name; |
|
8392 |
|
8393 symbol_c *IN_type_symbol = param_data_type; |
|
8394 last_type_symbol = param_data_type; |
|
8395 |
|
8396 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8397 { |
|
8398 |
|
8399 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8400 |
|
8401 if (IN_type_symbol == NULL) |
|
8402 IN_type_symbol = last_type_symbol; |
|
8403 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8404 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
8405 function_type_prefix = return_type_symbol; |
|
8406 function_type_suffix = IN_type_symbol; |
|
8407 break; |
|
8408 |
|
8409 } |
|
8410 |
|
8411 |
|
8412 ERROR; |
|
8413 } |
|
8414 |
|
8415 }/*function_uint_to_byte*/ |
|
8416 break; |
|
8417 |
|
8418 /**** |
|
8419 *UINT_TO_USINT |
|
8420 */ |
|
8421 case function_uint_to_usint : |
|
8422 { |
|
8423 symbol_c *last_type_symbol = NULL; |
|
8424 |
|
8425 { |
|
8426 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8428 symbol_c *IN_param_value = &this->default_variable_name; |
|
8429 |
|
8430 symbol_c *IN_type_symbol = param_data_type; |
|
8431 last_type_symbol = param_data_type; |
|
8432 |
|
8433 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8434 { |
|
8435 |
|
8436 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8437 |
|
8438 if (IN_type_symbol == NULL) |
|
8439 IN_type_symbol = last_type_symbol; |
|
8440 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8441 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8442 function_type_prefix = return_type_symbol; |
|
8443 function_type_suffix = IN_type_symbol; |
|
8444 break; |
|
8445 |
|
8446 } |
|
8447 |
|
8448 |
|
8449 ERROR; |
|
8450 } |
|
8451 |
|
8452 }/*function_uint_to_usint*/ |
|
8453 break; |
|
8454 |
|
8455 /**** |
|
8456 *UINT_TO_ULINT |
|
8457 */ |
|
8458 case function_uint_to_ulint : |
|
8459 { |
|
8460 symbol_c *last_type_symbol = NULL; |
|
8461 |
|
8462 { |
|
8463 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8464 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8465 symbol_c *IN_param_value = &this->default_variable_name; |
|
8466 |
|
8467 symbol_c *IN_type_symbol = param_data_type; |
|
8468 last_type_symbol = param_data_type; |
|
8469 |
|
8470 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8471 { |
|
8472 |
|
8473 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8474 |
|
8475 if (IN_type_symbol == NULL) |
|
8476 IN_type_symbol = last_type_symbol; |
|
8477 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8478 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8479 function_type_prefix = return_type_symbol; |
|
8480 function_type_suffix = IN_type_symbol; |
|
8481 break; |
|
8482 |
|
8483 } |
|
8484 |
|
8485 |
|
8486 ERROR; |
|
8487 } |
|
8488 |
|
8489 }/*function_uint_to_ulint*/ |
|
8490 break; |
|
8491 |
|
8492 /**** |
|
8493 *UINT_TO_BOOL |
|
8494 */ |
|
8495 case function_uint_to_bool : |
|
8496 { |
|
8497 symbol_c *last_type_symbol = NULL; |
|
8498 |
|
8499 { |
|
8500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8502 symbol_c *IN_param_value = &this->default_variable_name; |
|
8503 |
|
8504 symbol_c *IN_type_symbol = param_data_type; |
|
8505 last_type_symbol = param_data_type; |
|
8506 |
|
8507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8508 { |
|
8509 |
|
8510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8511 |
|
8512 if (IN_type_symbol == NULL) |
|
8513 IN_type_symbol = last_type_symbol; |
|
8514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8515 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8516 function_type_prefix = return_type_symbol; |
|
8517 function_type_suffix = IN_type_symbol; |
|
8518 break; |
|
8519 |
|
8520 } |
|
8521 |
|
8522 |
|
8523 ERROR; |
|
8524 } |
|
8525 |
|
8526 }/*function_uint_to_bool*/ |
|
8527 break; |
|
8528 |
|
8529 /**** |
|
8530 *UINT_TO_TIME |
|
8531 */ |
|
8532 case function_uint_to_time : |
|
8533 { |
|
8534 symbol_c *last_type_symbol = NULL; |
|
8535 |
|
8536 { |
|
8537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8539 symbol_c *IN_param_value = &this->default_variable_name; |
|
8540 |
|
8541 symbol_c *IN_type_symbol = param_data_type; |
|
8542 last_type_symbol = param_data_type; |
|
8543 |
|
8544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8545 { |
|
8546 |
|
8547 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8548 |
|
8549 if (IN_type_symbol == NULL) |
|
8550 IN_type_symbol = last_type_symbol; |
|
8551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8552 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
8553 function_type_prefix = return_type_symbol; |
|
8554 break; |
|
8555 |
|
8556 } |
|
8557 |
|
8558 |
|
8559 ERROR; |
|
8560 } |
|
8561 |
|
8562 }/*function_uint_to_time*/ |
|
8563 break; |
|
8564 |
|
8565 /**** |
|
8566 *UINT_TO_INT |
|
8567 */ |
|
8568 case function_uint_to_int : |
|
8569 { |
|
8570 symbol_c *last_type_symbol = NULL; |
|
8571 |
|
8572 { |
|
8573 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8575 symbol_c *IN_param_value = &this->default_variable_name; |
|
8576 |
|
8577 symbol_c *IN_type_symbol = param_data_type; |
|
8578 last_type_symbol = param_data_type; |
|
8579 |
|
8580 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
8581 { |
|
8582 |
|
8583 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8584 |
|
8585 if (IN_type_symbol == NULL) |
|
8586 IN_type_symbol = last_type_symbol; |
|
8587 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8588 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8589 function_type_prefix = return_type_symbol; |
|
8590 function_type_suffix = IN_type_symbol; |
|
8591 break; |
|
8592 |
|
8593 } |
|
8594 |
|
8595 |
|
8596 ERROR; |
|
8597 } |
|
8598 |
|
8599 }/*function_uint_to_int*/ |
|
8600 break; |
|
8601 |
|
8602 /**** |
|
8603 *LREAL_TO_REAL |
|
8604 */ |
|
8605 case function_lreal_to_real : |
|
8606 { |
|
8607 symbol_c *last_type_symbol = NULL; |
|
8608 |
|
8609 { |
|
8610 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8612 symbol_c *IN_param_value = &this->default_variable_name; |
|
8613 |
|
8614 symbol_c *IN_type_symbol = param_data_type; |
|
8615 last_type_symbol = param_data_type; |
|
8616 |
|
8617 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8618 { |
|
8619 |
|
8620 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
8621 |
|
8622 if (IN_type_symbol == NULL) |
|
8623 IN_type_symbol = last_type_symbol; |
|
8624 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8625 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8626 function_type_prefix = return_type_symbol; |
|
8627 function_type_suffix = IN_type_symbol; |
|
8628 break; |
|
8629 |
|
8630 } |
|
8631 |
|
8632 |
|
8633 ERROR; |
|
8634 } |
|
8635 |
|
8636 }/*function_lreal_to_real*/ |
|
8637 break; |
|
8638 |
|
8639 /**** |
|
8640 *LREAL_TO_SINT |
|
8641 */ |
|
8642 case function_lreal_to_sint : |
|
8643 { |
|
8644 symbol_c *last_type_symbol = NULL; |
|
8645 |
|
8646 { |
|
8647 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8648 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8649 symbol_c *IN_param_value = &this->default_variable_name; |
|
8650 |
|
8651 symbol_c *IN_type_symbol = param_data_type; |
|
8652 last_type_symbol = param_data_type; |
|
8653 |
|
8654 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8655 { |
|
8656 |
|
8657 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8658 |
|
8659 if (IN_type_symbol == NULL) |
|
8660 IN_type_symbol = last_type_symbol; |
|
8661 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8662 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8663 function_type_prefix = return_type_symbol; |
|
8664 break; |
|
8665 |
|
8666 } |
|
8667 |
|
8668 |
|
8669 ERROR; |
|
8670 } |
|
8671 |
|
8672 }/*function_lreal_to_sint*/ |
|
8673 break; |
|
8674 |
|
8675 /**** |
|
8676 *LREAL_TO_LINT |
|
8677 */ |
|
8678 case function_lreal_to_lint : |
|
8679 { |
|
8680 symbol_c *last_type_symbol = NULL; |
|
8681 |
|
8682 { |
|
8683 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8685 symbol_c *IN_param_value = &this->default_variable_name; |
|
8686 |
|
8687 symbol_c *IN_type_symbol = param_data_type; |
|
8688 last_type_symbol = param_data_type; |
|
8689 |
|
8690 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8691 { |
|
8692 |
|
8693 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8694 |
|
8695 if (IN_type_symbol == NULL) |
|
8696 IN_type_symbol = last_type_symbol; |
|
8697 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8698 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8699 function_type_prefix = return_type_symbol; |
|
8700 break; |
|
8701 |
|
8702 } |
|
8703 |
|
8704 |
|
8705 ERROR; |
|
8706 } |
|
8707 |
|
8708 }/*function_lreal_to_lint*/ |
|
8709 break; |
|
8710 |
|
8711 /**** |
|
8712 *LREAL_TO_DINT |
|
8713 */ |
|
8714 case function_lreal_to_dint : |
|
8715 { |
|
8716 symbol_c *last_type_symbol = NULL; |
|
8717 |
|
8718 { |
|
8719 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8720 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8721 symbol_c *IN_param_value = &this->default_variable_name; |
|
8722 |
|
8723 symbol_c *IN_type_symbol = param_data_type; |
|
8724 last_type_symbol = param_data_type; |
|
8725 |
|
8726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8727 { |
|
8728 |
|
8729 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
8730 |
|
8731 if (IN_type_symbol == NULL) |
|
8732 IN_type_symbol = last_type_symbol; |
|
8733 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8734 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8735 function_type_prefix = return_type_symbol; |
|
8736 break; |
|
8737 |
|
8738 } |
|
8739 |
|
8740 |
|
8741 ERROR; |
|
8742 } |
|
8743 |
|
8744 }/*function_lreal_to_dint*/ |
|
8745 break; |
|
8746 |
|
8747 /**** |
|
8748 *LREAL_TO_DATE |
|
8749 */ |
|
8750 case function_lreal_to_date : |
|
8751 { |
|
8752 symbol_c *last_type_symbol = NULL; |
|
8753 |
|
8754 { |
|
8755 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8756 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8757 symbol_c *IN_param_value = &this->default_variable_name; |
|
8758 |
|
8759 symbol_c *IN_type_symbol = param_data_type; |
|
8760 last_type_symbol = param_data_type; |
|
8761 |
|
8762 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8763 { |
|
8764 |
|
8765 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8766 |
|
8767 if (IN_type_symbol == NULL) |
|
8768 IN_type_symbol = last_type_symbol; |
|
8769 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8770 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8771 function_type_prefix = return_type_symbol; |
|
8772 break; |
|
8773 |
|
8774 } |
|
8775 |
|
8776 |
|
8777 ERROR; |
|
8778 } |
|
8779 |
|
8780 }/*function_lreal_to_date*/ |
|
8781 break; |
|
8782 |
|
8783 /**** |
|
8784 *LREAL_TO_DWORD |
|
8785 */ |
|
8786 case function_lreal_to_dword : |
|
8787 { |
|
8788 symbol_c *last_type_symbol = NULL; |
|
8789 |
|
8790 { |
|
8791 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8792 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8793 symbol_c *IN_param_value = &this->default_variable_name; |
|
8794 |
|
8795 symbol_c *IN_type_symbol = param_data_type; |
|
8796 last_type_symbol = param_data_type; |
|
8797 |
|
8798 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8799 { |
|
8800 |
|
8801 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
8802 |
|
8803 if (IN_type_symbol == NULL) |
|
8804 IN_type_symbol = last_type_symbol; |
|
8805 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8806 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8807 function_type_prefix = return_type_symbol; |
|
8808 break; |
|
8809 |
|
8810 } |
|
8811 |
|
8812 |
|
8813 ERROR; |
|
8814 } |
|
8815 |
|
8816 }/*function_lreal_to_dword*/ |
|
8817 break; |
|
8818 |
|
8819 /**** |
|
8820 *LREAL_TO_DT |
|
8821 */ |
|
8822 case function_lreal_to_dt : |
|
8823 { |
|
8824 symbol_c *last_type_symbol = NULL; |
|
8825 |
|
8826 { |
|
8827 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8828 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8829 symbol_c *IN_param_value = &this->default_variable_name; |
|
8830 |
|
8831 symbol_c *IN_type_symbol = param_data_type; |
|
8832 last_type_symbol = param_data_type; |
|
8833 |
|
8834 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8835 { |
|
8836 |
|
8837 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8838 |
|
8839 if (IN_type_symbol == NULL) |
|
8840 IN_type_symbol = last_type_symbol; |
|
8841 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8842 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8843 function_type_prefix = return_type_symbol; |
|
8844 break; |
|
8845 |
|
8846 } |
|
8847 |
|
8848 |
|
8849 ERROR; |
|
8850 } |
|
8851 |
|
8852 }/*function_lreal_to_dt*/ |
|
8853 break; |
|
8854 |
|
8855 /**** |
|
8856 *LREAL_TO_TOD |
|
8857 */ |
|
8858 case function_lreal_to_tod : |
|
8859 { |
|
8860 symbol_c *last_type_symbol = NULL; |
|
8861 |
|
8862 { |
|
8863 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8864 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8865 symbol_c *IN_param_value = &this->default_variable_name; |
|
8866 |
|
8867 symbol_c *IN_type_symbol = param_data_type; |
|
8868 last_type_symbol = param_data_type; |
|
8869 |
|
8870 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8871 { |
|
8872 |
|
8873 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
8874 |
|
8875 if (IN_type_symbol == NULL) |
|
8876 IN_type_symbol = last_type_symbol; |
|
8877 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8878 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8879 function_type_prefix = return_type_symbol; |
|
8880 break; |
|
8881 |
|
8882 } |
|
8883 |
|
8884 |
|
8885 ERROR; |
|
8886 } |
|
8887 |
|
8888 }/*function_lreal_to_tod*/ |
|
8889 break; |
|
8890 |
|
8891 /**** |
|
8892 *LREAL_TO_UDINT |
|
8893 */ |
|
8894 case function_lreal_to_udint : |
|
8895 { |
|
8896 symbol_c *last_type_symbol = NULL; |
|
8897 |
|
8898 { |
|
8899 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8900 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8901 symbol_c *IN_param_value = &this->default_variable_name; |
|
8902 |
|
8903 symbol_c *IN_type_symbol = param_data_type; |
|
8904 last_type_symbol = param_data_type; |
|
8905 |
|
8906 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8907 { |
|
8908 |
|
8909 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
8910 |
|
8911 if (IN_type_symbol == NULL) |
|
8912 IN_type_symbol = last_type_symbol; |
|
8913 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8914 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8915 function_type_prefix = return_type_symbol; |
|
8916 break; |
|
8917 |
|
8918 } |
|
8919 |
|
8920 |
|
8921 ERROR; |
|
8922 } |
|
8923 |
|
8924 }/*function_lreal_to_udint*/ |
|
8925 break; |
|
8926 |
|
8927 /**** |
|
8928 *LREAL_TO_WORD |
|
8929 */ |
|
8930 case function_lreal_to_word : |
|
8931 { |
|
8932 symbol_c *last_type_symbol = NULL; |
|
8933 |
|
8934 { |
|
8935 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8936 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8937 symbol_c *IN_param_value = &this->default_variable_name; |
|
8938 |
|
8939 symbol_c *IN_type_symbol = param_data_type; |
|
8940 last_type_symbol = param_data_type; |
|
8941 |
|
8942 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8943 { |
|
8944 |
|
8945 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
8946 |
|
8947 if (IN_type_symbol == NULL) |
|
8948 IN_type_symbol = last_type_symbol; |
|
8949 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8950 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8951 function_type_prefix = return_type_symbol; |
|
8952 break; |
|
8953 |
|
8954 } |
|
8955 |
|
8956 |
|
8957 ERROR; |
|
8958 } |
|
8959 |
|
8960 }/*function_lreal_to_word*/ |
|
8961 break; |
|
8962 |
|
8963 /**** |
|
8964 *LREAL_TO_STRING |
|
8965 */ |
|
8966 case function_lreal_to_string : |
|
8967 { |
|
8968 symbol_c *last_type_symbol = NULL; |
|
8969 |
|
8970 { |
|
8971 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
8972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8973 symbol_c *IN_param_value = &this->default_variable_name; |
|
8974 |
|
8975 symbol_c *IN_type_symbol = param_data_type; |
|
8976 last_type_symbol = param_data_type; |
|
8977 |
|
8978 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8979 { |
|
8980 |
|
8981 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
8982 |
|
8983 if (IN_type_symbol == NULL) |
|
8984 IN_type_symbol = last_type_symbol; |
|
8985 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8986 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8987 function_type_prefix = return_type_symbol; |
|
8988 break; |
|
8989 |
|
8990 } |
|
8991 |
|
8992 |
|
8993 ERROR; |
|
8994 } |
|
8995 |
|
8996 }/*function_lreal_to_string*/ |
|
8997 break; |
|
8998 |
|
8999 /**** |
|
9000 *LREAL_TO_LWORD |
|
9001 */ |
|
9002 case function_lreal_to_lword : |
|
9003 { |
|
9004 symbol_c *last_type_symbol = NULL; |
|
9005 |
|
9006 { |
|
9007 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9008 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9009 symbol_c *IN_param_value = &this->default_variable_name; |
|
9010 |
|
9011 symbol_c *IN_type_symbol = param_data_type; |
|
9012 last_type_symbol = param_data_type; |
|
9013 |
|
9014 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9015 { |
|
9016 |
|
9017 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9018 |
|
9019 if (IN_type_symbol == NULL) |
|
9020 IN_type_symbol = last_type_symbol; |
|
9021 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9022 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9023 function_type_prefix = return_type_symbol; |
|
9024 break; |
|
9025 |
|
9026 } |
|
9027 |
|
9028 |
|
9029 ERROR; |
|
9030 } |
|
9031 |
|
9032 }/*function_lreal_to_lword*/ |
|
9033 break; |
|
9034 |
|
9035 /**** |
|
9036 *LREAL_TO_UINT |
|
9037 */ |
|
9038 case function_lreal_to_uint : |
|
9039 { |
|
9040 symbol_c *last_type_symbol = NULL; |
|
9041 |
|
9042 { |
|
9043 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9044 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9045 symbol_c *IN_param_value = &this->default_variable_name; |
|
9046 |
|
9047 symbol_c *IN_type_symbol = param_data_type; |
|
9048 last_type_symbol = param_data_type; |
|
9049 |
|
9050 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9051 { |
|
9052 |
|
9053 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9054 |
|
9055 if (IN_type_symbol == NULL) |
|
9056 IN_type_symbol = last_type_symbol; |
|
9057 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9058 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9059 function_type_prefix = return_type_symbol; |
|
9060 break; |
|
9061 |
|
9062 } |
|
9063 |
|
9064 |
|
9065 ERROR; |
|
9066 } |
|
9067 |
|
9068 }/*function_lreal_to_uint*/ |
|
9069 break; |
|
9070 |
|
9071 /**** |
|
9072 *LREAL_TO_BYTE |
|
9073 */ |
|
9074 case function_lreal_to_byte : |
|
9075 { |
|
9076 symbol_c *last_type_symbol = NULL; |
|
9077 |
|
9078 { |
|
9079 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9080 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9081 symbol_c *IN_param_value = &this->default_variable_name; |
|
9082 |
|
9083 symbol_c *IN_type_symbol = param_data_type; |
|
9084 last_type_symbol = param_data_type; |
|
9085 |
|
9086 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9087 { |
|
9088 |
|
9089 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9090 |
|
9091 if (IN_type_symbol == NULL) |
|
9092 IN_type_symbol = last_type_symbol; |
|
9093 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9094 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9095 function_type_prefix = return_type_symbol; |
|
9096 break; |
|
9097 |
|
9098 } |
|
9099 |
|
9100 |
|
9101 ERROR; |
|
9102 } |
|
9103 |
|
9104 }/*function_lreal_to_byte*/ |
|
9105 break; |
|
9106 |
|
9107 /**** |
|
9108 *LREAL_TO_USINT |
|
9109 */ |
|
9110 case function_lreal_to_usint : |
|
9111 { |
|
9112 symbol_c *last_type_symbol = NULL; |
|
9113 |
|
9114 { |
|
9115 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9116 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9117 symbol_c *IN_param_value = &this->default_variable_name; |
|
9118 |
|
9119 symbol_c *IN_type_symbol = param_data_type; |
|
9120 last_type_symbol = param_data_type; |
|
9121 |
|
9122 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9123 { |
|
9124 |
|
9125 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9126 |
|
9127 if (IN_type_symbol == NULL) |
|
9128 IN_type_symbol = last_type_symbol; |
|
9129 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9130 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9131 function_type_prefix = return_type_symbol; |
|
9132 break; |
|
9133 |
|
9134 } |
|
9135 |
|
9136 |
|
9137 ERROR; |
|
9138 } |
|
9139 |
|
9140 }/*function_lreal_to_usint*/ |
|
9141 break; |
|
9142 |
|
9143 /**** |
|
9144 *LREAL_TO_ULINT |
|
9145 */ |
|
9146 case function_lreal_to_ulint : |
|
9147 { |
|
9148 symbol_c *last_type_symbol = NULL; |
|
9149 |
|
9150 { |
|
9151 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9152 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9153 symbol_c *IN_param_value = &this->default_variable_name; |
|
9154 |
|
9155 symbol_c *IN_type_symbol = param_data_type; |
|
9156 last_type_symbol = param_data_type; |
|
9157 |
|
9158 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9159 { |
|
9160 |
|
9161 function_name = (symbol_c*)(new pragma_c("__real_to_uint")); |
|
9162 |
|
9163 if (IN_type_symbol == NULL) |
|
9164 IN_type_symbol = last_type_symbol; |
|
9165 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9166 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9167 function_type_prefix = return_type_symbol; |
|
9168 break; |
|
9169 |
|
9170 } |
|
9171 |
|
9172 |
|
9173 ERROR; |
|
9174 } |
|
9175 |
|
9176 }/*function_lreal_to_ulint*/ |
|
9177 break; |
|
9178 |
|
9179 /**** |
|
9180 *LREAL_TO_BOOL |
|
9181 */ |
|
9182 case function_lreal_to_bool : |
|
9183 { |
|
9184 symbol_c *last_type_symbol = NULL; |
|
9185 |
|
9186 { |
|
9187 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9188 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9189 symbol_c *IN_param_value = &this->default_variable_name; |
|
9190 |
|
9191 symbol_c *IN_type_symbol = param_data_type; |
|
9192 last_type_symbol = param_data_type; |
|
9193 |
|
9194 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9195 { |
|
9196 |
|
9197 function_name = (symbol_c*)(new pragma_c("__real_to_bit")); |
|
9198 |
|
9199 if (IN_type_symbol == NULL) |
|
9200 IN_type_symbol = last_type_symbol; |
|
9201 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9202 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9203 function_type_prefix = return_type_symbol; |
|
9204 break; |
|
9205 |
|
9206 } |
|
9207 |
|
9208 |
|
9209 ERROR; |
|
9210 } |
|
9211 |
|
9212 }/*function_lreal_to_bool*/ |
|
9213 break; |
|
9214 |
|
9215 /**** |
|
9216 *LREAL_TO_TIME |
|
9217 */ |
|
9218 case function_lreal_to_time : |
|
9219 { |
|
9220 symbol_c *last_type_symbol = NULL; |
|
9221 |
|
9222 { |
|
9223 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9224 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9225 symbol_c *IN_param_value = &this->default_variable_name; |
|
9226 |
|
9227 symbol_c *IN_type_symbol = param_data_type; |
|
9228 last_type_symbol = param_data_type; |
|
9229 |
|
9230 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9231 { |
|
9232 |
|
9233 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
9234 |
|
9235 if (IN_type_symbol == NULL) |
|
9236 IN_type_symbol = last_type_symbol; |
|
9237 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9238 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9239 function_type_prefix = return_type_symbol; |
|
9240 break; |
|
9241 |
|
9242 } |
|
9243 |
|
9244 |
|
9245 ERROR; |
|
9246 } |
|
9247 |
|
9248 }/*function_lreal_to_time*/ |
|
9249 break; |
|
9250 |
|
9251 /**** |
|
9252 *LREAL_TO_INT |
|
9253 */ |
|
9254 case function_lreal_to_int : |
|
9255 { |
|
9256 symbol_c *last_type_symbol = NULL; |
|
9257 |
|
9258 { |
|
9259 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9260 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9261 symbol_c *IN_param_value = &this->default_variable_name; |
|
9262 |
|
9263 symbol_c *IN_type_symbol = param_data_type; |
|
9264 last_type_symbol = param_data_type; |
|
9265 |
|
9266 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9267 { |
|
9268 |
|
9269 function_name = (symbol_c*)(new pragma_c("__real_to_sint")); |
|
9270 |
|
9271 if (IN_type_symbol == NULL) |
|
9272 IN_type_symbol = last_type_symbol; |
|
9273 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9274 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9275 function_type_prefix = return_type_symbol; |
|
9276 break; |
|
9277 |
|
9278 } |
|
9279 |
|
9280 |
|
9281 ERROR; |
|
9282 } |
|
9283 |
|
9284 }/*function_lreal_to_int*/ |
|
9285 break; |
|
9286 |
|
9287 /**** |
|
9288 *BYTE_TO_REAL |
|
9289 */ |
|
9290 case function_byte_to_real : |
|
9291 { |
|
9292 symbol_c *last_type_symbol = NULL; |
|
9293 |
|
9294 { |
|
9295 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9297 symbol_c *IN_param_value = &this->default_variable_name; |
|
9298 |
|
9299 symbol_c *IN_type_symbol = param_data_type; |
|
9300 last_type_symbol = param_data_type; |
|
9301 |
|
9302 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9303 { |
|
9304 |
|
9305 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9306 |
|
9307 if (IN_type_symbol == NULL) |
|
9308 IN_type_symbol = last_type_symbol; |
|
9309 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9310 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9311 function_type_prefix = return_type_symbol; |
|
9312 function_type_suffix = IN_type_symbol; |
|
9313 break; |
|
9314 |
|
9315 } |
|
9316 |
|
9317 |
|
9318 ERROR; |
|
9319 } |
|
9320 |
|
9321 }/*function_byte_to_real*/ |
|
9322 break; |
|
9323 |
|
9324 /**** |
|
9325 *BYTE_TO_SINT |
|
9326 */ |
|
9327 case function_byte_to_sint : |
|
9328 { |
|
9329 symbol_c *last_type_symbol = NULL; |
|
9330 |
|
9331 { |
|
9332 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9333 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9334 symbol_c *IN_param_value = &this->default_variable_name; |
|
9335 |
|
9336 symbol_c *IN_type_symbol = param_data_type; |
|
9337 last_type_symbol = param_data_type; |
|
9338 |
|
9339 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9340 { |
|
9341 |
|
9342 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9343 |
|
9344 if (IN_type_symbol == NULL) |
|
9345 IN_type_symbol = last_type_symbol; |
|
9346 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9347 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9348 function_type_prefix = return_type_symbol; |
|
9349 function_type_suffix = IN_type_symbol; |
|
9350 break; |
|
9351 |
|
9352 } |
|
9353 |
|
9354 |
|
9355 ERROR; |
|
9356 } |
|
9357 |
|
9358 }/*function_byte_to_sint*/ |
|
9359 break; |
|
9360 |
|
9361 /**** |
|
9362 *BYTE_TO_LINT |
|
9363 */ |
|
9364 case function_byte_to_lint : |
|
9365 { |
|
9366 symbol_c *last_type_symbol = NULL; |
|
9367 |
|
9368 { |
|
9369 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9370 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9371 symbol_c *IN_param_value = &this->default_variable_name; |
|
9372 |
|
9373 symbol_c *IN_type_symbol = param_data_type; |
|
9374 last_type_symbol = param_data_type; |
|
9375 |
|
9376 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9377 { |
|
9378 |
|
9379 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9380 |
|
9381 if (IN_type_symbol == NULL) |
|
9382 IN_type_symbol = last_type_symbol; |
|
9383 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9384 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9385 function_type_prefix = return_type_symbol; |
|
9386 function_type_suffix = IN_type_symbol; |
|
9387 break; |
|
9388 |
|
9389 } |
|
9390 |
|
9391 |
|
9392 ERROR; |
|
9393 } |
|
9394 |
|
9395 }/*function_byte_to_lint*/ |
|
9396 break; |
|
9397 |
|
9398 /**** |
|
9399 *BYTE_TO_DINT |
|
9400 */ |
|
9401 case function_byte_to_dint : |
|
9402 { |
|
9403 symbol_c *last_type_symbol = NULL; |
|
9404 |
|
9405 { |
|
9406 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9407 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9408 symbol_c *IN_param_value = &this->default_variable_name; |
|
9409 |
|
9410 symbol_c *IN_type_symbol = param_data_type; |
|
9411 last_type_symbol = param_data_type; |
|
9412 |
|
9413 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9414 { |
|
9415 |
|
9416 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9417 |
|
9418 if (IN_type_symbol == NULL) |
|
9419 IN_type_symbol = last_type_symbol; |
|
9420 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9421 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9422 function_type_prefix = return_type_symbol; |
|
9423 function_type_suffix = IN_type_symbol; |
|
9424 break; |
|
9425 |
|
9426 } |
|
9427 |
|
9428 |
|
9429 ERROR; |
|
9430 } |
|
9431 |
|
9432 }/*function_byte_to_dint*/ |
|
9433 break; |
|
9434 |
|
9435 /**** |
|
9436 *BYTE_TO_DATE |
|
9437 */ |
|
9438 case function_byte_to_date : |
|
9439 { |
|
9440 symbol_c *last_type_symbol = NULL; |
|
9441 |
|
9442 { |
|
9443 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9444 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9445 symbol_c *IN_param_value = &this->default_variable_name; |
|
9446 |
|
9447 symbol_c *IN_type_symbol = param_data_type; |
|
9448 last_type_symbol = param_data_type; |
|
9449 |
|
9450 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9451 { |
|
9452 |
|
9453 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9454 |
|
9455 if (IN_type_symbol == NULL) |
|
9456 IN_type_symbol = last_type_symbol; |
|
9457 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9458 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9459 function_type_prefix = return_type_symbol; |
|
9460 break; |
|
9461 |
|
9462 } |
|
9463 |
|
9464 |
|
9465 ERROR; |
|
9466 } |
|
9467 |
|
9468 }/*function_byte_to_date*/ |
|
9469 break; |
|
9470 |
|
9471 /**** |
|
9472 *BYTE_TO_DWORD |
|
9473 */ |
|
9474 case function_byte_to_dword : |
|
9475 { |
|
9476 symbol_c *last_type_symbol = NULL; |
|
9477 |
|
9478 { |
|
9479 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9480 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9481 symbol_c *IN_param_value = &this->default_variable_name; |
|
9482 |
|
9483 symbol_c *IN_type_symbol = param_data_type; |
|
9484 last_type_symbol = param_data_type; |
|
9485 |
|
9486 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9487 { |
|
9488 |
|
9489 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9490 |
|
9491 if (IN_type_symbol == NULL) |
|
9492 IN_type_symbol = last_type_symbol; |
|
9493 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9494 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
9495 function_type_prefix = return_type_symbol; |
|
9496 function_type_suffix = IN_type_symbol; |
|
9497 break; |
|
9498 |
|
9499 } |
|
9500 |
|
9501 |
|
9502 ERROR; |
|
9503 } |
|
9504 |
|
9505 }/*function_byte_to_dword*/ |
|
9506 break; |
|
9507 |
|
9508 /**** |
|
9509 *BYTE_TO_DT |
|
9510 */ |
|
9511 case function_byte_to_dt : |
|
9512 { |
|
9513 symbol_c *last_type_symbol = NULL; |
|
9514 |
|
9515 { |
|
9516 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9517 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9518 symbol_c *IN_param_value = &this->default_variable_name; |
|
9519 |
|
9520 symbol_c *IN_type_symbol = param_data_type; |
|
9521 last_type_symbol = param_data_type; |
|
9522 |
|
9523 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9524 { |
|
9525 |
|
9526 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9527 |
|
9528 if (IN_type_symbol == NULL) |
|
9529 IN_type_symbol = last_type_symbol; |
|
9530 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9531 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9532 function_type_prefix = return_type_symbol; |
|
9533 break; |
|
9534 |
|
9535 } |
|
9536 |
|
9537 |
|
9538 ERROR; |
|
9539 } |
|
9540 |
|
9541 }/*function_byte_to_dt*/ |
|
9542 break; |
|
9543 |
|
9544 /**** |
|
9545 *BYTE_TO_TOD |
|
9546 */ |
|
9547 case function_byte_to_tod : |
|
9548 { |
|
9549 symbol_c *last_type_symbol = NULL; |
|
9550 |
|
9551 { |
|
9552 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9553 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9554 symbol_c *IN_param_value = &this->default_variable_name; |
|
9555 |
|
9556 symbol_c *IN_type_symbol = param_data_type; |
|
9557 last_type_symbol = param_data_type; |
|
9558 |
|
9559 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9560 { |
|
9561 |
|
9562 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9563 |
|
9564 if (IN_type_symbol == NULL) |
|
9565 IN_type_symbol = last_type_symbol; |
|
9566 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9567 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9568 function_type_prefix = return_type_symbol; |
|
9569 break; |
|
9570 |
|
9571 } |
|
9572 |
|
9573 |
|
9574 ERROR; |
|
9575 } |
|
9576 |
|
9577 }/*function_byte_to_tod*/ |
|
9578 break; |
|
9579 |
|
9580 /**** |
|
9581 *BYTE_TO_UDINT |
|
9582 */ |
|
9583 case function_byte_to_udint : |
|
9584 { |
|
9585 symbol_c *last_type_symbol = NULL; |
|
9586 |
|
9587 { |
|
9588 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9589 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9590 symbol_c *IN_param_value = &this->default_variable_name; |
|
9591 |
|
9592 symbol_c *IN_type_symbol = param_data_type; |
|
9593 last_type_symbol = param_data_type; |
|
9594 |
|
9595 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9596 { |
|
9597 |
|
9598 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9599 |
|
9600 if (IN_type_symbol == NULL) |
|
9601 IN_type_symbol = last_type_symbol; |
|
9602 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9603 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9604 function_type_prefix = return_type_symbol; |
|
9605 function_type_suffix = IN_type_symbol; |
|
9606 break; |
|
9607 |
|
9608 } |
|
9609 |
|
9610 |
|
9611 ERROR; |
|
9612 } |
|
9613 |
|
9614 }/*function_byte_to_udint*/ |
|
9615 break; |
|
9616 |
|
9617 /**** |
|
9618 *BYTE_TO_WORD |
|
9619 */ |
|
9620 case function_byte_to_word : |
|
9621 { |
|
9622 symbol_c *last_type_symbol = NULL; |
|
9623 |
|
9624 { |
|
9625 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9626 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9627 symbol_c *IN_param_value = &this->default_variable_name; |
|
9628 |
|
9629 symbol_c *IN_type_symbol = param_data_type; |
|
9630 last_type_symbol = param_data_type; |
|
9631 |
|
9632 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9633 { |
|
9634 |
|
9635 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9636 |
|
9637 if (IN_type_symbol == NULL) |
|
9638 IN_type_symbol = last_type_symbol; |
|
9639 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9640 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9641 function_type_prefix = return_type_symbol; |
|
9642 function_type_suffix = IN_type_symbol; |
|
9643 break; |
|
9644 |
|
9645 } |
|
9646 |
|
9647 |
|
9648 ERROR; |
|
9649 } |
|
9650 |
|
9651 }/*function_byte_to_word*/ |
|
9652 break; |
|
9653 |
|
9654 /**** |
|
9655 *BYTE_TO_STRING |
|
9656 */ |
|
9657 case function_byte_to_string : |
|
9658 { |
|
9659 symbol_c *last_type_symbol = NULL; |
|
9660 |
|
9661 { |
|
9662 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9664 symbol_c *IN_param_value = &this->default_variable_name; |
|
9665 |
|
9666 symbol_c *IN_type_symbol = param_data_type; |
|
9667 last_type_symbol = param_data_type; |
|
9668 |
|
9669 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9670 { |
|
9671 |
|
9672 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
9673 |
|
9674 if (IN_type_symbol == NULL) |
|
9675 IN_type_symbol = last_type_symbol; |
|
9676 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9677 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9678 function_type_prefix = return_type_symbol; |
|
9679 break; |
|
9680 |
|
9681 } |
|
9682 |
|
9683 |
|
9684 ERROR; |
|
9685 } |
|
9686 |
|
9687 }/*function_byte_to_string*/ |
|
9688 break; |
|
9689 |
|
9690 /**** |
|
9691 *BYTE_TO_LWORD |
|
9692 */ |
|
9693 case function_byte_to_lword : |
|
9694 { |
|
9695 symbol_c *last_type_symbol = NULL; |
|
9696 |
|
9697 { |
|
9698 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9699 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9700 symbol_c *IN_param_value = &this->default_variable_name; |
|
9701 |
|
9702 symbol_c *IN_type_symbol = param_data_type; |
|
9703 last_type_symbol = param_data_type; |
|
9704 |
|
9705 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9706 { |
|
9707 |
|
9708 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9709 |
|
9710 if (IN_type_symbol == NULL) |
|
9711 IN_type_symbol = last_type_symbol; |
|
9712 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9713 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9714 function_type_prefix = return_type_symbol; |
|
9715 function_type_suffix = IN_type_symbol; |
|
9716 break; |
|
9717 |
|
9718 } |
|
9719 |
|
9720 |
|
9721 ERROR; |
|
9722 } |
|
9723 |
|
9724 }/*function_byte_to_lword*/ |
|
9725 break; |
|
9726 |
|
9727 /**** |
|
9728 *BYTE_TO_UINT |
|
9729 */ |
|
9730 case function_byte_to_uint : |
|
9731 { |
|
9732 symbol_c *last_type_symbol = NULL; |
|
9733 |
|
9734 { |
|
9735 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9736 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9737 symbol_c *IN_param_value = &this->default_variable_name; |
|
9738 |
|
9739 symbol_c *IN_type_symbol = param_data_type; |
|
9740 last_type_symbol = param_data_type; |
|
9741 |
|
9742 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9743 { |
|
9744 |
|
9745 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9746 |
|
9747 if (IN_type_symbol == NULL) |
|
9748 IN_type_symbol = last_type_symbol; |
|
9749 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9750 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9751 function_type_prefix = return_type_symbol; |
|
9752 function_type_suffix = IN_type_symbol; |
|
9753 break; |
|
9754 |
|
9755 } |
|
9756 |
|
9757 |
|
9758 ERROR; |
|
9759 } |
|
9760 |
|
9761 }/*function_byte_to_uint*/ |
|
9762 break; |
|
9763 |
|
9764 /**** |
|
9765 *BYTE_TO_LREAL |
|
9766 */ |
|
9767 case function_byte_to_lreal : |
|
9768 { |
|
9769 symbol_c *last_type_symbol = NULL; |
|
9770 |
|
9771 { |
|
9772 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9773 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9774 symbol_c *IN_param_value = &this->default_variable_name; |
|
9775 |
|
9776 symbol_c *IN_type_symbol = param_data_type; |
|
9777 last_type_symbol = param_data_type; |
|
9778 |
|
9779 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9780 { |
|
9781 |
|
9782 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9783 |
|
9784 if (IN_type_symbol == NULL) |
|
9785 IN_type_symbol = last_type_symbol; |
|
9786 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9787 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9788 function_type_prefix = return_type_symbol; |
|
9789 function_type_suffix = IN_type_symbol; |
|
9790 break; |
|
9791 |
|
9792 } |
|
9793 |
|
9794 |
|
9795 ERROR; |
|
9796 } |
|
9797 |
|
9798 }/*function_byte_to_lreal*/ |
|
9799 break; |
|
9800 |
|
9801 /**** |
|
9802 *BYTE_TO_USINT |
|
9803 */ |
|
9804 case function_byte_to_usint : |
|
9805 { |
|
9806 symbol_c *last_type_symbol = NULL; |
|
9807 |
|
9808 { |
|
9809 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9811 symbol_c *IN_param_value = &this->default_variable_name; |
|
9812 |
|
9813 symbol_c *IN_type_symbol = param_data_type; |
|
9814 last_type_symbol = param_data_type; |
|
9815 |
|
9816 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9817 { |
|
9818 |
|
9819 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9820 |
|
9821 if (IN_type_symbol == NULL) |
|
9822 IN_type_symbol = last_type_symbol; |
|
9823 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9824 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9825 function_type_prefix = return_type_symbol; |
|
9826 function_type_suffix = IN_type_symbol; |
|
9827 break; |
|
9828 |
|
9829 } |
|
9830 |
|
9831 |
|
9832 ERROR; |
|
9833 } |
|
9834 |
|
9835 }/*function_byte_to_usint*/ |
|
9836 break; |
|
9837 |
|
9838 /**** |
|
9839 *BYTE_TO_ULINT |
|
9840 */ |
|
9841 case function_byte_to_ulint : |
|
9842 { |
|
9843 symbol_c *last_type_symbol = NULL; |
|
9844 |
|
9845 { |
|
9846 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9847 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9848 symbol_c *IN_param_value = &this->default_variable_name; |
|
9849 |
|
9850 symbol_c *IN_type_symbol = param_data_type; |
|
9851 last_type_symbol = param_data_type; |
|
9852 |
|
9853 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9854 { |
|
9855 |
|
9856 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9857 |
|
9858 if (IN_type_symbol == NULL) |
|
9859 IN_type_symbol = last_type_symbol; |
|
9860 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9861 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9862 function_type_prefix = return_type_symbol; |
|
9863 function_type_suffix = IN_type_symbol; |
|
9864 break; |
|
9865 |
|
9866 } |
|
9867 |
|
9868 |
|
9869 ERROR; |
|
9870 } |
|
9871 |
|
9872 }/*function_byte_to_ulint*/ |
|
9873 break; |
|
9874 |
|
9875 /**** |
|
9876 *BYTE_TO_BOOL |
|
9877 */ |
|
9878 case function_byte_to_bool : |
|
9879 { |
|
9880 symbol_c *last_type_symbol = NULL; |
|
9881 |
|
9882 { |
|
9883 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9884 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9885 symbol_c *IN_param_value = &this->default_variable_name; |
|
9886 |
|
9887 symbol_c *IN_type_symbol = param_data_type; |
|
9888 last_type_symbol = param_data_type; |
|
9889 |
|
9890 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9891 { |
|
9892 |
|
9893 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9894 |
|
9895 if (IN_type_symbol == NULL) |
|
9896 IN_type_symbol = last_type_symbol; |
|
9897 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9898 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9899 function_type_prefix = return_type_symbol; |
|
9900 function_type_suffix = IN_type_symbol; |
|
9901 break; |
|
9902 |
|
9903 } |
|
9904 |
|
9905 |
|
9906 ERROR; |
|
9907 } |
|
9908 |
|
9909 }/*function_byte_to_bool*/ |
|
9910 break; |
|
9911 |
|
9912 /**** |
|
9913 *BYTE_TO_TIME |
|
9914 */ |
|
9915 case function_byte_to_time : |
|
9916 { |
|
9917 symbol_c *last_type_symbol = NULL; |
|
9918 |
|
9919 { |
|
9920 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9922 symbol_c *IN_param_value = &this->default_variable_name; |
|
9923 |
|
9924 symbol_c *IN_type_symbol = param_data_type; |
|
9925 last_type_symbol = param_data_type; |
|
9926 |
|
9927 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9928 { |
|
9929 |
|
9930 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9931 |
|
9932 if (IN_type_symbol == NULL) |
|
9933 IN_type_symbol = last_type_symbol; |
|
9934 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9935 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9936 function_type_prefix = return_type_symbol; |
|
9937 break; |
|
9938 |
|
9939 } |
|
9940 |
|
9941 |
|
9942 ERROR; |
|
9943 } |
|
9944 |
|
9945 }/*function_byte_to_time*/ |
|
9946 break; |
|
9947 |
|
9948 /**** |
|
9949 *BYTE_TO_INT |
|
9950 */ |
|
9951 case function_byte_to_int : |
|
9952 { |
|
9953 symbol_c *last_type_symbol = NULL; |
|
9954 |
|
9955 { |
|
9956 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9957 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9958 symbol_c *IN_param_value = &this->default_variable_name; |
|
9959 |
|
9960 symbol_c *IN_type_symbol = param_data_type; |
|
9961 last_type_symbol = param_data_type; |
|
9962 |
|
9963 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9964 { |
|
9965 |
|
9966 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
9967 |
|
9968 if (IN_type_symbol == NULL) |
|
9969 IN_type_symbol = last_type_symbol; |
|
9970 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9971 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9972 function_type_prefix = return_type_symbol; |
|
9973 function_type_suffix = IN_type_symbol; |
|
9974 break; |
|
9975 |
|
9976 } |
|
9977 |
|
9978 |
|
9979 ERROR; |
|
9980 } |
|
9981 |
|
9982 }/*function_byte_to_int*/ |
|
9983 break; |
|
9984 |
|
9985 /**** |
|
9986 *USINT_TO_REAL |
|
9987 */ |
|
9988 case function_usint_to_real : |
|
9989 { |
|
9990 symbol_c *last_type_symbol = NULL; |
|
9991 |
|
9992 { |
|
9993 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
9994 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9995 symbol_c *IN_param_value = &this->default_variable_name; |
|
9996 |
|
9997 symbol_c *IN_type_symbol = param_data_type; |
|
9998 last_type_symbol = param_data_type; |
|
9999 |
|
10000 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10001 { |
|
10002 |
|
10003 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10004 |
|
10005 if (IN_type_symbol == NULL) |
|
10006 IN_type_symbol = last_type_symbol; |
|
10007 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10008 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10009 function_type_prefix = return_type_symbol; |
|
10010 function_type_suffix = IN_type_symbol; |
|
10011 break; |
|
10012 |
|
10013 } |
|
10014 |
|
10015 |
|
10016 ERROR; |
|
10017 } |
|
10018 |
|
10019 }/*function_usint_to_real*/ |
|
10020 break; |
|
10021 |
|
10022 /**** |
|
10023 *USINT_TO_SINT |
|
10024 */ |
|
10025 case function_usint_to_sint : |
|
10026 { |
|
10027 symbol_c *last_type_symbol = NULL; |
|
10028 |
|
10029 { |
|
10030 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10031 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10032 symbol_c *IN_param_value = &this->default_variable_name; |
|
10033 |
|
10034 symbol_c *IN_type_symbol = param_data_type; |
|
10035 last_type_symbol = param_data_type; |
|
10036 |
|
10037 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10038 { |
|
10039 |
|
10040 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10041 |
|
10042 if (IN_type_symbol == NULL) |
|
10043 IN_type_symbol = last_type_symbol; |
|
10044 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10045 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10046 function_type_prefix = return_type_symbol; |
|
10047 function_type_suffix = IN_type_symbol; |
|
10048 break; |
|
10049 |
|
10050 } |
|
10051 |
|
10052 |
|
10053 ERROR; |
|
10054 } |
|
10055 |
|
10056 }/*function_usint_to_sint*/ |
|
10057 break; |
|
10058 |
|
10059 /**** |
|
10060 *USINT_TO_LINT |
|
10061 */ |
|
10062 case function_usint_to_lint : |
|
10063 { |
|
10064 symbol_c *last_type_symbol = NULL; |
|
10065 |
|
10066 { |
|
10067 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10069 symbol_c *IN_param_value = &this->default_variable_name; |
|
10070 |
|
10071 symbol_c *IN_type_symbol = param_data_type; |
|
10072 last_type_symbol = param_data_type; |
|
10073 |
|
10074 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10075 { |
|
10076 |
|
10077 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10078 |
|
10079 if (IN_type_symbol == NULL) |
|
10080 IN_type_symbol = last_type_symbol; |
|
10081 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10082 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10083 function_type_prefix = return_type_symbol; |
|
10084 function_type_suffix = IN_type_symbol; |
|
10085 break; |
|
10086 |
|
10087 } |
|
10088 |
|
10089 |
|
10090 ERROR; |
|
10091 } |
|
10092 |
|
10093 }/*function_usint_to_lint*/ |
|
10094 break; |
|
10095 |
|
10096 /**** |
|
10097 *USINT_TO_DINT |
|
10098 */ |
|
10099 case function_usint_to_dint : |
|
10100 { |
|
10101 symbol_c *last_type_symbol = NULL; |
|
10102 |
|
10103 { |
|
10104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10106 symbol_c *IN_param_value = &this->default_variable_name; |
|
10107 |
|
10108 symbol_c *IN_type_symbol = param_data_type; |
|
10109 last_type_symbol = param_data_type; |
|
10110 |
|
10111 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10112 { |
|
10113 |
|
10114 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10115 |
|
10116 if (IN_type_symbol == NULL) |
|
10117 IN_type_symbol = last_type_symbol; |
|
10118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10119 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10120 function_type_prefix = return_type_symbol; |
|
10121 function_type_suffix = IN_type_symbol; |
|
10122 break; |
|
10123 |
|
10124 } |
|
10125 |
|
10126 |
|
10127 ERROR; |
|
10128 } |
|
10129 |
|
10130 }/*function_usint_to_dint*/ |
|
10131 break; |
|
10132 |
|
10133 /**** |
|
10134 *USINT_TO_DATE |
|
10135 */ |
|
10136 case function_usint_to_date : |
|
10137 { |
|
10138 symbol_c *last_type_symbol = NULL; |
|
10139 |
|
10140 { |
|
10141 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10142 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10143 symbol_c *IN_param_value = &this->default_variable_name; |
|
10144 |
|
10145 symbol_c *IN_type_symbol = param_data_type; |
|
10146 last_type_symbol = param_data_type; |
|
10147 |
|
10148 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10149 { |
|
10150 |
|
10151 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10152 |
|
10153 if (IN_type_symbol == NULL) |
|
10154 IN_type_symbol = last_type_symbol; |
|
10155 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10156 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10157 function_type_prefix = return_type_symbol; |
|
10158 break; |
|
10159 |
|
10160 } |
|
10161 |
|
10162 |
|
10163 ERROR; |
|
10164 } |
|
10165 |
|
10166 }/*function_usint_to_date*/ |
|
10167 break; |
|
10168 |
|
10169 /**** |
|
10170 *USINT_TO_DWORD |
|
10171 */ |
|
10172 case function_usint_to_dword : |
|
10173 { |
|
10174 symbol_c *last_type_symbol = NULL; |
|
10175 |
|
10176 { |
|
10177 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10178 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10179 symbol_c *IN_param_value = &this->default_variable_name; |
|
10180 |
|
10181 symbol_c *IN_type_symbol = param_data_type; |
|
10182 last_type_symbol = param_data_type; |
|
10183 |
|
10184 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10185 { |
|
10186 |
|
10187 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10188 |
|
10189 if (IN_type_symbol == NULL) |
|
10190 IN_type_symbol = last_type_symbol; |
|
10191 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10192 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10193 function_type_prefix = return_type_symbol; |
|
10194 function_type_suffix = IN_type_symbol; |
|
10195 break; |
|
10196 |
|
10197 } |
|
10198 |
|
10199 |
|
10200 ERROR; |
|
10201 } |
|
10202 |
|
10203 }/*function_usint_to_dword*/ |
|
10204 break; |
|
10205 |
|
10206 /**** |
|
10207 *USINT_TO_DT |
|
10208 */ |
|
10209 case function_usint_to_dt : |
|
10210 { |
|
10211 symbol_c *last_type_symbol = NULL; |
|
10212 |
|
10213 { |
|
10214 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10216 symbol_c *IN_param_value = &this->default_variable_name; |
|
10217 |
|
10218 symbol_c *IN_type_symbol = param_data_type; |
|
10219 last_type_symbol = param_data_type; |
|
10220 |
|
10221 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10222 { |
|
10223 |
|
10224 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10225 |
|
10226 if (IN_type_symbol == NULL) |
|
10227 IN_type_symbol = last_type_symbol; |
|
10228 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10229 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10230 function_type_prefix = return_type_symbol; |
|
10231 break; |
|
10232 |
|
10233 } |
|
10234 |
|
10235 |
|
10236 ERROR; |
|
10237 } |
|
10238 |
|
10239 }/*function_usint_to_dt*/ |
|
10240 break; |
|
10241 |
|
10242 /**** |
|
10243 *USINT_TO_TOD |
|
10244 */ |
|
10245 case function_usint_to_tod : |
|
10246 { |
|
10247 symbol_c *last_type_symbol = NULL; |
|
10248 |
|
10249 { |
|
10250 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10251 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10252 symbol_c *IN_param_value = &this->default_variable_name; |
|
10253 |
|
10254 symbol_c *IN_type_symbol = param_data_type; |
|
10255 last_type_symbol = param_data_type; |
|
10256 |
|
10257 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10258 { |
|
10259 |
|
10260 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10261 |
|
10262 if (IN_type_symbol == NULL) |
|
10263 IN_type_symbol = last_type_symbol; |
|
10264 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10265 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10266 function_type_prefix = return_type_symbol; |
|
10267 break; |
|
10268 |
|
10269 } |
|
10270 |
|
10271 |
|
10272 ERROR; |
|
10273 } |
|
10274 |
|
10275 }/*function_usint_to_tod*/ |
|
10276 break; |
|
10277 |
|
10278 /**** |
|
10279 *USINT_TO_UDINT |
|
10280 */ |
|
10281 case function_usint_to_udint : |
|
10282 { |
|
10283 symbol_c *last_type_symbol = NULL; |
|
10284 |
|
10285 { |
|
10286 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10287 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10288 symbol_c *IN_param_value = &this->default_variable_name; |
|
10289 |
|
10290 symbol_c *IN_type_symbol = param_data_type; |
|
10291 last_type_symbol = param_data_type; |
|
10292 |
|
10293 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10294 { |
|
10295 |
|
10296 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10297 |
|
10298 if (IN_type_symbol == NULL) |
|
10299 IN_type_symbol = last_type_symbol; |
|
10300 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10301 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10302 function_type_prefix = return_type_symbol; |
|
10303 function_type_suffix = IN_type_symbol; |
|
10304 break; |
|
10305 |
|
10306 } |
|
10307 |
|
10308 |
|
10309 ERROR; |
|
10310 } |
|
10311 |
|
10312 }/*function_usint_to_udint*/ |
|
10313 break; |
|
10314 |
|
10315 /**** |
|
10316 *USINT_TO_WORD |
|
10317 */ |
|
10318 case function_usint_to_word : |
|
10319 { |
|
10320 symbol_c *last_type_symbol = NULL; |
|
10321 |
|
10322 { |
|
10323 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10324 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10325 symbol_c *IN_param_value = &this->default_variable_name; |
|
10326 |
|
10327 symbol_c *IN_type_symbol = param_data_type; |
|
10328 last_type_symbol = param_data_type; |
|
10329 |
|
10330 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10331 { |
|
10332 |
|
10333 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10334 |
|
10335 if (IN_type_symbol == NULL) |
|
10336 IN_type_symbol = last_type_symbol; |
|
10337 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10338 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10339 function_type_prefix = return_type_symbol; |
|
10340 function_type_suffix = IN_type_symbol; |
|
10341 break; |
|
10342 |
|
10343 } |
|
10344 |
|
10345 |
|
10346 ERROR; |
|
10347 } |
|
10348 |
|
10349 }/*function_usint_to_word*/ |
|
10350 break; |
|
10351 |
|
10352 /**** |
|
10353 *USINT_TO_STRING |
|
10354 */ |
|
10355 case function_usint_to_string : |
|
10356 { |
|
10357 symbol_c *last_type_symbol = NULL; |
|
10358 |
|
10359 { |
|
10360 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10361 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10362 symbol_c *IN_param_value = &this->default_variable_name; |
|
10363 |
|
10364 symbol_c *IN_type_symbol = param_data_type; |
|
10365 last_type_symbol = param_data_type; |
|
10366 |
|
10367 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10368 { |
|
10369 |
|
10370 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
10371 |
|
10372 if (IN_type_symbol == NULL) |
|
10373 IN_type_symbol = last_type_symbol; |
|
10374 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10375 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
10376 function_type_prefix = return_type_symbol; |
|
10377 break; |
|
10378 |
|
10379 } |
|
10380 |
|
10381 |
|
10382 ERROR; |
|
10383 } |
|
10384 |
|
10385 }/*function_usint_to_string*/ |
|
10386 break; |
|
10387 |
|
10388 /**** |
|
10389 *USINT_TO_LWORD |
|
10390 */ |
|
10391 case function_usint_to_lword : |
|
10392 { |
|
10393 symbol_c *last_type_symbol = NULL; |
|
10394 |
|
10395 { |
|
10396 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10397 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10398 symbol_c *IN_param_value = &this->default_variable_name; |
|
10399 |
|
10400 symbol_c *IN_type_symbol = param_data_type; |
|
10401 last_type_symbol = param_data_type; |
|
10402 |
|
10403 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10404 { |
|
10405 |
|
10406 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10407 |
|
10408 if (IN_type_symbol == NULL) |
|
10409 IN_type_symbol = last_type_symbol; |
|
10410 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10411 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10412 function_type_prefix = return_type_symbol; |
|
10413 function_type_suffix = IN_type_symbol; |
|
10414 break; |
|
10415 |
|
10416 } |
|
10417 |
|
10418 |
|
10419 ERROR; |
|
10420 } |
|
10421 |
|
10422 }/*function_usint_to_lword*/ |
|
10423 break; |
|
10424 |
|
10425 /**** |
|
10426 *USINT_TO_UINT |
|
10427 */ |
|
10428 case function_usint_to_uint : |
|
10429 { |
|
10430 symbol_c *last_type_symbol = NULL; |
|
10431 |
|
10432 { |
|
10433 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10434 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10435 symbol_c *IN_param_value = &this->default_variable_name; |
|
10436 |
|
10437 symbol_c *IN_type_symbol = param_data_type; |
|
10438 last_type_symbol = param_data_type; |
|
10439 |
|
10440 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10441 { |
|
10442 |
|
10443 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10444 |
|
10445 if (IN_type_symbol == NULL) |
|
10446 IN_type_symbol = last_type_symbol; |
|
10447 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10448 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10449 function_type_prefix = return_type_symbol; |
|
10450 function_type_suffix = IN_type_symbol; |
|
10451 break; |
|
10452 |
|
10453 } |
|
10454 |
|
10455 |
|
10456 ERROR; |
|
10457 } |
|
10458 |
|
10459 }/*function_usint_to_uint*/ |
|
10460 break; |
|
10461 |
|
10462 /**** |
|
10463 *USINT_TO_LREAL |
|
10464 */ |
|
10465 case function_usint_to_lreal : |
|
10466 { |
|
10467 symbol_c *last_type_symbol = NULL; |
|
10468 |
|
10469 { |
|
10470 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10471 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10472 symbol_c *IN_param_value = &this->default_variable_name; |
|
10473 |
|
10474 symbol_c *IN_type_symbol = param_data_type; |
|
10475 last_type_symbol = param_data_type; |
|
10476 |
|
10477 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10478 { |
|
10479 |
|
10480 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10481 |
|
10482 if (IN_type_symbol == NULL) |
|
10483 IN_type_symbol = last_type_symbol; |
|
10484 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10485 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10486 function_type_prefix = return_type_symbol; |
|
10487 function_type_suffix = IN_type_symbol; |
|
10488 break; |
|
10489 |
|
10490 } |
|
10491 |
|
10492 |
|
10493 ERROR; |
|
10494 } |
|
10495 |
|
10496 }/*function_usint_to_lreal*/ |
|
10497 break; |
|
10498 |
|
10499 /**** |
|
10500 *USINT_TO_BYTE |
|
10501 */ |
|
10502 case function_usint_to_byte : |
|
10503 { |
|
10504 symbol_c *last_type_symbol = NULL; |
|
10505 |
|
10506 { |
|
10507 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10508 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10509 symbol_c *IN_param_value = &this->default_variable_name; |
|
10510 |
|
10511 symbol_c *IN_type_symbol = param_data_type; |
|
10512 last_type_symbol = param_data_type; |
|
10513 |
|
10514 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10515 { |
|
10516 |
|
10517 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10518 |
|
10519 if (IN_type_symbol == NULL) |
|
10520 IN_type_symbol = last_type_symbol; |
|
10521 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10522 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10523 function_type_prefix = return_type_symbol; |
|
10524 function_type_suffix = IN_type_symbol; |
|
10525 break; |
|
10526 |
|
10527 } |
|
10528 |
|
10529 |
|
10530 ERROR; |
|
10531 } |
|
10532 |
|
10533 }/*function_usint_to_byte*/ |
|
10534 break; |
|
10535 |
|
10536 /**** |
|
10537 *USINT_TO_ULINT |
|
10538 */ |
|
10539 case function_usint_to_ulint : |
|
10540 { |
|
10541 symbol_c *last_type_symbol = NULL; |
|
10542 |
|
10543 { |
|
10544 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10546 symbol_c *IN_param_value = &this->default_variable_name; |
|
10547 |
|
10548 symbol_c *IN_type_symbol = param_data_type; |
|
10549 last_type_symbol = param_data_type; |
|
10550 |
|
10551 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10552 { |
|
10553 |
|
10554 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10555 |
|
10556 if (IN_type_symbol == NULL) |
|
10557 IN_type_symbol = last_type_symbol; |
|
10558 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10559 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10560 function_type_prefix = return_type_symbol; |
|
10561 function_type_suffix = IN_type_symbol; |
|
10562 break; |
|
10563 |
|
10564 } |
|
10565 |
|
10566 |
|
10567 ERROR; |
|
10568 } |
|
10569 |
|
10570 }/*function_usint_to_ulint*/ |
|
10571 break; |
|
10572 |
|
10573 /**** |
|
10574 *USINT_TO_BOOL |
|
10575 */ |
|
10576 case function_usint_to_bool : |
|
10577 { |
|
10578 symbol_c *last_type_symbol = NULL; |
|
10579 |
|
10580 { |
|
10581 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10583 symbol_c *IN_param_value = &this->default_variable_name; |
|
10584 |
|
10585 symbol_c *IN_type_symbol = param_data_type; |
|
10586 last_type_symbol = param_data_type; |
|
10587 |
|
10588 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10589 { |
|
10590 |
|
10591 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10592 |
|
10593 if (IN_type_symbol == NULL) |
|
10594 IN_type_symbol = last_type_symbol; |
|
10595 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10596 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10597 function_type_prefix = return_type_symbol; |
|
10598 function_type_suffix = IN_type_symbol; |
|
10599 break; |
|
10600 |
|
10601 } |
|
10602 |
|
10603 |
|
10604 ERROR; |
|
10605 } |
|
10606 |
|
10607 }/*function_usint_to_bool*/ |
|
10608 break; |
|
10609 |
|
10610 /**** |
|
10611 *USINT_TO_TIME |
|
10612 */ |
|
10613 case function_usint_to_time : |
|
10614 { |
|
10615 symbol_c *last_type_symbol = NULL; |
|
10616 |
|
10617 { |
|
10618 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10620 symbol_c *IN_param_value = &this->default_variable_name; |
|
10621 |
|
10622 symbol_c *IN_type_symbol = param_data_type; |
|
10623 last_type_symbol = param_data_type; |
|
10624 |
|
10625 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10626 { |
|
10627 |
|
10628 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10629 |
|
10630 if (IN_type_symbol == NULL) |
|
10631 IN_type_symbol = last_type_symbol; |
|
10632 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10633 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10634 function_type_prefix = return_type_symbol; |
|
10635 break; |
|
10636 |
|
10637 } |
|
10638 |
|
10639 |
|
10640 ERROR; |
|
10641 } |
|
10642 |
|
10643 }/*function_usint_to_time*/ |
|
10644 break; |
|
10645 |
|
10646 /**** |
|
10647 *USINT_TO_INT |
|
10648 */ |
|
10649 case function_usint_to_int : |
|
10650 { |
|
10651 symbol_c *last_type_symbol = NULL; |
|
10652 |
|
10653 { |
|
10654 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10656 symbol_c *IN_param_value = &this->default_variable_name; |
|
10657 |
|
10658 symbol_c *IN_type_symbol = param_data_type; |
|
10659 last_type_symbol = param_data_type; |
|
10660 |
|
10661 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
10662 { |
|
10663 |
|
10664 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10665 |
|
10666 if (IN_type_symbol == NULL) |
|
10667 IN_type_symbol = last_type_symbol; |
|
10668 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10669 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10670 function_type_prefix = return_type_symbol; |
|
10671 function_type_suffix = IN_type_symbol; |
|
10672 break; |
|
10673 |
|
10674 } |
|
10675 |
|
10676 |
|
10677 ERROR; |
|
10678 } |
|
10679 |
|
10680 }/*function_usint_to_int*/ |
|
10681 break; |
|
10682 |
|
10683 /**** |
|
10684 *ULINT_TO_REAL |
|
10685 */ |
|
10686 case function_ulint_to_real : |
|
10687 { |
|
10688 symbol_c *last_type_symbol = NULL; |
|
10689 |
|
10690 { |
|
10691 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10692 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10693 symbol_c *IN_param_value = &this->default_variable_name; |
|
10694 |
|
10695 symbol_c *IN_type_symbol = param_data_type; |
|
10696 last_type_symbol = param_data_type; |
|
10697 |
|
10698 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10699 { |
|
10700 |
|
10701 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10702 |
|
10703 if (IN_type_symbol == NULL) |
|
10704 IN_type_symbol = last_type_symbol; |
|
10705 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10706 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10707 function_type_prefix = return_type_symbol; |
|
10708 function_type_suffix = IN_type_symbol; |
|
10709 break; |
|
10710 |
|
10711 } |
|
10712 |
|
10713 |
|
10714 ERROR; |
|
10715 } |
|
10716 |
|
10717 }/*function_ulint_to_real*/ |
|
10718 break; |
|
10719 |
|
10720 /**** |
|
10721 *ULINT_TO_SINT |
|
10722 */ |
|
10723 case function_ulint_to_sint : |
|
10724 { |
|
10725 symbol_c *last_type_symbol = NULL; |
|
10726 |
|
10727 { |
|
10728 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10736 { |
|
10737 |
|
10738 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10739 |
|
10740 if (IN_type_symbol == NULL) |
|
10741 IN_type_symbol = last_type_symbol; |
|
10742 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10743 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10744 function_type_prefix = return_type_symbol; |
|
10745 function_type_suffix = IN_type_symbol; |
|
10746 break; |
|
10747 |
|
10748 } |
|
10749 |
|
10750 |
|
10751 ERROR; |
|
10752 } |
|
10753 |
|
10754 }/*function_ulint_to_sint*/ |
|
10755 break; |
|
10756 |
|
10757 /**** |
|
10758 *ULINT_TO_LINT |
|
10759 */ |
|
10760 case function_ulint_to_lint : |
|
10761 { |
|
10762 symbol_c *last_type_symbol = NULL; |
|
10763 |
|
10764 { |
|
10765 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10767 symbol_c *IN_param_value = &this->default_variable_name; |
|
10768 |
|
10769 symbol_c *IN_type_symbol = param_data_type; |
|
10770 last_type_symbol = param_data_type; |
|
10771 |
|
10772 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10773 { |
|
10774 |
|
10775 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10776 |
|
10777 if (IN_type_symbol == NULL) |
|
10778 IN_type_symbol = last_type_symbol; |
|
10779 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10780 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10781 function_type_prefix = return_type_symbol; |
|
10782 function_type_suffix = IN_type_symbol; |
|
10783 break; |
|
10784 |
|
10785 } |
|
10786 |
|
10787 |
|
10788 ERROR; |
|
10789 } |
|
10790 |
|
10791 }/*function_ulint_to_lint*/ |
|
10792 break; |
|
10793 |
|
10794 /**** |
|
10795 *ULINT_TO_DINT |
|
10796 */ |
|
10797 case function_ulint_to_dint : |
|
10798 { |
|
10799 symbol_c *last_type_symbol = NULL; |
|
10800 |
|
10801 { |
|
10802 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10803 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10804 symbol_c *IN_param_value = &this->default_variable_name; |
|
10805 |
|
10806 symbol_c *IN_type_symbol = param_data_type; |
|
10807 last_type_symbol = param_data_type; |
|
10808 |
|
10809 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10810 { |
|
10811 |
|
10812 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10813 |
|
10814 if (IN_type_symbol == NULL) |
|
10815 IN_type_symbol = last_type_symbol; |
|
10816 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10817 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10818 function_type_prefix = return_type_symbol; |
|
10819 function_type_suffix = IN_type_symbol; |
|
10820 break; |
|
10821 |
|
10822 } |
|
10823 |
|
10824 |
|
10825 ERROR; |
|
10826 } |
|
10827 |
|
10828 }/*function_ulint_to_dint*/ |
|
10829 break; |
|
10830 |
|
10831 /**** |
|
10832 *ULINT_TO_DATE |
|
10833 */ |
|
10834 case function_ulint_to_date : |
|
10835 { |
|
10836 symbol_c *last_type_symbol = NULL; |
|
10837 |
|
10838 { |
|
10839 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10840 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10841 symbol_c *IN_param_value = &this->default_variable_name; |
|
10842 |
|
10843 symbol_c *IN_type_symbol = param_data_type; |
|
10844 last_type_symbol = param_data_type; |
|
10845 |
|
10846 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10847 { |
|
10848 |
|
10849 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10850 |
|
10851 if (IN_type_symbol == NULL) |
|
10852 IN_type_symbol = last_type_symbol; |
|
10853 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10854 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10855 function_type_prefix = return_type_symbol; |
|
10856 break; |
|
10857 |
|
10858 } |
|
10859 |
|
10860 |
|
10861 ERROR; |
|
10862 } |
|
10863 |
|
10864 }/*function_ulint_to_date*/ |
|
10865 break; |
|
10866 |
|
10867 /**** |
|
10868 *ULINT_TO_DWORD |
|
10869 */ |
|
10870 case function_ulint_to_dword : |
|
10871 { |
|
10872 symbol_c *last_type_symbol = NULL; |
|
10873 |
|
10874 { |
|
10875 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10877 symbol_c *IN_param_value = &this->default_variable_name; |
|
10878 |
|
10879 symbol_c *IN_type_symbol = param_data_type; |
|
10880 last_type_symbol = param_data_type; |
|
10881 |
|
10882 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10883 { |
|
10884 |
|
10885 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10886 |
|
10887 if (IN_type_symbol == NULL) |
|
10888 IN_type_symbol = last_type_symbol; |
|
10889 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10890 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10891 function_type_prefix = return_type_symbol; |
|
10892 function_type_suffix = IN_type_symbol; |
|
10893 break; |
|
10894 |
|
10895 } |
|
10896 |
|
10897 |
|
10898 ERROR; |
|
10899 } |
|
10900 |
|
10901 }/*function_ulint_to_dword*/ |
|
10902 break; |
|
10903 |
|
10904 /**** |
|
10905 *ULINT_TO_DT |
|
10906 */ |
|
10907 case function_ulint_to_dt : |
|
10908 { |
|
10909 symbol_c *last_type_symbol = NULL; |
|
10910 |
|
10911 { |
|
10912 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10913 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10914 symbol_c *IN_param_value = &this->default_variable_name; |
|
10915 |
|
10916 symbol_c *IN_type_symbol = param_data_type; |
|
10917 last_type_symbol = param_data_type; |
|
10918 |
|
10919 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10920 { |
|
10921 |
|
10922 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10923 |
|
10924 if (IN_type_symbol == NULL) |
|
10925 IN_type_symbol = last_type_symbol; |
|
10926 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10927 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10928 function_type_prefix = return_type_symbol; |
|
10929 break; |
|
10930 |
|
10931 } |
|
10932 |
|
10933 |
|
10934 ERROR; |
|
10935 } |
|
10936 |
|
10937 }/*function_ulint_to_dt*/ |
|
10938 break; |
|
10939 |
|
10940 /**** |
|
10941 *ULINT_TO_TOD |
|
10942 */ |
|
10943 case function_ulint_to_tod : |
|
10944 { |
|
10945 symbol_c *last_type_symbol = NULL; |
|
10946 |
|
10947 { |
|
10948 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10950 symbol_c *IN_param_value = &this->default_variable_name; |
|
10951 |
|
10952 symbol_c *IN_type_symbol = param_data_type; |
|
10953 last_type_symbol = param_data_type; |
|
10954 |
|
10955 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10956 { |
|
10957 |
|
10958 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10959 |
|
10960 if (IN_type_symbol == NULL) |
|
10961 IN_type_symbol = last_type_symbol; |
|
10962 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10963 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10964 function_type_prefix = return_type_symbol; |
|
10965 break; |
|
10966 |
|
10967 } |
|
10968 |
|
10969 |
|
10970 ERROR; |
|
10971 } |
|
10972 |
|
10973 }/*function_ulint_to_tod*/ |
|
10974 break; |
|
10975 |
|
10976 /**** |
|
10977 *ULINT_TO_UDINT |
|
10978 */ |
|
10979 case function_ulint_to_udint : |
|
10980 { |
|
10981 symbol_c *last_type_symbol = NULL; |
|
10982 |
|
10983 { |
|
10984 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
10985 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10986 symbol_c *IN_param_value = &this->default_variable_name; |
|
10987 |
|
10988 symbol_c *IN_type_symbol = param_data_type; |
|
10989 last_type_symbol = param_data_type; |
|
10990 |
|
10991 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
10992 { |
|
10993 |
|
10994 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
10995 |
|
10996 if (IN_type_symbol == NULL) |
|
10997 IN_type_symbol = last_type_symbol; |
|
10998 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10999 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11000 function_type_prefix = return_type_symbol; |
|
11001 function_type_suffix = IN_type_symbol; |
|
11002 break; |
|
11003 |
|
11004 } |
|
11005 |
|
11006 |
|
11007 ERROR; |
|
11008 } |
|
11009 |
|
11010 }/*function_ulint_to_udint*/ |
|
11011 break; |
|
11012 |
|
11013 /**** |
|
11014 *ULINT_TO_WORD |
|
11015 */ |
|
11016 case function_ulint_to_word : |
|
11017 { |
|
11018 symbol_c *last_type_symbol = NULL; |
|
11019 |
|
11020 { |
|
11021 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11022 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11023 symbol_c *IN_param_value = &this->default_variable_name; |
|
11024 |
|
11025 symbol_c *IN_type_symbol = param_data_type; |
|
11026 last_type_symbol = param_data_type; |
|
11027 |
|
11028 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11029 { |
|
11030 |
|
11031 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11032 |
|
11033 if (IN_type_symbol == NULL) |
|
11034 IN_type_symbol = last_type_symbol; |
|
11035 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11036 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11037 function_type_prefix = return_type_symbol; |
|
11038 function_type_suffix = IN_type_symbol; |
|
11039 break; |
|
11040 |
|
11041 } |
|
11042 |
|
11043 |
|
11044 ERROR; |
|
11045 } |
|
11046 |
|
11047 }/*function_ulint_to_word*/ |
|
11048 break; |
|
11049 |
|
11050 /**** |
|
11051 *ULINT_TO_STRING |
|
11052 */ |
|
11053 case function_ulint_to_string : |
|
11054 { |
|
11055 symbol_c *last_type_symbol = NULL; |
|
11056 |
|
11057 { |
|
11058 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11066 { |
|
11067 |
|
11068 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
11069 |
|
11070 if (IN_type_symbol == NULL) |
|
11071 IN_type_symbol = last_type_symbol; |
|
11072 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11073 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11074 function_type_prefix = return_type_symbol; |
|
11075 break; |
|
11076 |
|
11077 } |
|
11078 |
|
11079 |
|
11080 ERROR; |
|
11081 } |
|
11082 |
|
11083 }/*function_ulint_to_string*/ |
|
11084 break; |
|
11085 |
|
11086 /**** |
|
11087 *ULINT_TO_LWORD |
|
11088 */ |
|
11089 case function_ulint_to_lword : |
|
11090 { |
|
11091 symbol_c *last_type_symbol = NULL; |
|
11092 |
|
11093 { |
|
11094 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11095 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11096 symbol_c *IN_param_value = &this->default_variable_name; |
|
11097 |
|
11098 symbol_c *IN_type_symbol = param_data_type; |
|
11099 last_type_symbol = param_data_type; |
|
11100 |
|
11101 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11102 { |
|
11103 |
|
11104 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11105 |
|
11106 if (IN_type_symbol == NULL) |
|
11107 IN_type_symbol = last_type_symbol; |
|
11108 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11109 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11110 function_type_prefix = return_type_symbol; |
|
11111 function_type_suffix = IN_type_symbol; |
|
11112 break; |
|
11113 |
|
11114 } |
|
11115 |
|
11116 |
|
11117 ERROR; |
|
11118 } |
|
11119 |
|
11120 }/*function_ulint_to_lword*/ |
|
11121 break; |
|
11122 |
|
11123 /**** |
|
11124 *ULINT_TO_UINT |
|
11125 */ |
|
11126 case function_ulint_to_uint : |
|
11127 { |
|
11128 symbol_c *last_type_symbol = NULL; |
|
11129 |
|
11130 { |
|
11131 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11132 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11133 symbol_c *IN_param_value = &this->default_variable_name; |
|
11134 |
|
11135 symbol_c *IN_type_symbol = param_data_type; |
|
11136 last_type_symbol = param_data_type; |
|
11137 |
|
11138 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11139 { |
|
11140 |
|
11141 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11142 |
|
11143 if (IN_type_symbol == NULL) |
|
11144 IN_type_symbol = last_type_symbol; |
|
11145 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11146 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11147 function_type_prefix = return_type_symbol; |
|
11148 function_type_suffix = IN_type_symbol; |
|
11149 break; |
|
11150 |
|
11151 } |
|
11152 |
|
11153 |
|
11154 ERROR; |
|
11155 } |
|
11156 |
|
11157 }/*function_ulint_to_uint*/ |
|
11158 break; |
|
11159 |
|
11160 /**** |
|
11161 *ULINT_TO_LREAL |
|
11162 */ |
|
11163 case function_ulint_to_lreal : |
|
11164 { |
|
11165 symbol_c *last_type_symbol = NULL; |
|
11166 |
|
11167 { |
|
11168 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11170 symbol_c *IN_param_value = &this->default_variable_name; |
|
11171 |
|
11172 symbol_c *IN_type_symbol = param_data_type; |
|
11173 last_type_symbol = param_data_type; |
|
11174 |
|
11175 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11176 { |
|
11177 |
|
11178 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11179 |
|
11180 if (IN_type_symbol == NULL) |
|
11181 IN_type_symbol = last_type_symbol; |
|
11182 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11183 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11184 function_type_prefix = return_type_symbol; |
|
11185 function_type_suffix = IN_type_symbol; |
|
11186 break; |
|
11187 |
|
11188 } |
|
11189 |
|
11190 |
|
11191 ERROR; |
|
11192 } |
|
11193 |
|
11194 }/*function_ulint_to_lreal*/ |
|
11195 break; |
|
11196 |
|
11197 /**** |
|
11198 *ULINT_TO_BYTE |
|
11199 */ |
|
11200 case function_ulint_to_byte : |
|
11201 { |
|
11202 symbol_c *last_type_symbol = NULL; |
|
11203 |
|
11204 { |
|
11205 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11206 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11207 symbol_c *IN_param_value = &this->default_variable_name; |
|
11208 |
|
11209 symbol_c *IN_type_symbol = param_data_type; |
|
11210 last_type_symbol = param_data_type; |
|
11211 |
|
11212 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11213 { |
|
11214 |
|
11215 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11216 |
|
11217 if (IN_type_symbol == NULL) |
|
11218 IN_type_symbol = last_type_symbol; |
|
11219 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11220 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11221 function_type_prefix = return_type_symbol; |
|
11222 function_type_suffix = IN_type_symbol; |
|
11223 break; |
|
11224 |
|
11225 } |
|
11226 |
|
11227 |
|
11228 ERROR; |
|
11229 } |
|
11230 |
|
11231 }/*function_ulint_to_byte*/ |
|
11232 break; |
|
11233 |
|
11234 /**** |
|
11235 *ULINT_TO_USINT |
|
11236 */ |
|
11237 case function_ulint_to_usint : |
|
11238 { |
|
11239 symbol_c *last_type_symbol = NULL; |
|
11240 |
|
11241 { |
|
11242 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11243 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11244 symbol_c *IN_param_value = &this->default_variable_name; |
|
11245 |
|
11246 symbol_c *IN_type_symbol = param_data_type; |
|
11247 last_type_symbol = param_data_type; |
|
11248 |
|
11249 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11250 { |
|
11251 |
|
11252 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11253 |
|
11254 if (IN_type_symbol == NULL) |
|
11255 IN_type_symbol = last_type_symbol; |
|
11256 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11257 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11258 function_type_prefix = return_type_symbol; |
|
11259 function_type_suffix = IN_type_symbol; |
|
11260 break; |
|
11261 |
|
11262 } |
|
11263 |
|
11264 |
|
11265 ERROR; |
|
11266 } |
|
11267 |
|
11268 }/*function_ulint_to_usint*/ |
|
11269 break; |
|
11270 |
|
11271 /**** |
|
11272 *ULINT_TO_BOOL |
|
11273 */ |
|
11274 case function_ulint_to_bool : |
|
11275 { |
|
11276 symbol_c *last_type_symbol = NULL; |
|
11277 |
|
11278 { |
|
11279 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11281 symbol_c *IN_param_value = &this->default_variable_name; |
|
11282 |
|
11283 symbol_c *IN_type_symbol = param_data_type; |
|
11284 last_type_symbol = param_data_type; |
|
11285 |
|
11286 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11287 { |
|
11288 |
|
11289 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11290 |
|
11291 if (IN_type_symbol == NULL) |
|
11292 IN_type_symbol = last_type_symbol; |
|
11293 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11294 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11295 function_type_prefix = return_type_symbol; |
|
11296 function_type_suffix = IN_type_symbol; |
|
11297 break; |
|
11298 |
|
11299 } |
|
11300 |
|
11301 |
|
11302 ERROR; |
|
11303 } |
|
11304 |
|
11305 }/*function_ulint_to_bool*/ |
|
11306 break; |
|
11307 |
|
11308 /**** |
|
11309 *ULINT_TO_TIME |
|
11310 */ |
|
11311 case function_ulint_to_time : |
|
11312 { |
|
11313 symbol_c *last_type_symbol = NULL; |
|
11314 |
|
11315 { |
|
11316 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11317 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11318 symbol_c *IN_param_value = &this->default_variable_name; |
|
11319 |
|
11320 symbol_c *IN_type_symbol = param_data_type; |
|
11321 last_type_symbol = param_data_type; |
|
11322 |
|
11323 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11324 { |
|
11325 |
|
11326 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11327 |
|
11328 if (IN_type_symbol == NULL) |
|
11329 IN_type_symbol = last_type_symbol; |
|
11330 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11331 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
11332 function_type_prefix = return_type_symbol; |
|
11333 break; |
|
11334 |
|
11335 } |
|
11336 |
|
11337 |
|
11338 ERROR; |
|
11339 } |
|
11340 |
|
11341 }/*function_ulint_to_time*/ |
|
11342 break; |
|
11343 |
|
11344 /**** |
|
11345 *ULINT_TO_INT |
|
11346 */ |
|
11347 case function_ulint_to_int : |
|
11348 { |
|
11349 symbol_c *last_type_symbol = NULL; |
|
11350 |
|
11351 { |
|
11352 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11353 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11354 symbol_c *IN_param_value = &this->default_variable_name; |
|
11355 |
|
11356 symbol_c *IN_type_symbol = param_data_type; |
|
11357 last_type_symbol = param_data_type; |
|
11358 |
|
11359 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11360 { |
|
11361 |
|
11362 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11363 |
|
11364 if (IN_type_symbol == NULL) |
|
11365 IN_type_symbol = last_type_symbol; |
|
11366 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11367 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11368 function_type_prefix = return_type_symbol; |
|
11369 function_type_suffix = IN_type_symbol; |
|
11370 break; |
|
11371 |
|
11372 } |
|
11373 |
|
11374 |
|
11375 ERROR; |
|
11376 } |
|
11377 |
|
11378 }/*function_ulint_to_int*/ |
|
11379 break; |
|
11380 |
|
11381 /**** |
|
11382 *BOOL_TO_REAL |
|
11383 */ |
|
11384 case function_bool_to_real : |
|
11385 { |
|
11386 symbol_c *last_type_symbol = NULL; |
|
11387 |
|
11388 { |
|
11389 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11391 symbol_c *IN_param_value = &this->default_variable_name; |
|
11392 |
|
11393 symbol_c *IN_type_symbol = param_data_type; |
|
11394 last_type_symbol = param_data_type; |
|
11395 |
|
11396 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11397 { |
|
11398 |
|
11399 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11400 |
|
11401 if (IN_type_symbol == NULL) |
|
11402 IN_type_symbol = last_type_symbol; |
|
11403 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11404 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
11405 function_type_prefix = return_type_symbol; |
|
11406 function_type_suffix = IN_type_symbol; |
|
11407 break; |
|
11408 |
|
11409 } |
|
11410 |
|
11411 |
|
11412 ERROR; |
|
11413 } |
|
11414 |
|
11415 }/*function_bool_to_real*/ |
|
11416 break; |
|
11417 |
|
11418 /**** |
|
11419 *BOOL_TO_SINT |
|
11420 */ |
|
11421 case function_bool_to_sint : |
|
11422 { |
|
11423 symbol_c *last_type_symbol = NULL; |
|
11424 |
|
11425 { |
|
11426 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11428 symbol_c *IN_param_value = &this->default_variable_name; |
|
11429 |
|
11430 symbol_c *IN_type_symbol = param_data_type; |
|
11431 last_type_symbol = param_data_type; |
|
11432 |
|
11433 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11434 { |
|
11435 |
|
11436 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11437 |
|
11438 if (IN_type_symbol == NULL) |
|
11439 IN_type_symbol = last_type_symbol; |
|
11440 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11441 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
11442 function_type_prefix = return_type_symbol; |
|
11443 function_type_suffix = IN_type_symbol; |
|
11444 break; |
|
11445 |
|
11446 } |
|
11447 |
|
11448 |
|
11449 ERROR; |
|
11450 } |
|
11451 |
|
11452 }/*function_bool_to_sint*/ |
|
11453 break; |
|
11454 |
|
11455 /**** |
|
11456 *BOOL_TO_LINT |
|
11457 */ |
|
11458 case function_bool_to_lint : |
|
11459 { |
|
11460 symbol_c *last_type_symbol = NULL; |
|
11461 |
|
11462 { |
|
11463 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11464 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11465 symbol_c *IN_param_value = &this->default_variable_name; |
|
11466 |
|
11467 symbol_c *IN_type_symbol = param_data_type; |
|
11468 last_type_symbol = param_data_type; |
|
11469 |
|
11470 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11471 { |
|
11472 |
|
11473 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11474 |
|
11475 if (IN_type_symbol == NULL) |
|
11476 IN_type_symbol = last_type_symbol; |
|
11477 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11478 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
11479 function_type_prefix = return_type_symbol; |
|
11480 function_type_suffix = IN_type_symbol; |
|
11481 break; |
|
11482 |
|
11483 } |
|
11484 |
|
11485 |
|
11486 ERROR; |
|
11487 } |
|
11488 |
|
11489 }/*function_bool_to_lint*/ |
|
11490 break; |
|
11491 |
|
11492 /**** |
|
11493 *BOOL_TO_DINT |
|
11494 */ |
|
11495 case function_bool_to_dint : |
|
11496 { |
|
11497 symbol_c *last_type_symbol = NULL; |
|
11498 |
|
11499 { |
|
11500 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11502 symbol_c *IN_param_value = &this->default_variable_name; |
|
11503 |
|
11504 symbol_c *IN_type_symbol = param_data_type; |
|
11505 last_type_symbol = param_data_type; |
|
11506 |
|
11507 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11508 { |
|
11509 |
|
11510 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11511 |
|
11512 if (IN_type_symbol == NULL) |
|
11513 IN_type_symbol = last_type_symbol; |
|
11514 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11515 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
11516 function_type_prefix = return_type_symbol; |
|
11517 function_type_suffix = IN_type_symbol; |
|
11518 break; |
|
11519 |
|
11520 } |
|
11521 |
|
11522 |
|
11523 ERROR; |
|
11524 } |
|
11525 |
|
11526 }/*function_bool_to_dint*/ |
|
11527 break; |
|
11528 |
|
11529 /**** |
|
11530 *BOOL_TO_DATE |
|
11531 */ |
|
11532 case function_bool_to_date : |
|
11533 { |
|
11534 symbol_c *last_type_symbol = NULL; |
|
11535 |
|
11536 { |
|
11537 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11539 symbol_c *IN_param_value = &this->default_variable_name; |
|
11540 |
|
11541 symbol_c *IN_type_symbol = param_data_type; |
|
11542 last_type_symbol = param_data_type; |
|
11543 |
|
11544 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11545 { |
|
11546 |
|
11547 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11548 |
|
11549 if (IN_type_symbol == NULL) |
|
11550 IN_type_symbol = last_type_symbol; |
|
11551 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11552 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11553 function_type_prefix = return_type_symbol; |
|
11554 break; |
|
11555 |
|
11556 } |
|
11557 |
|
11558 |
|
11559 ERROR; |
|
11560 } |
|
11561 |
|
11562 }/*function_bool_to_date*/ |
|
11563 break; |
|
11564 |
|
11565 /**** |
|
11566 *BOOL_TO_DWORD |
|
11567 */ |
|
11568 case function_bool_to_dword : |
|
11569 { |
|
11570 symbol_c *last_type_symbol = NULL; |
|
11571 |
|
11572 { |
|
11573 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11575 symbol_c *IN_param_value = &this->default_variable_name; |
|
11576 |
|
11577 symbol_c *IN_type_symbol = param_data_type; |
|
11578 last_type_symbol = param_data_type; |
|
11579 |
|
11580 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11581 { |
|
11582 |
|
11583 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11584 |
|
11585 if (IN_type_symbol == NULL) |
|
11586 IN_type_symbol = last_type_symbol; |
|
11587 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11588 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11589 function_type_prefix = return_type_symbol; |
|
11590 function_type_suffix = IN_type_symbol; |
|
11591 break; |
|
11592 |
|
11593 } |
|
11594 |
|
11595 |
|
11596 ERROR; |
|
11597 } |
|
11598 |
|
11599 }/*function_bool_to_dword*/ |
|
11600 break; |
|
11601 |
|
11602 /**** |
|
11603 *BOOL_TO_DT |
|
11604 */ |
|
11605 case function_bool_to_dt : |
|
11606 { |
|
11607 symbol_c *last_type_symbol = NULL; |
|
11608 |
|
11609 { |
|
11610 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11612 symbol_c *IN_param_value = &this->default_variable_name; |
|
11613 |
|
11614 symbol_c *IN_type_symbol = param_data_type; |
|
11615 last_type_symbol = param_data_type; |
|
11616 |
|
11617 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11618 { |
|
11619 |
|
11620 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11621 |
|
11622 if (IN_type_symbol == NULL) |
|
11623 IN_type_symbol = last_type_symbol; |
|
11624 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11625 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11626 function_type_prefix = return_type_symbol; |
|
11627 break; |
|
11628 |
|
11629 } |
|
11630 |
|
11631 |
|
11632 ERROR; |
|
11633 } |
|
11634 |
|
11635 }/*function_bool_to_dt*/ |
|
11636 break; |
|
11637 |
|
11638 /**** |
|
11639 *BOOL_TO_TOD |
|
11640 */ |
|
11641 case function_bool_to_tod : |
|
11642 { |
|
11643 symbol_c *last_type_symbol = NULL; |
|
11644 |
|
11645 { |
|
11646 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11647 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11648 symbol_c *IN_param_value = &this->default_variable_name; |
|
11649 |
|
11650 symbol_c *IN_type_symbol = param_data_type; |
|
11651 last_type_symbol = param_data_type; |
|
11652 |
|
11653 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11654 { |
|
11655 |
|
11656 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11657 |
|
11658 if (IN_type_symbol == NULL) |
|
11659 IN_type_symbol = last_type_symbol; |
|
11660 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11661 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11662 function_type_prefix = return_type_symbol; |
|
11663 break; |
|
11664 |
|
11665 } |
|
11666 |
|
11667 |
|
11668 ERROR; |
|
11669 } |
|
11670 |
|
11671 }/*function_bool_to_tod*/ |
|
11672 break; |
|
11673 |
|
11674 /**** |
|
11675 *BOOL_TO_UDINT |
|
11676 */ |
|
11677 case function_bool_to_udint : |
|
11678 { |
|
11679 symbol_c *last_type_symbol = NULL; |
|
11680 |
|
11681 { |
|
11682 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11683 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11684 symbol_c *IN_param_value = &this->default_variable_name; |
|
11685 |
|
11686 symbol_c *IN_type_symbol = param_data_type; |
|
11687 last_type_symbol = param_data_type; |
|
11688 |
|
11689 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11690 { |
|
11691 |
|
11692 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11693 |
|
11694 if (IN_type_symbol == NULL) |
|
11695 IN_type_symbol = last_type_symbol; |
|
11696 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11697 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11698 function_type_prefix = return_type_symbol; |
|
11699 function_type_suffix = IN_type_symbol; |
|
11700 break; |
|
11701 |
|
11702 } |
|
11703 |
|
11704 |
|
11705 ERROR; |
|
11706 } |
|
11707 |
|
11708 }/*function_bool_to_udint*/ |
|
11709 break; |
|
11710 |
|
11711 /**** |
|
11712 *BOOL_TO_WORD |
|
11713 */ |
|
11714 case function_bool_to_word : |
|
11715 { |
|
11716 symbol_c *last_type_symbol = NULL; |
|
11717 |
|
11718 { |
|
11719 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11720 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11721 symbol_c *IN_param_value = &this->default_variable_name; |
|
11722 |
|
11723 symbol_c *IN_type_symbol = param_data_type; |
|
11724 last_type_symbol = param_data_type; |
|
11725 |
|
11726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11727 { |
|
11728 |
|
11729 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11730 |
|
11731 if (IN_type_symbol == NULL) |
|
11732 IN_type_symbol = last_type_symbol; |
|
11733 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11734 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11735 function_type_prefix = return_type_symbol; |
|
11736 function_type_suffix = IN_type_symbol; |
|
11737 break; |
|
11738 |
|
11739 } |
|
11740 |
|
11741 |
|
11742 ERROR; |
|
11743 } |
|
11744 |
|
11745 }/*function_bool_to_word*/ |
|
11746 break; |
|
11747 |
|
11748 /**** |
|
11749 *BOOL_TO_STRING |
|
11750 */ |
|
11751 case function_bool_to_string : |
|
11752 { |
|
11753 symbol_c *last_type_symbol = NULL; |
|
11754 |
|
11755 { |
|
11756 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11757 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11758 symbol_c *IN_param_value = &this->default_variable_name; |
|
11759 |
|
11760 symbol_c *IN_type_symbol = param_data_type; |
|
11761 last_type_symbol = param_data_type; |
|
11762 |
|
11763 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11764 { |
|
11765 |
|
11766 function_name = (symbol_c*)(new pragma_c("__bool_to_string")); |
|
11767 |
|
11768 if (IN_type_symbol == NULL) |
|
11769 IN_type_symbol = last_type_symbol; |
|
11770 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11771 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11772 function_type_prefix = return_type_symbol; |
|
11773 break; |
|
11774 |
|
11775 } |
|
11776 |
|
11777 |
|
11778 ERROR; |
|
11779 } |
|
11780 |
|
11781 }/*function_bool_to_string*/ |
|
11782 break; |
|
11783 |
|
11784 /**** |
|
11785 *BOOL_TO_LWORD |
|
11786 */ |
|
11787 case function_bool_to_lword : |
|
11788 { |
|
11789 symbol_c *last_type_symbol = NULL; |
|
11790 |
|
11791 { |
|
11792 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11793 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11794 symbol_c *IN_param_value = &this->default_variable_name; |
|
11795 |
|
11796 symbol_c *IN_type_symbol = param_data_type; |
|
11797 last_type_symbol = param_data_type; |
|
11798 |
|
11799 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11800 { |
|
11801 |
|
11802 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11803 |
|
11804 if (IN_type_symbol == NULL) |
|
11805 IN_type_symbol = last_type_symbol; |
|
11806 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11807 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11808 function_type_prefix = return_type_symbol; |
|
11809 function_type_suffix = IN_type_symbol; |
|
11810 break; |
|
11811 |
|
11812 } |
|
11813 |
|
11814 |
|
11815 ERROR; |
|
11816 } |
|
11817 |
|
11818 }/*function_bool_to_lword*/ |
|
11819 break; |
|
11820 |
|
11821 /**** |
|
11822 *BOOL_TO_UINT |
|
11823 */ |
|
11824 case function_bool_to_uint : |
|
11825 { |
|
11826 symbol_c *last_type_symbol = NULL; |
|
11827 |
|
11828 { |
|
11829 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11830 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11831 symbol_c *IN_param_value = &this->default_variable_name; |
|
11832 |
|
11833 symbol_c *IN_type_symbol = param_data_type; |
|
11834 last_type_symbol = param_data_type; |
|
11835 |
|
11836 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11837 { |
|
11838 |
|
11839 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11840 |
|
11841 if (IN_type_symbol == NULL) |
|
11842 IN_type_symbol = last_type_symbol; |
|
11843 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11844 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11845 function_type_prefix = return_type_symbol; |
|
11846 function_type_suffix = IN_type_symbol; |
|
11847 break; |
|
11848 |
|
11849 } |
|
11850 |
|
11851 |
|
11852 ERROR; |
|
11853 } |
|
11854 |
|
11855 }/*function_bool_to_uint*/ |
|
11856 break; |
|
11857 |
|
11858 /**** |
|
11859 *BOOL_TO_LREAL |
|
11860 */ |
|
11861 case function_bool_to_lreal : |
|
11862 { |
|
11863 symbol_c *last_type_symbol = NULL; |
|
11864 |
|
11865 { |
|
11866 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11867 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11868 symbol_c *IN_param_value = &this->default_variable_name; |
|
11869 |
|
11870 symbol_c *IN_type_symbol = param_data_type; |
|
11871 last_type_symbol = param_data_type; |
|
11872 |
|
11873 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11874 { |
|
11875 |
|
11876 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11877 |
|
11878 if (IN_type_symbol == NULL) |
|
11879 IN_type_symbol = last_type_symbol; |
|
11880 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11881 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11882 function_type_prefix = return_type_symbol; |
|
11883 function_type_suffix = IN_type_symbol; |
|
11884 break; |
|
11885 |
|
11886 } |
|
11887 |
|
11888 |
|
11889 ERROR; |
|
11890 } |
|
11891 |
|
11892 }/*function_bool_to_lreal*/ |
|
11893 break; |
|
11894 |
|
11895 /**** |
|
11896 *BOOL_TO_BYTE |
|
11897 */ |
|
11898 case function_bool_to_byte : |
|
11899 { |
|
11900 symbol_c *last_type_symbol = NULL; |
|
11901 |
|
11902 { |
|
11903 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11905 symbol_c *IN_param_value = &this->default_variable_name; |
|
11906 |
|
11907 symbol_c *IN_type_symbol = param_data_type; |
|
11908 last_type_symbol = param_data_type; |
|
11909 |
|
11910 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11911 { |
|
11912 |
|
11913 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11914 |
|
11915 if (IN_type_symbol == NULL) |
|
11916 IN_type_symbol = last_type_symbol; |
|
11917 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11918 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11919 function_type_prefix = return_type_symbol; |
|
11920 function_type_suffix = IN_type_symbol; |
|
11921 break; |
|
11922 |
|
11923 } |
|
11924 |
|
11925 |
|
11926 ERROR; |
|
11927 } |
|
11928 |
|
11929 }/*function_bool_to_byte*/ |
|
11930 break; |
|
11931 |
|
11932 /**** |
|
11933 *BOOL_TO_USINT |
|
11934 */ |
|
11935 case function_bool_to_usint : |
|
11936 { |
|
11937 symbol_c *last_type_symbol = NULL; |
|
11938 |
|
11939 { |
|
11940 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11941 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11942 symbol_c *IN_param_value = &this->default_variable_name; |
|
11943 |
|
11944 symbol_c *IN_type_symbol = param_data_type; |
|
11945 last_type_symbol = param_data_type; |
|
11946 |
|
11947 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11948 { |
|
11949 |
|
11950 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11951 |
|
11952 if (IN_type_symbol == NULL) |
|
11953 IN_type_symbol = last_type_symbol; |
|
11954 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11955 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11956 function_type_prefix = return_type_symbol; |
|
11957 function_type_suffix = IN_type_symbol; |
|
11958 break; |
|
11959 |
|
11960 } |
|
11961 |
|
11962 |
|
11963 ERROR; |
|
11964 } |
|
11965 |
|
11966 }/*function_bool_to_usint*/ |
|
11967 break; |
|
11968 |
|
11969 /**** |
|
11970 *BOOL_TO_ULINT |
|
11971 */ |
|
11972 case function_bool_to_ulint : |
|
11973 { |
|
11974 symbol_c *last_type_symbol = NULL; |
|
11975 |
|
11976 { |
|
11977 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
11978 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11979 symbol_c *IN_param_value = &this->default_variable_name; |
|
11980 |
|
11981 symbol_c *IN_type_symbol = param_data_type; |
|
11982 last_type_symbol = param_data_type; |
|
11983 |
|
11984 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
11985 { |
|
11986 |
|
11987 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
11988 |
|
11989 if (IN_type_symbol == NULL) |
|
11990 IN_type_symbol = last_type_symbol; |
|
11991 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11992 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11993 function_type_prefix = return_type_symbol; |
|
11994 function_type_suffix = IN_type_symbol; |
|
11995 break; |
|
11996 |
|
11997 } |
|
11998 |
|
11999 |
|
12000 ERROR; |
|
12001 } |
|
12002 |
|
12003 }/*function_bool_to_ulint*/ |
|
12004 break; |
|
12005 |
|
12006 /**** |
|
12007 *BOOL_TO_TIME |
|
12008 */ |
|
12009 case function_bool_to_time : |
|
12010 { |
|
12011 symbol_c *last_type_symbol = NULL; |
|
12012 |
|
12013 { |
|
12014 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12015 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12016 symbol_c *IN_param_value = &this->default_variable_name; |
|
12017 |
|
12018 symbol_c *IN_type_symbol = param_data_type; |
|
12019 last_type_symbol = param_data_type; |
|
12020 |
|
12021 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12022 { |
|
12023 |
|
12024 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12025 |
|
12026 if (IN_type_symbol == NULL) |
|
12027 IN_type_symbol = last_type_symbol; |
|
12028 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12029 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
12030 function_type_prefix = return_type_symbol; |
|
12031 break; |
|
12032 |
|
12033 } |
|
12034 |
|
12035 |
|
12036 ERROR; |
|
12037 } |
|
12038 |
|
12039 }/*function_bool_to_time*/ |
|
12040 break; |
|
12041 |
|
12042 /**** |
|
12043 *BOOL_TO_INT |
|
12044 */ |
|
12045 case function_bool_to_int : |
|
12046 { |
|
12047 symbol_c *last_type_symbol = NULL; |
|
12048 |
|
12049 { |
|
12050 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12051 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12052 symbol_c *IN_param_value = &this->default_variable_name; |
|
12053 |
|
12054 symbol_c *IN_type_symbol = param_data_type; |
|
12055 last_type_symbol = param_data_type; |
|
12056 |
|
12057 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12058 { |
|
12059 |
|
12060 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12061 |
|
12062 if (IN_type_symbol == NULL) |
|
12063 IN_type_symbol = last_type_symbol; |
|
12064 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12065 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12066 function_type_prefix = return_type_symbol; |
|
12067 function_type_suffix = IN_type_symbol; |
|
12068 break; |
|
12069 |
|
12070 } |
|
12071 |
|
12072 |
|
12073 ERROR; |
|
12074 } |
|
12075 |
|
12076 }/*function_bool_to_int*/ |
|
12077 break; |
|
12078 |
|
12079 /**** |
|
12080 *TIME_TO_REAL |
|
12081 */ |
|
12082 case function_time_to_real : |
|
12083 { |
|
12084 symbol_c *last_type_symbol = NULL; |
|
12085 |
|
12086 { |
|
12087 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12088 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12089 symbol_c *IN_param_value = &this->default_variable_name; |
|
12090 |
|
12091 symbol_c *IN_type_symbol = param_data_type; |
|
12092 last_type_symbol = param_data_type; |
|
12093 |
|
12094 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12095 { |
|
12096 |
|
12097 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
12098 |
|
12099 if (IN_type_symbol == NULL) |
|
12100 IN_type_symbol = last_type_symbol; |
|
12101 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12102 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12103 function_type_prefix = return_type_symbol; |
|
12104 break; |
|
12105 |
|
12106 } |
|
12107 |
|
12108 |
|
12109 ERROR; |
|
12110 } |
|
12111 |
|
12112 }/*function_time_to_real*/ |
|
12113 break; |
|
12114 |
|
12115 /**** |
|
12116 *TIME_TO_SINT |
|
12117 */ |
|
12118 case function_time_to_sint : |
|
12119 { |
|
12120 symbol_c *last_type_symbol = NULL; |
|
12121 |
|
12122 { |
|
12123 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12124 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12125 symbol_c *IN_param_value = &this->default_variable_name; |
|
12126 |
|
12127 symbol_c *IN_type_symbol = param_data_type; |
|
12128 last_type_symbol = param_data_type; |
|
12129 |
|
12130 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12131 { |
|
12132 |
|
12133 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12134 |
|
12135 if (IN_type_symbol == NULL) |
|
12136 IN_type_symbol = last_type_symbol; |
|
12137 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12138 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12139 function_type_prefix = return_type_symbol; |
|
12140 break; |
|
12141 |
|
12142 } |
|
12143 |
|
12144 |
|
12145 ERROR; |
|
12146 } |
|
12147 |
|
12148 }/*function_time_to_sint*/ |
|
12149 break; |
|
12150 |
|
12151 /**** |
|
12152 *TIME_TO_LINT |
|
12153 */ |
|
12154 case function_time_to_lint : |
|
12155 { |
|
12156 symbol_c *last_type_symbol = NULL; |
|
12157 |
|
12158 { |
|
12159 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12160 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12161 symbol_c *IN_param_value = &this->default_variable_name; |
|
12162 |
|
12163 symbol_c *IN_type_symbol = param_data_type; |
|
12164 last_type_symbol = param_data_type; |
|
12165 |
|
12166 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12167 { |
|
12168 |
|
12169 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12170 |
|
12171 if (IN_type_symbol == NULL) |
|
12172 IN_type_symbol = last_type_symbol; |
|
12173 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12174 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12175 function_type_prefix = return_type_symbol; |
|
12176 break; |
|
12177 |
|
12178 } |
|
12179 |
|
12180 |
|
12181 ERROR; |
|
12182 } |
|
12183 |
|
12184 }/*function_time_to_lint*/ |
|
12185 break; |
|
12186 |
|
12187 /**** |
|
12188 *TIME_TO_DINT |
|
12189 */ |
|
12190 case function_time_to_dint : |
|
12191 { |
|
12192 symbol_c *last_type_symbol = NULL; |
|
12193 |
|
12194 { |
|
12195 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12196 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12197 symbol_c *IN_param_value = &this->default_variable_name; |
|
12198 |
|
12199 symbol_c *IN_type_symbol = param_data_type; |
|
12200 last_type_symbol = param_data_type; |
|
12201 |
|
12202 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12203 { |
|
12204 |
|
12205 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12206 |
|
12207 if (IN_type_symbol == NULL) |
|
12208 IN_type_symbol = last_type_symbol; |
|
12209 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12210 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12211 function_type_prefix = return_type_symbol; |
|
12212 break; |
|
12213 |
|
12214 } |
|
12215 |
|
12216 |
|
12217 ERROR; |
|
12218 } |
|
12219 |
|
12220 }/*function_time_to_dint*/ |
|
12221 break; |
|
12222 |
|
12223 /**** |
|
12224 *TIME_TO_DWORD |
|
12225 */ |
|
12226 case function_time_to_dword : |
|
12227 { |
|
12228 symbol_c *last_type_symbol = NULL; |
|
12229 |
|
12230 { |
|
12231 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12233 symbol_c *IN_param_value = &this->default_variable_name; |
|
12234 |
|
12235 symbol_c *IN_type_symbol = param_data_type; |
|
12236 last_type_symbol = param_data_type; |
|
12237 |
|
12238 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12239 { |
|
12240 |
|
12241 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12242 |
|
12243 if (IN_type_symbol == NULL) |
|
12244 IN_type_symbol = last_type_symbol; |
|
12245 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12246 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
12247 function_type_prefix = return_type_symbol; |
|
12248 break; |
|
12249 |
|
12250 } |
|
12251 |
|
12252 |
|
12253 ERROR; |
|
12254 } |
|
12255 |
|
12256 }/*function_time_to_dword*/ |
|
12257 break; |
|
12258 |
|
12259 /**** |
|
12260 *TIME_TO_UDINT |
|
12261 */ |
|
12262 case function_time_to_udint : |
|
12263 { |
|
12264 symbol_c *last_type_symbol = NULL; |
|
12265 |
|
12266 { |
|
12267 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12268 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12269 symbol_c *IN_param_value = &this->default_variable_name; |
|
12270 |
|
12271 symbol_c *IN_type_symbol = param_data_type; |
|
12272 last_type_symbol = param_data_type; |
|
12273 |
|
12274 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12275 { |
|
12276 |
|
12277 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12278 |
|
12279 if (IN_type_symbol == NULL) |
|
12280 IN_type_symbol = last_type_symbol; |
|
12281 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12282 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12283 function_type_prefix = return_type_symbol; |
|
12284 break; |
|
12285 |
|
12286 } |
|
12287 |
|
12288 |
|
12289 ERROR; |
|
12290 } |
|
12291 |
|
12292 }/*function_time_to_udint*/ |
|
12293 break; |
|
12294 |
|
12295 /**** |
|
12296 *TIME_TO_WORD |
|
12297 */ |
|
12298 case function_time_to_word : |
|
12299 { |
|
12300 symbol_c *last_type_symbol = NULL; |
|
12301 |
|
12302 { |
|
12303 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12304 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12305 symbol_c *IN_param_value = &this->default_variable_name; |
|
12306 |
|
12307 symbol_c *IN_type_symbol = param_data_type; |
|
12308 last_type_symbol = param_data_type; |
|
12309 |
|
12310 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12311 { |
|
12312 |
|
12313 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12314 |
|
12315 if (IN_type_symbol == NULL) |
|
12316 IN_type_symbol = last_type_symbol; |
|
12317 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12318 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
12319 function_type_prefix = return_type_symbol; |
|
12320 break; |
|
12321 |
|
12322 } |
|
12323 |
|
12324 |
|
12325 ERROR; |
|
12326 } |
|
12327 |
|
12328 }/*function_time_to_word*/ |
|
12329 break; |
|
12330 |
|
12331 /**** |
|
12332 *TIME_TO_STRING |
|
12333 */ |
|
12334 case function_time_to_string : |
|
12335 { |
|
12336 symbol_c *last_type_symbol = NULL; |
|
12337 |
|
12338 { |
|
12339 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12340 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12341 symbol_c *IN_param_value = &this->default_variable_name; |
|
12342 |
|
12343 symbol_c *IN_type_symbol = param_data_type; |
|
12344 last_type_symbol = param_data_type; |
|
12345 |
|
12346 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12347 { |
|
12348 |
|
12349 function_name = (symbol_c*)(new pragma_c("__time_to_string")); |
|
12350 |
|
12351 if (IN_type_symbol == NULL) |
|
12352 IN_type_symbol = last_type_symbol; |
|
12353 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12354 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
12355 function_type_prefix = return_type_symbol; |
|
12356 break; |
|
12357 |
|
12358 } |
|
12359 |
|
12360 |
|
12361 ERROR; |
|
12362 } |
|
12363 |
|
12364 }/*function_time_to_string*/ |
|
12365 break; |
|
12366 |
|
12367 /**** |
|
12368 *TIME_TO_LWORD |
|
12369 */ |
|
12370 case function_time_to_lword : |
|
12371 { |
|
12372 symbol_c *last_type_symbol = NULL; |
|
12373 |
|
12374 { |
|
12375 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12376 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12377 symbol_c *IN_param_value = &this->default_variable_name; |
|
12378 |
|
12379 symbol_c *IN_type_symbol = param_data_type; |
|
12380 last_type_symbol = param_data_type; |
|
12381 |
|
12382 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12383 { |
|
12384 |
|
12385 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12386 |
|
12387 if (IN_type_symbol == NULL) |
|
12388 IN_type_symbol = last_type_symbol; |
|
12389 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12390 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
12391 function_type_prefix = return_type_symbol; |
|
12392 break; |
|
12393 |
|
12394 } |
|
12395 |
|
12396 |
|
12397 ERROR; |
|
12398 } |
|
12399 |
|
12400 }/*function_time_to_lword*/ |
|
12401 break; |
|
12402 |
|
12403 /**** |
|
12404 *TIME_TO_UINT |
|
12405 */ |
|
12406 case function_time_to_uint : |
|
12407 { |
|
12408 symbol_c *last_type_symbol = NULL; |
|
12409 |
|
12410 { |
|
12411 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12419 { |
|
12420 |
|
12421 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12422 |
|
12423 if (IN_type_symbol == NULL) |
|
12424 IN_type_symbol = last_type_symbol; |
|
12425 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12426 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
12427 function_type_prefix = return_type_symbol; |
|
12428 break; |
|
12429 |
|
12430 } |
|
12431 |
|
12432 |
|
12433 ERROR; |
|
12434 } |
|
12435 |
|
12436 }/*function_time_to_uint*/ |
|
12437 break; |
|
12438 |
|
12439 /**** |
|
12440 *TIME_TO_LREAL |
|
12441 */ |
|
12442 case function_time_to_lreal : |
|
12443 { |
|
12444 symbol_c *last_type_symbol = NULL; |
|
12445 |
|
12446 { |
|
12447 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12448 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12449 symbol_c *IN_param_value = &this->default_variable_name; |
|
12450 |
|
12451 symbol_c *IN_type_symbol = param_data_type; |
|
12452 last_type_symbol = param_data_type; |
|
12453 |
|
12454 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12455 { |
|
12456 |
|
12457 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
12458 |
|
12459 if (IN_type_symbol == NULL) |
|
12460 IN_type_symbol = last_type_symbol; |
|
12461 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12462 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
12463 function_type_prefix = return_type_symbol; |
|
12464 break; |
|
12465 |
|
12466 } |
|
12467 |
|
12468 |
|
12469 ERROR; |
|
12470 } |
|
12471 |
|
12472 }/*function_time_to_lreal*/ |
|
12473 break; |
|
12474 |
|
12475 /**** |
|
12476 *TIME_TO_BYTE |
|
12477 */ |
|
12478 case function_time_to_byte : |
|
12479 { |
|
12480 symbol_c *last_type_symbol = NULL; |
|
12481 |
|
12482 { |
|
12483 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12484 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12485 symbol_c *IN_param_value = &this->default_variable_name; |
|
12486 |
|
12487 symbol_c *IN_type_symbol = param_data_type; |
|
12488 last_type_symbol = param_data_type; |
|
12489 |
|
12490 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12491 { |
|
12492 |
|
12493 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12494 |
|
12495 if (IN_type_symbol == NULL) |
|
12496 IN_type_symbol = last_type_symbol; |
|
12497 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12498 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
12499 function_type_prefix = return_type_symbol; |
|
12500 break; |
|
12501 |
|
12502 } |
|
12503 |
|
12504 |
|
12505 ERROR; |
|
12506 } |
|
12507 |
|
12508 }/*function_time_to_byte*/ |
|
12509 break; |
|
12510 |
|
12511 /**** |
|
12512 *TIME_TO_USINT |
|
12513 */ |
|
12514 case function_time_to_usint : |
|
12515 { |
|
12516 symbol_c *last_type_symbol = NULL; |
|
12517 |
|
12518 { |
|
12519 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12520 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12521 symbol_c *IN_param_value = &this->default_variable_name; |
|
12522 |
|
12523 symbol_c *IN_type_symbol = param_data_type; |
|
12524 last_type_symbol = param_data_type; |
|
12525 |
|
12526 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12527 { |
|
12528 |
|
12529 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12530 |
|
12531 if (IN_type_symbol == NULL) |
|
12532 IN_type_symbol = last_type_symbol; |
|
12533 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12534 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
12535 function_type_prefix = return_type_symbol; |
|
12536 break; |
|
12537 |
|
12538 } |
|
12539 |
|
12540 |
|
12541 ERROR; |
|
12542 } |
|
12543 |
|
12544 }/*function_time_to_usint*/ |
|
12545 break; |
|
12546 |
|
12547 /**** |
|
12548 *TIME_TO_ULINT |
|
12549 */ |
|
12550 case function_time_to_ulint : |
|
12551 { |
|
12552 symbol_c *last_type_symbol = NULL; |
|
12553 |
|
12554 { |
|
12555 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12556 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12557 symbol_c *IN_param_value = &this->default_variable_name; |
|
12558 |
|
12559 symbol_c *IN_type_symbol = param_data_type; |
|
12560 last_type_symbol = param_data_type; |
|
12561 |
|
12562 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12563 { |
|
12564 |
|
12565 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12566 |
|
12567 if (IN_type_symbol == NULL) |
|
12568 IN_type_symbol = last_type_symbol; |
|
12569 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12570 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
12571 function_type_prefix = return_type_symbol; |
|
12572 break; |
|
12573 |
|
12574 } |
|
12575 |
|
12576 |
|
12577 ERROR; |
|
12578 } |
|
12579 |
|
12580 }/*function_time_to_ulint*/ |
|
12581 break; |
|
12582 |
|
12583 /**** |
|
12584 *TIME_TO_INT |
|
12585 */ |
|
12586 case function_time_to_int : |
|
12587 { |
|
12588 symbol_c *last_type_symbol = NULL; |
|
12589 |
|
12590 { |
|
12591 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12592 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12593 symbol_c *IN_param_value = &this->default_variable_name; |
|
12594 |
|
12595 symbol_c *IN_type_symbol = param_data_type; |
|
12596 last_type_symbol = param_data_type; |
|
12597 |
|
12598 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
12599 { |
|
12600 |
|
12601 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
12602 |
|
12603 if (IN_type_symbol == NULL) |
|
12604 IN_type_symbol = last_type_symbol; |
|
12605 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12606 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
12607 function_type_prefix = return_type_symbol; |
|
12608 break; |
|
12609 |
|
12610 } |
|
12611 |
|
12612 |
|
12613 ERROR; |
|
12614 } |
|
12615 |
|
12616 }/*function_time_to_int*/ |
|
12617 break; |
|
12618 |
|
12619 /**** |
|
12620 *INT_TO_REAL |
|
12621 */ |
|
12622 case function_int_to_real : |
|
12623 { |
|
12624 symbol_c *last_type_symbol = NULL; |
|
12625 |
|
12626 { |
|
12627 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12628 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12629 symbol_c *IN_param_value = &this->default_variable_name; |
|
12630 |
|
12631 symbol_c *IN_type_symbol = param_data_type; |
|
12632 last_type_symbol = param_data_type; |
|
12633 |
|
12634 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12635 { |
|
12636 |
|
12637 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12638 |
|
12639 if (IN_type_symbol == NULL) |
|
12640 IN_type_symbol = last_type_symbol; |
|
12641 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12642 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
12643 function_type_prefix = return_type_symbol; |
|
12644 function_type_suffix = IN_type_symbol; |
|
12645 break; |
|
12646 |
|
12647 } |
|
12648 |
|
12649 |
|
12650 ERROR; |
|
12651 } |
|
12652 |
|
12653 }/*function_int_to_real*/ |
|
12654 break; |
|
12655 |
|
12656 /**** |
|
12657 *INT_TO_SINT |
|
12658 */ |
|
12659 case function_int_to_sint : |
|
12660 { |
|
12661 symbol_c *last_type_symbol = NULL; |
|
12662 |
|
12663 { |
|
12664 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12665 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12666 symbol_c *IN_param_value = &this->default_variable_name; |
|
12667 |
|
12668 symbol_c *IN_type_symbol = param_data_type; |
|
12669 last_type_symbol = param_data_type; |
|
12670 |
|
12671 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12672 { |
|
12673 |
|
12674 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12675 |
|
12676 if (IN_type_symbol == NULL) |
|
12677 IN_type_symbol = last_type_symbol; |
|
12678 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12679 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
12680 function_type_prefix = return_type_symbol; |
|
12681 function_type_suffix = IN_type_symbol; |
|
12682 break; |
|
12683 |
|
12684 } |
|
12685 |
|
12686 |
|
12687 ERROR; |
|
12688 } |
|
12689 |
|
12690 }/*function_int_to_sint*/ |
|
12691 break; |
|
12692 |
|
12693 /**** |
|
12694 *INT_TO_LINT |
|
12695 */ |
|
12696 case function_int_to_lint : |
|
12697 { |
|
12698 symbol_c *last_type_symbol = NULL; |
|
12699 |
|
12700 { |
|
12701 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12702 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12703 symbol_c *IN_param_value = &this->default_variable_name; |
|
12704 |
|
12705 symbol_c *IN_type_symbol = param_data_type; |
|
12706 last_type_symbol = param_data_type; |
|
12707 |
|
12708 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12709 { |
|
12710 |
|
12711 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12712 |
|
12713 if (IN_type_symbol == NULL) |
|
12714 IN_type_symbol = last_type_symbol; |
|
12715 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12716 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
12717 function_type_prefix = return_type_symbol; |
|
12718 function_type_suffix = IN_type_symbol; |
|
12719 break; |
|
12720 |
|
12721 } |
|
12722 |
|
12723 |
|
12724 ERROR; |
|
12725 } |
|
12726 |
|
12727 }/*function_int_to_lint*/ |
|
12728 break; |
|
12729 |
|
12730 /**** |
|
12731 *INT_TO_DINT |
|
12732 */ |
|
12733 case function_int_to_dint : |
|
12734 { |
|
12735 symbol_c *last_type_symbol = NULL; |
|
12736 |
|
12737 { |
|
12738 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12740 symbol_c *IN_param_value = &this->default_variable_name; |
|
12741 |
|
12742 symbol_c *IN_type_symbol = param_data_type; |
|
12743 last_type_symbol = param_data_type; |
|
12744 |
|
12745 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12746 { |
|
12747 |
|
12748 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12749 |
|
12750 if (IN_type_symbol == NULL) |
|
12751 IN_type_symbol = last_type_symbol; |
|
12752 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12753 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
12754 function_type_prefix = return_type_symbol; |
|
12755 function_type_suffix = IN_type_symbol; |
|
12756 break; |
|
12757 |
|
12758 } |
|
12759 |
|
12760 |
|
12761 ERROR; |
|
12762 } |
|
12763 |
|
12764 }/*function_int_to_dint*/ |
|
12765 break; |
|
12766 |
|
12767 /**** |
|
12768 *INT_TO_DATE |
|
12769 */ |
|
12770 case function_int_to_date : |
|
12771 { |
|
12772 symbol_c *last_type_symbol = NULL; |
|
12773 |
|
12774 { |
|
12775 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12776 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12777 symbol_c *IN_param_value = &this->default_variable_name; |
|
12778 |
|
12779 symbol_c *IN_type_symbol = param_data_type; |
|
12780 last_type_symbol = param_data_type; |
|
12781 |
|
12782 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12783 { |
|
12784 |
|
12785 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12786 |
|
12787 if (IN_type_symbol == NULL) |
|
12788 IN_type_symbol = last_type_symbol; |
|
12789 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12790 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
12791 function_type_prefix = return_type_symbol; |
|
12792 break; |
|
12793 |
|
12794 } |
|
12795 |
|
12796 |
|
12797 ERROR; |
|
12798 } |
|
12799 |
|
12800 }/*function_int_to_date*/ |
|
12801 break; |
|
12802 |
|
12803 /**** |
|
12804 *INT_TO_DWORD |
|
12805 */ |
|
12806 case function_int_to_dword : |
|
12807 { |
|
12808 symbol_c *last_type_symbol = NULL; |
|
12809 |
|
12810 { |
|
12811 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12812 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12813 symbol_c *IN_param_value = &this->default_variable_name; |
|
12814 |
|
12815 symbol_c *IN_type_symbol = param_data_type; |
|
12816 last_type_symbol = param_data_type; |
|
12817 |
|
12818 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12819 { |
|
12820 |
|
12821 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12822 |
|
12823 if (IN_type_symbol == NULL) |
|
12824 IN_type_symbol = last_type_symbol; |
|
12825 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12826 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
12827 function_type_prefix = return_type_symbol; |
|
12828 function_type_suffix = IN_type_symbol; |
|
12829 break; |
|
12830 |
|
12831 } |
|
12832 |
|
12833 |
|
12834 ERROR; |
|
12835 } |
|
12836 |
|
12837 }/*function_int_to_dword*/ |
|
12838 break; |
|
12839 |
|
12840 /**** |
|
12841 *INT_TO_DT |
|
12842 */ |
|
12843 case function_int_to_dt : |
|
12844 { |
|
12845 symbol_c *last_type_symbol = NULL; |
|
12846 |
|
12847 { |
|
12848 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12849 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12850 symbol_c *IN_param_value = &this->default_variable_name; |
|
12851 |
|
12852 symbol_c *IN_type_symbol = param_data_type; |
|
12853 last_type_symbol = param_data_type; |
|
12854 |
|
12855 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12856 { |
|
12857 |
|
12858 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12859 |
|
12860 if (IN_type_symbol == NULL) |
|
12861 IN_type_symbol = last_type_symbol; |
|
12862 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12863 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
12864 function_type_prefix = return_type_symbol; |
|
12865 break; |
|
12866 |
|
12867 } |
|
12868 |
|
12869 |
|
12870 ERROR; |
|
12871 } |
|
12872 |
|
12873 }/*function_int_to_dt*/ |
|
12874 break; |
|
12875 |
|
12876 /**** |
|
12877 *INT_TO_TOD |
|
12878 */ |
|
12879 case function_int_to_tod : |
|
12880 { |
|
12881 symbol_c *last_type_symbol = NULL; |
|
12882 |
|
12883 { |
|
12884 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12885 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12886 symbol_c *IN_param_value = &this->default_variable_name; |
|
12887 |
|
12888 symbol_c *IN_type_symbol = param_data_type; |
|
12889 last_type_symbol = param_data_type; |
|
12890 |
|
12891 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12892 { |
|
12893 |
|
12894 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12895 |
|
12896 if (IN_type_symbol == NULL) |
|
12897 IN_type_symbol = last_type_symbol; |
|
12898 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12899 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
12900 function_type_prefix = return_type_symbol; |
|
12901 break; |
|
12902 |
|
12903 } |
|
12904 |
|
12905 |
|
12906 ERROR; |
|
12907 } |
|
12908 |
|
12909 }/*function_int_to_tod*/ |
|
12910 break; |
|
12911 |
|
12912 /**** |
|
12913 *INT_TO_UDINT |
|
12914 */ |
|
12915 case function_int_to_udint : |
|
12916 { |
|
12917 symbol_c *last_type_symbol = NULL; |
|
12918 |
|
12919 { |
|
12920 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12921 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12922 symbol_c *IN_param_value = &this->default_variable_name; |
|
12923 |
|
12924 symbol_c *IN_type_symbol = param_data_type; |
|
12925 last_type_symbol = param_data_type; |
|
12926 |
|
12927 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12928 { |
|
12929 |
|
12930 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12931 |
|
12932 if (IN_type_symbol == NULL) |
|
12933 IN_type_symbol = last_type_symbol; |
|
12934 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12935 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
12936 function_type_prefix = return_type_symbol; |
|
12937 function_type_suffix = IN_type_symbol; |
|
12938 break; |
|
12939 |
|
12940 } |
|
12941 |
|
12942 |
|
12943 ERROR; |
|
12944 } |
|
12945 |
|
12946 }/*function_int_to_udint*/ |
|
12947 break; |
|
12948 |
|
12949 /**** |
|
12950 *INT_TO_WORD |
|
12951 */ |
|
12952 case function_int_to_word : |
|
12953 { |
|
12954 symbol_c *last_type_symbol = NULL; |
|
12955 |
|
12956 { |
|
12957 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12958 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12959 symbol_c *IN_param_value = &this->default_variable_name; |
|
12960 |
|
12961 symbol_c *IN_type_symbol = param_data_type; |
|
12962 last_type_symbol = param_data_type; |
|
12963 |
|
12964 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
12965 { |
|
12966 |
|
12967 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
12968 |
|
12969 if (IN_type_symbol == NULL) |
|
12970 IN_type_symbol = last_type_symbol; |
|
12971 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
12972 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
12973 function_type_prefix = return_type_symbol; |
|
12974 function_type_suffix = IN_type_symbol; |
|
12975 break; |
|
12976 |
|
12977 } |
|
12978 |
|
12979 |
|
12980 ERROR; |
|
12981 } |
|
12982 |
|
12983 }/*function_int_to_word*/ |
|
12984 break; |
|
12985 |
|
12986 /**** |
|
12987 *INT_TO_STRING |
|
12988 */ |
|
12989 case function_int_to_string : |
|
12990 { |
|
12991 symbol_c *last_type_symbol = NULL; |
|
12992 |
|
12993 { |
|
12994 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
12995 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
12996 symbol_c *IN_param_value = &this->default_variable_name; |
|
12997 |
|
12998 symbol_c *IN_type_symbol = param_data_type; |
|
12999 last_type_symbol = param_data_type; |
|
13000 |
|
13001 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13002 { |
|
13003 |
|
13004 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
13005 |
|
13006 if (IN_type_symbol == NULL) |
|
13007 IN_type_symbol = last_type_symbol; |
|
13008 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13009 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
13010 function_type_prefix = return_type_symbol; |
|
13011 break; |
|
13012 |
|
13013 } |
|
13014 |
|
13015 |
|
13016 ERROR; |
|
13017 } |
|
13018 |
|
13019 }/*function_int_to_string*/ |
|
13020 break; |
|
13021 |
|
13022 /**** |
|
13023 *INT_TO_LWORD |
|
13024 */ |
|
13025 case function_int_to_lword : |
|
13026 { |
|
13027 symbol_c *last_type_symbol = NULL; |
|
13028 |
|
13029 { |
|
13030 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13031 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13032 symbol_c *IN_param_value = &this->default_variable_name; |
|
13033 |
|
13034 symbol_c *IN_type_symbol = param_data_type; |
|
13035 last_type_symbol = param_data_type; |
|
13036 |
|
13037 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13038 { |
|
13039 |
|
13040 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13041 |
|
13042 if (IN_type_symbol == NULL) |
|
13043 IN_type_symbol = last_type_symbol; |
|
13044 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13045 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
13046 function_type_prefix = return_type_symbol; |
|
13047 function_type_suffix = IN_type_symbol; |
|
13048 break; |
|
13049 |
|
13050 } |
|
13051 |
|
13052 |
|
13053 ERROR; |
|
13054 } |
|
13055 |
|
13056 }/*function_int_to_lword*/ |
|
13057 break; |
|
13058 |
|
13059 /**** |
|
13060 *INT_TO_UINT |
|
13061 */ |
|
13062 case function_int_to_uint : |
|
13063 { |
|
13064 symbol_c *last_type_symbol = NULL; |
|
13065 |
|
13066 { |
|
13067 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13069 symbol_c *IN_param_value = &this->default_variable_name; |
|
13070 |
|
13071 symbol_c *IN_type_symbol = param_data_type; |
|
13072 last_type_symbol = param_data_type; |
|
13073 |
|
13074 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13075 { |
|
13076 |
|
13077 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13078 |
|
13079 if (IN_type_symbol == NULL) |
|
13080 IN_type_symbol = last_type_symbol; |
|
13081 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13082 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
13083 function_type_prefix = return_type_symbol; |
|
13084 function_type_suffix = IN_type_symbol; |
|
13085 break; |
|
13086 |
|
13087 } |
|
13088 |
|
13089 |
|
13090 ERROR; |
|
13091 } |
|
13092 |
|
13093 }/*function_int_to_uint*/ |
|
13094 break; |
|
13095 |
|
13096 /**** |
|
13097 *INT_TO_LREAL |
|
13098 */ |
|
13099 case function_int_to_lreal : |
|
13100 { |
|
13101 symbol_c *last_type_symbol = NULL; |
|
13102 |
|
13103 { |
|
13104 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
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(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13112 { |
|
13113 |
|
13114 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13115 |
|
13116 if (IN_type_symbol == NULL) |
|
13117 IN_type_symbol = last_type_symbol; |
|
13118 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13119 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
13120 function_type_prefix = return_type_symbol; |
|
13121 function_type_suffix = IN_type_symbol; |
|
13122 break; |
|
13123 |
|
13124 } |
|
13125 |
|
13126 |
|
13127 ERROR; |
|
13128 } |
|
13129 |
|
13130 }/*function_int_to_lreal*/ |
|
13131 break; |
|
13132 |
|
13133 /**** |
|
13134 *INT_TO_BYTE |
|
13135 */ |
|
13136 case function_int_to_byte : |
|
13137 { |
|
13138 symbol_c *last_type_symbol = NULL; |
|
13139 |
|
13140 { |
|
13141 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13142 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13143 symbol_c *IN_param_value = &this->default_variable_name; |
|
13144 |
|
13145 symbol_c *IN_type_symbol = param_data_type; |
|
13146 last_type_symbol = param_data_type; |
|
13147 |
|
13148 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13149 { |
|
13150 |
|
13151 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13152 |
|
13153 if (IN_type_symbol == NULL) |
|
13154 IN_type_symbol = last_type_symbol; |
|
13155 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13156 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
13157 function_type_prefix = return_type_symbol; |
|
13158 function_type_suffix = IN_type_symbol; |
|
13159 break; |
|
13160 |
|
13161 } |
|
13162 |
|
13163 |
|
13164 ERROR; |
|
13165 } |
|
13166 |
|
13167 }/*function_int_to_byte*/ |
|
13168 break; |
|
13169 |
|
13170 /**** |
|
13171 *INT_TO_USINT |
|
13172 */ |
|
13173 case function_int_to_usint : |
|
13174 { |
|
13175 symbol_c *last_type_symbol = NULL; |
|
13176 |
|
13177 { |
|
13178 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13180 symbol_c *IN_param_value = &this->default_variable_name; |
|
13181 |
|
13182 symbol_c *IN_type_symbol = param_data_type; |
|
13183 last_type_symbol = param_data_type; |
|
13184 |
|
13185 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13186 { |
|
13187 |
|
13188 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13189 |
|
13190 if (IN_type_symbol == NULL) |
|
13191 IN_type_symbol = last_type_symbol; |
|
13192 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13193 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
13194 function_type_prefix = return_type_symbol; |
|
13195 function_type_suffix = IN_type_symbol; |
|
13196 break; |
|
13197 |
|
13198 } |
|
13199 |
|
13200 |
|
13201 ERROR; |
|
13202 } |
|
13203 |
|
13204 }/*function_int_to_usint*/ |
|
13205 break; |
|
13206 |
|
13207 /**** |
|
13208 *INT_TO_ULINT |
|
13209 */ |
|
13210 case function_int_to_ulint : |
|
13211 { |
|
13212 symbol_c *last_type_symbol = NULL; |
|
13213 |
|
13214 { |
|
13215 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13216 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13217 symbol_c *IN_param_value = &this->default_variable_name; |
|
13218 |
|
13219 symbol_c *IN_type_symbol = param_data_type; |
|
13220 last_type_symbol = param_data_type; |
|
13221 |
|
13222 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13223 { |
|
13224 |
|
13225 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13226 |
|
13227 if (IN_type_symbol == NULL) |
|
13228 IN_type_symbol = last_type_symbol; |
|
13229 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13230 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
13231 function_type_prefix = return_type_symbol; |
|
13232 function_type_suffix = IN_type_symbol; |
|
13233 break; |
|
13234 |
|
13235 } |
|
13236 |
|
13237 |
|
13238 ERROR; |
|
13239 } |
|
13240 |
|
13241 }/*function_int_to_ulint*/ |
|
13242 break; |
|
13243 |
|
13244 /**** |
|
13245 *INT_TO_BOOL |
|
13246 */ |
|
13247 case function_int_to_bool : |
|
13248 { |
|
13249 symbol_c *last_type_symbol = NULL; |
|
13250 |
|
13251 { |
|
13252 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13253 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13254 symbol_c *IN_param_value = &this->default_variable_name; |
|
13255 |
|
13256 symbol_c *IN_type_symbol = param_data_type; |
|
13257 last_type_symbol = param_data_type; |
|
13258 |
|
13259 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13260 { |
|
13261 |
|
13262 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
13263 |
|
13264 if (IN_type_symbol == NULL) |
|
13265 IN_type_symbol = last_type_symbol; |
|
13266 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13267 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
13268 function_type_prefix = return_type_symbol; |
|
13269 function_type_suffix = IN_type_symbol; |
|
13270 break; |
|
13271 |
|
13272 } |
|
13273 |
|
13274 |
|
13275 ERROR; |
|
13276 } |
|
13277 |
|
13278 }/*function_int_to_bool*/ |
|
13279 break; |
|
13280 |
|
13281 /**** |
|
13282 *INT_TO_TIME |
|
13283 */ |
|
13284 case function_int_to_time : |
|
13285 { |
|
13286 symbol_c *last_type_symbol = NULL; |
|
13287 |
|
13288 { |
|
13289 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13291 symbol_c *IN_param_value = &this->default_variable_name; |
|
13292 |
|
13293 symbol_c *IN_type_symbol = param_data_type; |
|
13294 last_type_symbol = param_data_type; |
|
13295 |
|
13296 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
13297 { |
|
13298 |
|
13299 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13300 |
|
13301 if (IN_type_symbol == NULL) |
|
13302 IN_type_symbol = last_type_symbol; |
|
13303 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
13304 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
13305 function_type_prefix = return_type_symbol; |
|
13306 break; |
|
13307 |
|
13308 } |
|
13309 |
|
13310 |
|
13311 ERROR; |
|
13312 } |
|
13313 |
|
13314 }/*function_int_to_time*/ |
|
13315 break; |
|
13316 |
|
13317 /**** |
|
13318 *TRUNC |
|
13319 */ |
|
13320 case function_trunc : |
|
13321 { |
|
13322 symbol_c *last_type_symbol = NULL; |
|
13323 |
|
13324 { |
|
13325 symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); |
|
13326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
13327 symbol_c *IN_param_value = &this->default_variable_name; |
|
13328 |
|
13329 symbol_c *IN_type_symbol = param_data_type; |
|
13330 last_type_symbol = param_data_type; |
|
13331 |
|
13332 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13332 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13333 { |
13333 { |
13334 |
13334 |
|
13335 function_name = (symbol_c*)(new pragma_c("__move_")); |
13335 |
13336 |
13336 if (IN_type_symbol == NULL) |
13337 if (IN_type_symbol == NULL) |
13337 IN_type_symbol = last_type_symbol; |
13338 IN_type_symbol = last_type_symbol; |
13338 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13339 ADD_PARAM_LIST(IN_param_name, IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13339 symbol_c * return_type_symbol = &search_constant_type_c::integer; |
13340 symbol_c * return_type_symbol = &search_constant_type_c::integer; |