19 * |
19 * |
20 * Based on the |
20 * Based on the |
21 * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
21 * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
22 * |
22 * |
23 */ |
23 */ |
|
24 |
|
25 /**** |
|
26 * IEC 61131-3 standard function library |
|
27 * generated code, do not edit by hand |
|
28 */ |
24 |
29 |
25 |
30 |
26 /**** |
|
27 * IEC 61131-3 standard function lib |
|
28 * generated code, do not edit by hand |
|
29 */ |
|
30 switch(current_function_type){ |
31 switch(current_function_type){ |
31 |
32 |
32 /**** |
33 /**** |
|
34 *REAL_TO_SINT |
|
35 */ |
|
36 case function_real_to_sint : |
|
37 { |
|
38 symbol_c *last_type_symbol = NULL; |
|
39 |
|
40 { |
|
41 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
42 symbol_c *IN_param_value = &this->default_variable_name; |
|
43 |
|
44 symbol_c *IN_type_symbol = param_data_type; |
|
45 last_type_symbol = param_data_type; |
|
46 |
|
47 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
48 { |
|
49 |
|
50 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
51 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
52 function_type_prefix = return_type_symbol; |
|
53 break; |
|
54 |
|
55 } |
|
56 |
|
57 |
|
58 ERROR; |
|
59 } |
|
60 |
|
61 }/*function_real_to_sint*/ |
|
62 break; |
|
63 |
|
64 /**** |
|
65 *REAL_TO_LINT |
|
66 */ |
|
67 case function_real_to_lint : |
|
68 { |
|
69 symbol_c *last_type_symbol = NULL; |
|
70 |
|
71 { |
|
72 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
73 symbol_c *IN_param_value = &this->default_variable_name; |
|
74 |
|
75 symbol_c *IN_type_symbol = param_data_type; |
|
76 last_type_symbol = param_data_type; |
|
77 |
|
78 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
79 { |
|
80 |
|
81 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
82 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
83 function_type_prefix = return_type_symbol; |
|
84 break; |
|
85 |
|
86 } |
|
87 |
|
88 |
|
89 ERROR; |
|
90 } |
|
91 |
|
92 }/*function_real_to_lint*/ |
|
93 break; |
|
94 |
|
95 /**** |
|
96 *REAL_TO_DINT |
|
97 */ |
|
98 case function_real_to_dint : |
|
99 { |
|
100 symbol_c *last_type_symbol = NULL; |
|
101 |
|
102 { |
|
103 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
104 symbol_c *IN_param_value = &this->default_variable_name; |
|
105 |
|
106 symbol_c *IN_type_symbol = param_data_type; |
|
107 last_type_symbol = param_data_type; |
|
108 |
|
109 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
110 { |
|
111 |
|
112 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
113 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
114 function_type_prefix = return_type_symbol; |
|
115 break; |
|
116 |
|
117 } |
|
118 |
|
119 |
|
120 ERROR; |
|
121 } |
|
122 |
|
123 }/*function_real_to_dint*/ |
|
124 break; |
|
125 |
|
126 /**** |
|
127 *REAL_TO_DATE |
|
128 */ |
|
129 case function_real_to_date : |
|
130 { |
|
131 symbol_c *last_type_symbol = NULL; |
|
132 |
|
133 { |
|
134 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
135 symbol_c *IN_param_value = &this->default_variable_name; |
|
136 |
|
137 symbol_c *IN_type_symbol = param_data_type; |
|
138 last_type_symbol = param_data_type; |
|
139 |
|
140 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
141 { |
|
142 |
|
143 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
144 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
145 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
146 function_type_prefix = return_type_symbol; |
|
147 break; |
|
148 |
|
149 } |
|
150 |
|
151 |
|
152 ERROR; |
|
153 } |
|
154 |
|
155 }/*function_real_to_date*/ |
|
156 break; |
|
157 |
|
158 /**** |
|
159 *REAL_TO_DWORD |
|
160 */ |
|
161 case function_real_to_dword : |
|
162 { |
|
163 symbol_c *last_type_symbol = NULL; |
|
164 |
|
165 { |
|
166 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
167 symbol_c *IN_param_value = &this->default_variable_name; |
|
168 |
|
169 symbol_c *IN_type_symbol = param_data_type; |
|
170 last_type_symbol = param_data_type; |
|
171 |
|
172 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
173 { |
|
174 |
|
175 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
176 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
177 function_type_prefix = return_type_symbol; |
|
178 break; |
|
179 |
|
180 } |
|
181 |
|
182 |
|
183 ERROR; |
|
184 } |
|
185 |
|
186 }/*function_real_to_dword*/ |
|
187 break; |
|
188 |
|
189 /**** |
|
190 *REAL_TO_DT |
|
191 */ |
|
192 case function_real_to_dt : |
|
193 { |
|
194 symbol_c *last_type_symbol = NULL; |
|
195 |
|
196 { |
|
197 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
198 symbol_c *IN_param_value = &this->default_variable_name; |
|
199 |
|
200 symbol_c *IN_type_symbol = param_data_type; |
|
201 last_type_symbol = param_data_type; |
|
202 |
|
203 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
204 { |
|
205 |
|
206 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
207 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
208 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
209 function_type_prefix = return_type_symbol; |
|
210 break; |
|
211 |
|
212 } |
|
213 |
|
214 |
|
215 ERROR; |
|
216 } |
|
217 |
|
218 }/*function_real_to_dt*/ |
|
219 break; |
|
220 |
|
221 /**** |
|
222 *REAL_TO_TOD |
|
223 */ |
|
224 case function_real_to_tod : |
|
225 { |
|
226 symbol_c *last_type_symbol = NULL; |
|
227 |
|
228 { |
|
229 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
230 symbol_c *IN_param_value = &this->default_variable_name; |
|
231 |
|
232 symbol_c *IN_type_symbol = param_data_type; |
|
233 last_type_symbol = param_data_type; |
|
234 |
|
235 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
236 { |
|
237 |
|
238 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
239 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
240 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
241 function_type_prefix = return_type_symbol; |
|
242 break; |
|
243 |
|
244 } |
|
245 |
|
246 |
|
247 ERROR; |
|
248 } |
|
249 |
|
250 }/*function_real_to_tod*/ |
|
251 break; |
|
252 |
|
253 /**** |
|
254 *REAL_TO_UDINT |
|
255 */ |
|
256 case function_real_to_udint : |
|
257 { |
|
258 symbol_c *last_type_symbol = NULL; |
|
259 |
|
260 { |
|
261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
262 symbol_c *IN_param_value = &this->default_variable_name; |
|
263 |
|
264 symbol_c *IN_type_symbol = param_data_type; |
|
265 last_type_symbol = param_data_type; |
|
266 |
|
267 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
268 { |
|
269 |
|
270 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
271 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
272 function_type_prefix = return_type_symbol; |
|
273 break; |
|
274 |
|
275 } |
|
276 |
|
277 |
|
278 ERROR; |
|
279 } |
|
280 |
|
281 }/*function_real_to_udint*/ |
|
282 break; |
|
283 |
|
284 /**** |
|
285 *REAL_TO_WORD |
|
286 */ |
|
287 case function_real_to_word : |
|
288 { |
|
289 symbol_c *last_type_symbol = NULL; |
|
290 |
|
291 { |
|
292 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
293 symbol_c *IN_param_value = &this->default_variable_name; |
|
294 |
|
295 symbol_c *IN_type_symbol = param_data_type; |
|
296 last_type_symbol = param_data_type; |
|
297 |
|
298 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
299 { |
|
300 |
|
301 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
302 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
303 function_type_prefix = return_type_symbol; |
|
304 break; |
|
305 |
|
306 } |
|
307 |
|
308 |
|
309 ERROR; |
|
310 } |
|
311 |
|
312 }/*function_real_to_word*/ |
|
313 break; |
|
314 |
|
315 /**** |
|
316 *REAL_TO_STRING |
|
317 */ |
|
318 case function_real_to_string : |
|
319 { |
|
320 symbol_c *last_type_symbol = NULL; |
|
321 |
|
322 { |
|
323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
324 symbol_c *IN_param_value = &this->default_variable_name; |
|
325 |
|
326 symbol_c *IN_type_symbol = param_data_type; |
|
327 last_type_symbol = param_data_type; |
|
328 |
|
329 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
330 { |
|
331 |
|
332 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
333 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
334 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
335 function_type_prefix = return_type_symbol; |
|
336 break; |
|
337 |
|
338 } |
|
339 |
|
340 |
|
341 ERROR; |
|
342 } |
|
343 |
|
344 }/*function_real_to_string*/ |
|
345 break; |
|
346 |
|
347 /**** |
|
348 *REAL_TO_LWORD |
|
349 */ |
|
350 case function_real_to_lword : |
|
351 { |
|
352 symbol_c *last_type_symbol = NULL; |
|
353 |
|
354 { |
|
355 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
356 symbol_c *IN_param_value = &this->default_variable_name; |
|
357 |
|
358 symbol_c *IN_type_symbol = param_data_type; |
|
359 last_type_symbol = param_data_type; |
|
360 |
|
361 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
362 { |
|
363 |
|
364 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
365 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
366 function_type_prefix = return_type_symbol; |
|
367 break; |
|
368 |
|
369 } |
|
370 |
|
371 |
|
372 ERROR; |
|
373 } |
|
374 |
|
375 }/*function_real_to_lword*/ |
|
376 break; |
|
377 |
|
378 /**** |
|
379 *REAL_TO_UINT |
|
380 */ |
|
381 case function_real_to_uint : |
|
382 { |
|
383 symbol_c *last_type_symbol = NULL; |
|
384 |
|
385 { |
|
386 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
387 symbol_c *IN_param_value = &this->default_variable_name; |
|
388 |
|
389 symbol_c *IN_type_symbol = param_data_type; |
|
390 last_type_symbol = param_data_type; |
|
391 |
|
392 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
393 { |
|
394 |
|
395 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
396 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
397 function_type_prefix = return_type_symbol; |
|
398 break; |
|
399 |
|
400 } |
|
401 |
|
402 |
|
403 ERROR; |
|
404 } |
|
405 |
|
406 }/*function_real_to_uint*/ |
|
407 break; |
|
408 |
|
409 /**** |
|
410 *REAL_TO_LREAL |
|
411 */ |
|
412 case function_real_to_lreal : |
|
413 { |
|
414 symbol_c *last_type_symbol = NULL; |
|
415 |
|
416 { |
|
417 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
418 symbol_c *IN_param_value = &this->default_variable_name; |
|
419 |
|
420 symbol_c *IN_type_symbol = param_data_type; |
|
421 last_type_symbol = param_data_type; |
|
422 |
|
423 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
424 { |
|
425 |
|
426 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
427 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
428 function_type_prefix = return_type_symbol; |
|
429 break; |
|
430 |
|
431 } |
|
432 |
|
433 |
|
434 ERROR; |
|
435 } |
|
436 |
|
437 }/*function_real_to_lreal*/ |
|
438 break; |
|
439 |
|
440 /**** |
|
441 *REAL_TO_BYTE |
|
442 */ |
|
443 case function_real_to_byte : |
|
444 { |
|
445 symbol_c *last_type_symbol = NULL; |
|
446 |
|
447 { |
|
448 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
449 symbol_c *IN_param_value = &this->default_variable_name; |
|
450 |
|
451 symbol_c *IN_type_symbol = param_data_type; |
|
452 last_type_symbol = param_data_type; |
|
453 |
|
454 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
455 { |
|
456 |
|
457 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
458 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
459 function_type_prefix = return_type_symbol; |
|
460 break; |
|
461 |
|
462 } |
|
463 |
|
464 |
|
465 ERROR; |
|
466 } |
|
467 |
|
468 }/*function_real_to_byte*/ |
|
469 break; |
|
470 |
|
471 /**** |
|
472 *REAL_TO_USINT |
|
473 */ |
|
474 case function_real_to_usint : |
|
475 { |
|
476 symbol_c *last_type_symbol = NULL; |
|
477 |
|
478 { |
|
479 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
480 symbol_c *IN_param_value = &this->default_variable_name; |
|
481 |
|
482 symbol_c *IN_type_symbol = param_data_type; |
|
483 last_type_symbol = param_data_type; |
|
484 |
|
485 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
486 { |
|
487 |
|
488 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
489 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
490 function_type_prefix = return_type_symbol; |
|
491 break; |
|
492 |
|
493 } |
|
494 |
|
495 |
|
496 ERROR; |
|
497 } |
|
498 |
|
499 }/*function_real_to_usint*/ |
|
500 break; |
|
501 |
|
502 /**** |
|
503 *REAL_TO_ULINT |
|
504 */ |
|
505 case function_real_to_ulint : |
|
506 { |
|
507 symbol_c *last_type_symbol = NULL; |
|
508 |
|
509 { |
|
510 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
511 symbol_c *IN_param_value = &this->default_variable_name; |
|
512 |
|
513 symbol_c *IN_type_symbol = param_data_type; |
|
514 last_type_symbol = param_data_type; |
|
515 |
|
516 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
517 { |
|
518 |
|
519 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
520 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
521 function_type_prefix = return_type_symbol; |
|
522 break; |
|
523 |
|
524 } |
|
525 |
|
526 |
|
527 ERROR; |
|
528 } |
|
529 |
|
530 }/*function_real_to_ulint*/ |
|
531 break; |
|
532 |
|
533 /**** |
|
534 *REAL_TO_BOOL |
|
535 */ |
|
536 case function_real_to_bool : |
|
537 { |
|
538 symbol_c *last_type_symbol = NULL; |
|
539 |
|
540 { |
|
541 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
542 symbol_c *IN_param_value = &this->default_variable_name; |
|
543 |
|
544 symbol_c *IN_type_symbol = param_data_type; |
|
545 last_type_symbol = param_data_type; |
|
546 |
|
547 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
548 { |
|
549 |
|
550 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
551 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
552 function_type_prefix = return_type_symbol; |
|
553 break; |
|
554 |
|
555 } |
|
556 |
|
557 |
|
558 ERROR; |
|
559 } |
|
560 |
|
561 }/*function_real_to_bool*/ |
|
562 break; |
|
563 |
|
564 /**** |
|
565 *REAL_TO_TIME |
|
566 */ |
|
567 case function_real_to_time : |
|
568 { |
|
569 symbol_c *last_type_symbol = NULL; |
|
570 |
|
571 { |
|
572 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
573 symbol_c *IN_param_value = &this->default_variable_name; |
|
574 |
|
575 symbol_c *IN_type_symbol = param_data_type; |
|
576 last_type_symbol = param_data_type; |
|
577 |
|
578 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
579 { |
|
580 |
|
581 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
582 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
583 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
584 function_type_prefix = return_type_symbol; |
|
585 break; |
|
586 |
|
587 } |
|
588 |
|
589 |
|
590 ERROR; |
|
591 } |
|
592 |
|
593 }/*function_real_to_time*/ |
|
594 break; |
|
595 |
|
596 /**** |
|
597 *REAL_TO_INT |
|
598 */ |
|
599 case function_real_to_int : |
|
600 { |
|
601 symbol_c *last_type_symbol = NULL; |
|
602 |
|
603 { |
|
604 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
605 symbol_c *IN_param_value = &this->default_variable_name; |
|
606 |
|
607 symbol_c *IN_type_symbol = param_data_type; |
|
608 last_type_symbol = param_data_type; |
|
609 |
|
610 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
611 { |
|
612 |
|
613 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
614 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
615 function_type_prefix = return_type_symbol; |
|
616 break; |
|
617 |
|
618 } |
|
619 |
|
620 |
|
621 ERROR; |
|
622 } |
|
623 |
|
624 }/*function_real_to_int*/ |
|
625 break; |
|
626 |
|
627 /**** |
|
628 *SINT_TO_REAL |
|
629 */ |
|
630 case function_sint_to_real : |
|
631 { |
|
632 symbol_c *last_type_symbol = NULL; |
|
633 |
|
634 { |
|
635 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
636 symbol_c *IN_param_value = &this->default_variable_name; |
|
637 |
|
638 symbol_c *IN_type_symbol = param_data_type; |
|
639 last_type_symbol = param_data_type; |
|
640 |
|
641 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
642 { |
|
643 |
|
644 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
645 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
646 function_type_prefix = return_type_symbol; |
|
647 break; |
|
648 |
|
649 } |
|
650 |
|
651 |
|
652 ERROR; |
|
653 } |
|
654 |
|
655 }/*function_sint_to_real*/ |
|
656 break; |
|
657 |
|
658 /**** |
|
659 *SINT_TO_LINT |
|
660 */ |
|
661 case function_sint_to_lint : |
|
662 { |
|
663 symbol_c *last_type_symbol = NULL; |
|
664 |
|
665 { |
|
666 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
667 symbol_c *IN_param_value = &this->default_variable_name; |
|
668 |
|
669 symbol_c *IN_type_symbol = param_data_type; |
|
670 last_type_symbol = param_data_type; |
|
671 |
|
672 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
673 { |
|
674 |
|
675 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
676 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
677 function_type_prefix = return_type_symbol; |
|
678 break; |
|
679 |
|
680 } |
|
681 |
|
682 |
|
683 ERROR; |
|
684 } |
|
685 |
|
686 }/*function_sint_to_lint*/ |
|
687 break; |
|
688 |
|
689 /**** |
|
690 *SINT_TO_DINT |
|
691 */ |
|
692 case function_sint_to_dint : |
|
693 { |
|
694 symbol_c *last_type_symbol = NULL; |
|
695 |
|
696 { |
|
697 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
698 symbol_c *IN_param_value = &this->default_variable_name; |
|
699 |
|
700 symbol_c *IN_type_symbol = param_data_type; |
|
701 last_type_symbol = param_data_type; |
|
702 |
|
703 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
704 { |
|
705 |
|
706 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
707 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
708 function_type_prefix = return_type_symbol; |
|
709 break; |
|
710 |
|
711 } |
|
712 |
|
713 |
|
714 ERROR; |
|
715 } |
|
716 |
|
717 }/*function_sint_to_dint*/ |
|
718 break; |
|
719 |
|
720 /**** |
|
721 *SINT_TO_DATE |
|
722 */ |
|
723 case function_sint_to_date : |
|
724 { |
|
725 symbol_c *last_type_symbol = NULL; |
|
726 |
|
727 { |
|
728 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
729 symbol_c *IN_param_value = &this->default_variable_name; |
|
730 |
|
731 symbol_c *IN_type_symbol = param_data_type; |
|
732 last_type_symbol = param_data_type; |
|
733 |
|
734 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
735 { |
|
736 |
|
737 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
738 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
739 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
740 function_type_prefix = return_type_symbol; |
|
741 break; |
|
742 |
|
743 } |
|
744 |
|
745 |
|
746 ERROR; |
|
747 } |
|
748 |
|
749 }/*function_sint_to_date*/ |
|
750 break; |
|
751 |
|
752 /**** |
|
753 *SINT_TO_DWORD |
|
754 */ |
|
755 case function_sint_to_dword : |
|
756 { |
|
757 symbol_c *last_type_symbol = NULL; |
|
758 |
|
759 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
767 { |
|
768 |
|
769 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
770 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
771 function_type_prefix = return_type_symbol; |
|
772 break; |
|
773 |
|
774 } |
|
775 |
|
776 |
|
777 ERROR; |
|
778 } |
|
779 |
|
780 }/*function_sint_to_dword*/ |
|
781 break; |
|
782 |
|
783 /**** |
|
784 *SINT_TO_DT |
|
785 */ |
|
786 case function_sint_to_dt : |
|
787 { |
|
788 symbol_c *last_type_symbol = NULL; |
|
789 |
|
790 { |
|
791 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
792 symbol_c *IN_param_value = &this->default_variable_name; |
|
793 |
|
794 symbol_c *IN_type_symbol = param_data_type; |
|
795 last_type_symbol = param_data_type; |
|
796 |
|
797 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
798 { |
|
799 |
|
800 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
801 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
802 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
803 function_type_prefix = return_type_symbol; |
|
804 break; |
|
805 |
|
806 } |
|
807 |
|
808 |
|
809 ERROR; |
|
810 } |
|
811 |
|
812 }/*function_sint_to_dt*/ |
|
813 break; |
|
814 |
|
815 /**** |
|
816 *SINT_TO_TOD |
|
817 */ |
|
818 case function_sint_to_tod : |
|
819 { |
|
820 symbol_c *last_type_symbol = NULL; |
|
821 |
|
822 { |
|
823 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
824 symbol_c *IN_param_value = &this->default_variable_name; |
|
825 |
|
826 symbol_c *IN_type_symbol = param_data_type; |
|
827 last_type_symbol = param_data_type; |
|
828 |
|
829 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
830 { |
|
831 |
|
832 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
833 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
834 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
835 function_type_prefix = return_type_symbol; |
|
836 break; |
|
837 |
|
838 } |
|
839 |
|
840 |
|
841 ERROR; |
|
842 } |
|
843 |
|
844 }/*function_sint_to_tod*/ |
|
845 break; |
|
846 |
|
847 /**** |
|
848 *SINT_TO_UDINT |
|
849 */ |
|
850 case function_sint_to_udint : |
|
851 { |
|
852 symbol_c *last_type_symbol = NULL; |
|
853 |
|
854 { |
|
855 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
856 symbol_c *IN_param_value = &this->default_variable_name; |
|
857 |
|
858 symbol_c *IN_type_symbol = param_data_type; |
|
859 last_type_symbol = param_data_type; |
|
860 |
|
861 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
862 { |
|
863 |
|
864 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
865 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
866 function_type_prefix = return_type_symbol; |
|
867 break; |
|
868 |
|
869 } |
|
870 |
|
871 |
|
872 ERROR; |
|
873 } |
|
874 |
|
875 }/*function_sint_to_udint*/ |
|
876 break; |
|
877 |
|
878 /**** |
|
879 *SINT_TO_WORD |
|
880 */ |
|
881 case function_sint_to_word : |
|
882 { |
|
883 symbol_c *last_type_symbol = NULL; |
|
884 |
|
885 { |
|
886 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
887 symbol_c *IN_param_value = &this->default_variable_name; |
|
888 |
|
889 symbol_c *IN_type_symbol = param_data_type; |
|
890 last_type_symbol = param_data_type; |
|
891 |
|
892 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
893 { |
|
894 |
|
895 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
896 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
897 function_type_prefix = return_type_symbol; |
|
898 break; |
|
899 |
|
900 } |
|
901 |
|
902 |
|
903 ERROR; |
|
904 } |
|
905 |
|
906 }/*function_sint_to_word*/ |
|
907 break; |
|
908 |
|
909 /**** |
|
910 *SINT_TO_STRING |
|
911 */ |
|
912 case function_sint_to_string : |
|
913 { |
|
914 symbol_c *last_type_symbol = NULL; |
|
915 |
|
916 { |
|
917 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
918 symbol_c *IN_param_value = &this->default_variable_name; |
|
919 |
|
920 symbol_c *IN_type_symbol = param_data_type; |
|
921 last_type_symbol = param_data_type; |
|
922 |
|
923 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
924 { |
|
925 |
|
926 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
927 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
928 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
929 function_type_prefix = return_type_symbol; |
|
930 break; |
|
931 |
|
932 } |
|
933 |
|
934 |
|
935 ERROR; |
|
936 } |
|
937 |
|
938 }/*function_sint_to_string*/ |
|
939 break; |
|
940 |
|
941 /**** |
|
942 *SINT_TO_LWORD |
|
943 */ |
|
944 case function_sint_to_lword : |
|
945 { |
|
946 symbol_c *last_type_symbol = NULL; |
|
947 |
|
948 { |
|
949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
950 symbol_c *IN_param_value = &this->default_variable_name; |
|
951 |
|
952 symbol_c *IN_type_symbol = param_data_type; |
|
953 last_type_symbol = param_data_type; |
|
954 |
|
955 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
956 { |
|
957 |
|
958 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
959 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
960 function_type_prefix = return_type_symbol; |
|
961 break; |
|
962 |
|
963 } |
|
964 |
|
965 |
|
966 ERROR; |
|
967 } |
|
968 |
|
969 }/*function_sint_to_lword*/ |
|
970 break; |
|
971 |
|
972 /**** |
|
973 *SINT_TO_UINT |
|
974 */ |
|
975 case function_sint_to_uint : |
|
976 { |
|
977 symbol_c *last_type_symbol = NULL; |
|
978 |
|
979 { |
|
980 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
981 symbol_c *IN_param_value = &this->default_variable_name; |
|
982 |
|
983 symbol_c *IN_type_symbol = param_data_type; |
|
984 last_type_symbol = param_data_type; |
|
985 |
|
986 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
987 { |
|
988 |
|
989 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
990 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
991 function_type_prefix = return_type_symbol; |
|
992 break; |
|
993 |
|
994 } |
|
995 |
|
996 |
|
997 ERROR; |
|
998 } |
|
999 |
|
1000 }/*function_sint_to_uint*/ |
|
1001 break; |
|
1002 |
|
1003 /**** |
|
1004 *SINT_TO_LREAL |
|
1005 */ |
|
1006 case function_sint_to_lreal : |
|
1007 { |
|
1008 symbol_c *last_type_symbol = NULL; |
|
1009 |
|
1010 { |
|
1011 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1012 symbol_c *IN_param_value = &this->default_variable_name; |
|
1013 |
|
1014 symbol_c *IN_type_symbol = param_data_type; |
|
1015 last_type_symbol = param_data_type; |
|
1016 |
|
1017 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1018 { |
|
1019 |
|
1020 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1021 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1022 function_type_prefix = return_type_symbol; |
|
1023 break; |
|
1024 |
|
1025 } |
|
1026 |
|
1027 |
|
1028 ERROR; |
|
1029 } |
|
1030 |
|
1031 }/*function_sint_to_lreal*/ |
|
1032 break; |
|
1033 |
|
1034 /**** |
|
1035 *SINT_TO_BYTE |
|
1036 */ |
|
1037 case function_sint_to_byte : |
|
1038 { |
|
1039 symbol_c *last_type_symbol = NULL; |
|
1040 |
|
1041 { |
|
1042 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1043 symbol_c *IN_param_value = &this->default_variable_name; |
|
1044 |
|
1045 symbol_c *IN_type_symbol = param_data_type; |
|
1046 last_type_symbol = param_data_type; |
|
1047 |
|
1048 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1049 { |
|
1050 |
|
1051 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1052 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1053 function_type_prefix = return_type_symbol; |
|
1054 break; |
|
1055 |
|
1056 } |
|
1057 |
|
1058 |
|
1059 ERROR; |
|
1060 } |
|
1061 |
|
1062 }/*function_sint_to_byte*/ |
|
1063 break; |
|
1064 |
|
1065 /**** |
|
1066 *SINT_TO_USINT |
|
1067 */ |
|
1068 case function_sint_to_usint : |
|
1069 { |
|
1070 symbol_c *last_type_symbol = NULL; |
|
1071 |
|
1072 { |
|
1073 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1074 symbol_c *IN_param_value = &this->default_variable_name; |
|
1075 |
|
1076 symbol_c *IN_type_symbol = param_data_type; |
|
1077 last_type_symbol = param_data_type; |
|
1078 |
|
1079 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1080 { |
|
1081 |
|
1082 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1083 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1084 function_type_prefix = return_type_symbol; |
|
1085 break; |
|
1086 |
|
1087 } |
|
1088 |
|
1089 |
|
1090 ERROR; |
|
1091 } |
|
1092 |
|
1093 }/*function_sint_to_usint*/ |
|
1094 break; |
|
1095 |
|
1096 /**** |
|
1097 *SINT_TO_ULINT |
|
1098 */ |
|
1099 case function_sint_to_ulint : |
|
1100 { |
|
1101 symbol_c *last_type_symbol = NULL; |
|
1102 |
|
1103 { |
|
1104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1105 symbol_c *IN_param_value = &this->default_variable_name; |
|
1106 |
|
1107 symbol_c *IN_type_symbol = param_data_type; |
|
1108 last_type_symbol = param_data_type; |
|
1109 |
|
1110 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1111 { |
|
1112 |
|
1113 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1114 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1115 function_type_prefix = return_type_symbol; |
|
1116 break; |
|
1117 |
|
1118 } |
|
1119 |
|
1120 |
|
1121 ERROR; |
|
1122 } |
|
1123 |
|
1124 }/*function_sint_to_ulint*/ |
|
1125 break; |
|
1126 |
|
1127 /**** |
|
1128 *SINT_TO_BOOL |
|
1129 */ |
|
1130 case function_sint_to_bool : |
|
1131 { |
|
1132 symbol_c *last_type_symbol = NULL; |
|
1133 |
|
1134 { |
|
1135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1136 symbol_c *IN_param_value = &this->default_variable_name; |
|
1137 |
|
1138 symbol_c *IN_type_symbol = param_data_type; |
|
1139 last_type_symbol = param_data_type; |
|
1140 |
|
1141 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1142 { |
|
1143 |
|
1144 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1145 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1146 function_type_prefix = return_type_symbol; |
|
1147 break; |
|
1148 |
|
1149 } |
|
1150 |
|
1151 |
|
1152 ERROR; |
|
1153 } |
|
1154 |
|
1155 }/*function_sint_to_bool*/ |
|
1156 break; |
|
1157 |
|
1158 /**** |
|
1159 *SINT_TO_TIME |
|
1160 */ |
|
1161 case function_sint_to_time : |
|
1162 { |
|
1163 symbol_c *last_type_symbol = NULL; |
|
1164 |
|
1165 { |
|
1166 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1167 symbol_c *IN_param_value = &this->default_variable_name; |
|
1168 |
|
1169 symbol_c *IN_type_symbol = param_data_type; |
|
1170 last_type_symbol = param_data_type; |
|
1171 |
|
1172 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1173 { |
|
1174 |
|
1175 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1176 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1177 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1178 function_type_prefix = return_type_symbol; |
|
1179 break; |
|
1180 |
|
1181 } |
|
1182 |
|
1183 |
|
1184 ERROR; |
|
1185 } |
|
1186 |
|
1187 }/*function_sint_to_time*/ |
|
1188 break; |
|
1189 |
|
1190 /**** |
|
1191 *SINT_TO_INT |
|
1192 */ |
|
1193 case function_sint_to_int : |
|
1194 { |
|
1195 symbol_c *last_type_symbol = NULL; |
|
1196 |
|
1197 { |
|
1198 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1199 symbol_c *IN_param_value = &this->default_variable_name; |
|
1200 |
|
1201 symbol_c *IN_type_symbol = param_data_type; |
|
1202 last_type_symbol = param_data_type; |
|
1203 |
|
1204 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1205 { |
|
1206 |
|
1207 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1208 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
1209 function_type_prefix = return_type_symbol; |
|
1210 break; |
|
1211 |
|
1212 } |
|
1213 |
|
1214 |
|
1215 ERROR; |
|
1216 } |
|
1217 |
|
1218 }/*function_sint_to_int*/ |
|
1219 break; |
|
1220 |
|
1221 /**** |
|
1222 *LINT_TO_REAL |
|
1223 */ |
|
1224 case function_lint_to_real : |
|
1225 { |
|
1226 symbol_c *last_type_symbol = NULL; |
|
1227 |
|
1228 { |
|
1229 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1230 symbol_c *IN_param_value = &this->default_variable_name; |
|
1231 |
|
1232 symbol_c *IN_type_symbol = param_data_type; |
|
1233 last_type_symbol = param_data_type; |
|
1234 |
|
1235 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1236 { |
|
1237 |
|
1238 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1239 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
1240 function_type_prefix = return_type_symbol; |
|
1241 break; |
|
1242 |
|
1243 } |
|
1244 |
|
1245 |
|
1246 ERROR; |
|
1247 } |
|
1248 |
|
1249 }/*function_lint_to_real*/ |
|
1250 break; |
|
1251 |
|
1252 /**** |
|
1253 *LINT_TO_SINT |
|
1254 */ |
|
1255 case function_lint_to_sint : |
|
1256 { |
|
1257 symbol_c *last_type_symbol = NULL; |
|
1258 |
|
1259 { |
|
1260 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1261 symbol_c *IN_param_value = &this->default_variable_name; |
|
1262 |
|
1263 symbol_c *IN_type_symbol = param_data_type; |
|
1264 last_type_symbol = param_data_type; |
|
1265 |
|
1266 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1267 { |
|
1268 |
|
1269 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1270 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1271 function_type_prefix = return_type_symbol; |
|
1272 break; |
|
1273 |
|
1274 } |
|
1275 |
|
1276 |
|
1277 ERROR; |
|
1278 } |
|
1279 |
|
1280 }/*function_lint_to_sint*/ |
|
1281 break; |
|
1282 |
|
1283 /**** |
|
1284 *LINT_TO_DINT |
|
1285 */ |
|
1286 case function_lint_to_dint : |
|
1287 { |
|
1288 symbol_c *last_type_symbol = NULL; |
|
1289 |
|
1290 { |
|
1291 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1292 symbol_c *IN_param_value = &this->default_variable_name; |
|
1293 |
|
1294 symbol_c *IN_type_symbol = param_data_type; |
|
1295 last_type_symbol = param_data_type; |
|
1296 |
|
1297 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1298 { |
|
1299 |
|
1300 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1301 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
1302 function_type_prefix = return_type_symbol; |
|
1303 break; |
|
1304 |
|
1305 } |
|
1306 |
|
1307 |
|
1308 ERROR; |
|
1309 } |
|
1310 |
|
1311 }/*function_lint_to_dint*/ |
|
1312 break; |
|
1313 |
|
1314 /**** |
|
1315 *LINT_TO_DATE |
|
1316 */ |
|
1317 case function_lint_to_date : |
|
1318 { |
|
1319 symbol_c *last_type_symbol = NULL; |
|
1320 |
|
1321 { |
|
1322 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1323 symbol_c *IN_param_value = &this->default_variable_name; |
|
1324 |
|
1325 symbol_c *IN_type_symbol = param_data_type; |
|
1326 last_type_symbol = param_data_type; |
|
1327 |
|
1328 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1329 { |
|
1330 |
|
1331 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1332 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1333 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1334 function_type_prefix = return_type_symbol; |
|
1335 break; |
|
1336 |
|
1337 } |
|
1338 |
|
1339 |
|
1340 ERROR; |
|
1341 } |
|
1342 |
|
1343 }/*function_lint_to_date*/ |
|
1344 break; |
|
1345 |
|
1346 /**** |
|
1347 *LINT_TO_DWORD |
|
1348 */ |
|
1349 case function_lint_to_dword : |
|
1350 { |
|
1351 symbol_c *last_type_symbol = NULL; |
|
1352 |
|
1353 { |
|
1354 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1355 symbol_c *IN_param_value = &this->default_variable_name; |
|
1356 |
|
1357 symbol_c *IN_type_symbol = param_data_type; |
|
1358 last_type_symbol = param_data_type; |
|
1359 |
|
1360 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1361 { |
|
1362 |
|
1363 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1364 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1365 function_type_prefix = return_type_symbol; |
|
1366 break; |
|
1367 |
|
1368 } |
|
1369 |
|
1370 |
|
1371 ERROR; |
|
1372 } |
|
1373 |
|
1374 }/*function_lint_to_dword*/ |
|
1375 break; |
|
1376 |
|
1377 /**** |
|
1378 *LINT_TO_DT |
|
1379 */ |
|
1380 case function_lint_to_dt : |
|
1381 { |
|
1382 symbol_c *last_type_symbol = NULL; |
|
1383 |
|
1384 { |
|
1385 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1386 symbol_c *IN_param_value = &this->default_variable_name; |
|
1387 |
|
1388 symbol_c *IN_type_symbol = param_data_type; |
|
1389 last_type_symbol = param_data_type; |
|
1390 |
|
1391 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1392 { |
|
1393 |
|
1394 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1395 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1396 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1397 function_type_prefix = return_type_symbol; |
|
1398 break; |
|
1399 |
|
1400 } |
|
1401 |
|
1402 |
|
1403 ERROR; |
|
1404 } |
|
1405 |
|
1406 }/*function_lint_to_dt*/ |
|
1407 break; |
|
1408 |
|
1409 /**** |
|
1410 *LINT_TO_TOD |
|
1411 */ |
|
1412 case function_lint_to_tod : |
|
1413 { |
|
1414 symbol_c *last_type_symbol = NULL; |
|
1415 |
|
1416 { |
|
1417 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1418 symbol_c *IN_param_value = &this->default_variable_name; |
|
1419 |
|
1420 symbol_c *IN_type_symbol = param_data_type; |
|
1421 last_type_symbol = param_data_type; |
|
1422 |
|
1423 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1424 { |
|
1425 |
|
1426 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1427 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1428 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1429 function_type_prefix = return_type_symbol; |
|
1430 break; |
|
1431 |
|
1432 } |
|
1433 |
|
1434 |
|
1435 ERROR; |
|
1436 } |
|
1437 |
|
1438 }/*function_lint_to_tod*/ |
|
1439 break; |
|
1440 |
|
1441 /**** |
|
1442 *LINT_TO_UDINT |
|
1443 */ |
|
1444 case function_lint_to_udint : |
|
1445 { |
|
1446 symbol_c *last_type_symbol = NULL; |
|
1447 |
|
1448 { |
|
1449 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1450 symbol_c *IN_param_value = &this->default_variable_name; |
|
1451 |
|
1452 symbol_c *IN_type_symbol = param_data_type; |
|
1453 last_type_symbol = param_data_type; |
|
1454 |
|
1455 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1456 { |
|
1457 |
|
1458 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1459 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
1460 function_type_prefix = return_type_symbol; |
|
1461 break; |
|
1462 |
|
1463 } |
|
1464 |
|
1465 |
|
1466 ERROR; |
|
1467 } |
|
1468 |
|
1469 }/*function_lint_to_udint*/ |
|
1470 break; |
|
1471 |
|
1472 /**** |
|
1473 *LINT_TO_WORD |
|
1474 */ |
|
1475 case function_lint_to_word : |
|
1476 { |
|
1477 symbol_c *last_type_symbol = NULL; |
|
1478 |
|
1479 { |
|
1480 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1481 symbol_c *IN_param_value = &this->default_variable_name; |
|
1482 |
|
1483 symbol_c *IN_type_symbol = param_data_type; |
|
1484 last_type_symbol = param_data_type; |
|
1485 |
|
1486 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1487 { |
|
1488 |
|
1489 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1490 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1491 function_type_prefix = return_type_symbol; |
|
1492 break; |
|
1493 |
|
1494 } |
|
1495 |
|
1496 |
|
1497 ERROR; |
|
1498 } |
|
1499 |
|
1500 }/*function_lint_to_word*/ |
|
1501 break; |
|
1502 |
|
1503 /**** |
|
1504 *LINT_TO_STRING |
|
1505 */ |
|
1506 case function_lint_to_string : |
|
1507 { |
|
1508 symbol_c *last_type_symbol = NULL; |
|
1509 |
|
1510 { |
|
1511 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1512 symbol_c *IN_param_value = &this->default_variable_name; |
|
1513 |
|
1514 symbol_c *IN_type_symbol = param_data_type; |
|
1515 last_type_symbol = param_data_type; |
|
1516 |
|
1517 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1518 { |
|
1519 |
|
1520 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1521 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1522 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1523 function_type_prefix = return_type_symbol; |
|
1524 break; |
|
1525 |
|
1526 } |
|
1527 |
|
1528 |
|
1529 ERROR; |
|
1530 } |
|
1531 |
|
1532 }/*function_lint_to_string*/ |
|
1533 break; |
|
1534 |
|
1535 /**** |
|
1536 *LINT_TO_LWORD |
|
1537 */ |
|
1538 case function_lint_to_lword : |
|
1539 { |
|
1540 symbol_c *last_type_symbol = NULL; |
|
1541 |
|
1542 { |
|
1543 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1544 symbol_c *IN_param_value = &this->default_variable_name; |
|
1545 |
|
1546 symbol_c *IN_type_symbol = param_data_type; |
|
1547 last_type_symbol = param_data_type; |
|
1548 |
|
1549 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1550 { |
|
1551 |
|
1552 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1553 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1554 function_type_prefix = return_type_symbol; |
|
1555 break; |
|
1556 |
|
1557 } |
|
1558 |
|
1559 |
|
1560 ERROR; |
|
1561 } |
|
1562 |
|
1563 }/*function_lint_to_lword*/ |
|
1564 break; |
|
1565 |
|
1566 /**** |
|
1567 *LINT_TO_UINT |
|
1568 */ |
|
1569 case function_lint_to_uint : |
|
1570 { |
|
1571 symbol_c *last_type_symbol = NULL; |
|
1572 |
|
1573 { |
|
1574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1575 symbol_c *IN_param_value = &this->default_variable_name; |
|
1576 |
|
1577 symbol_c *IN_type_symbol = param_data_type; |
|
1578 last_type_symbol = param_data_type; |
|
1579 |
|
1580 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1581 { |
|
1582 |
|
1583 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1584 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1585 function_type_prefix = return_type_symbol; |
|
1586 break; |
|
1587 |
|
1588 } |
|
1589 |
|
1590 |
|
1591 ERROR; |
|
1592 } |
|
1593 |
|
1594 }/*function_lint_to_uint*/ |
|
1595 break; |
|
1596 |
|
1597 /**** |
|
1598 *LINT_TO_LREAL |
|
1599 */ |
|
1600 case function_lint_to_lreal : |
|
1601 { |
|
1602 symbol_c *last_type_symbol = NULL; |
|
1603 |
|
1604 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1612 { |
|
1613 |
|
1614 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1615 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1616 function_type_prefix = return_type_symbol; |
|
1617 break; |
|
1618 |
|
1619 } |
|
1620 |
|
1621 |
|
1622 ERROR; |
|
1623 } |
|
1624 |
|
1625 }/*function_lint_to_lreal*/ |
|
1626 break; |
|
1627 |
|
1628 /**** |
|
1629 *LINT_TO_BYTE |
|
1630 */ |
|
1631 case function_lint_to_byte : |
|
1632 { |
|
1633 symbol_c *last_type_symbol = NULL; |
|
1634 |
|
1635 { |
|
1636 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1637 symbol_c *IN_param_value = &this->default_variable_name; |
|
1638 |
|
1639 symbol_c *IN_type_symbol = param_data_type; |
|
1640 last_type_symbol = param_data_type; |
|
1641 |
|
1642 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1643 { |
|
1644 |
|
1645 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1646 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1647 function_type_prefix = return_type_symbol; |
|
1648 break; |
|
1649 |
|
1650 } |
|
1651 |
|
1652 |
|
1653 ERROR; |
|
1654 } |
|
1655 |
|
1656 }/*function_lint_to_byte*/ |
|
1657 break; |
|
1658 |
|
1659 /**** |
|
1660 *LINT_TO_USINT |
|
1661 */ |
|
1662 case function_lint_to_usint : |
|
1663 { |
|
1664 symbol_c *last_type_symbol = NULL; |
|
1665 |
|
1666 { |
|
1667 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1668 symbol_c *IN_param_value = &this->default_variable_name; |
|
1669 |
|
1670 symbol_c *IN_type_symbol = param_data_type; |
|
1671 last_type_symbol = param_data_type; |
|
1672 |
|
1673 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1674 { |
|
1675 |
|
1676 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1677 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1678 function_type_prefix = return_type_symbol; |
|
1679 break; |
|
1680 |
|
1681 } |
|
1682 |
|
1683 |
|
1684 ERROR; |
|
1685 } |
|
1686 |
|
1687 }/*function_lint_to_usint*/ |
|
1688 break; |
|
1689 |
|
1690 /**** |
|
1691 *LINT_TO_ULINT |
|
1692 */ |
|
1693 case function_lint_to_ulint : |
|
1694 { |
|
1695 symbol_c *last_type_symbol = NULL; |
|
1696 |
|
1697 { |
|
1698 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1699 symbol_c *IN_param_value = &this->default_variable_name; |
|
1700 |
|
1701 symbol_c *IN_type_symbol = param_data_type; |
|
1702 last_type_symbol = param_data_type; |
|
1703 |
|
1704 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1705 { |
|
1706 |
|
1707 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1708 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1709 function_type_prefix = return_type_symbol; |
|
1710 break; |
|
1711 |
|
1712 } |
|
1713 |
|
1714 |
|
1715 ERROR; |
|
1716 } |
|
1717 |
|
1718 }/*function_lint_to_ulint*/ |
|
1719 break; |
|
1720 |
|
1721 /**** |
|
1722 *LINT_TO_BOOL |
|
1723 */ |
|
1724 case function_lint_to_bool : |
|
1725 { |
|
1726 symbol_c *last_type_symbol = NULL; |
|
1727 |
|
1728 { |
|
1729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1730 symbol_c *IN_param_value = &this->default_variable_name; |
|
1731 |
|
1732 symbol_c *IN_type_symbol = param_data_type; |
|
1733 last_type_symbol = param_data_type; |
|
1734 |
|
1735 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1736 { |
|
1737 |
|
1738 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1739 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1740 function_type_prefix = return_type_symbol; |
|
1741 break; |
|
1742 |
|
1743 } |
|
1744 |
|
1745 |
|
1746 ERROR; |
|
1747 } |
|
1748 |
|
1749 }/*function_lint_to_bool*/ |
|
1750 break; |
|
1751 |
|
1752 /**** |
|
1753 *LINT_TO_TIME |
|
1754 */ |
|
1755 case function_lint_to_time : |
|
1756 { |
|
1757 symbol_c *last_type_symbol = NULL; |
|
1758 |
|
1759 { |
|
1760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1761 symbol_c *IN_param_value = &this->default_variable_name; |
|
1762 |
|
1763 symbol_c *IN_type_symbol = param_data_type; |
|
1764 last_type_symbol = param_data_type; |
|
1765 |
|
1766 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1767 { |
|
1768 |
|
1769 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1770 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1771 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1772 function_type_prefix = return_type_symbol; |
|
1773 break; |
|
1774 |
|
1775 } |
|
1776 |
|
1777 |
|
1778 ERROR; |
|
1779 } |
|
1780 |
|
1781 }/*function_lint_to_time*/ |
|
1782 break; |
|
1783 |
|
1784 /**** |
|
1785 *LINT_TO_INT |
|
1786 */ |
|
1787 case function_lint_to_int : |
|
1788 { |
|
1789 symbol_c *last_type_symbol = NULL; |
|
1790 |
|
1791 { |
|
1792 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1793 symbol_c *IN_param_value = &this->default_variable_name; |
|
1794 |
|
1795 symbol_c *IN_type_symbol = param_data_type; |
|
1796 last_type_symbol = param_data_type; |
|
1797 |
|
1798 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1799 { |
|
1800 |
|
1801 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1802 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
1803 function_type_prefix = return_type_symbol; |
|
1804 break; |
|
1805 |
|
1806 } |
|
1807 |
|
1808 |
|
1809 ERROR; |
|
1810 } |
|
1811 |
|
1812 }/*function_lint_to_int*/ |
|
1813 break; |
|
1814 |
|
1815 /**** |
|
1816 *DINT_TO_REAL |
|
1817 */ |
|
1818 case function_dint_to_real : |
|
1819 { |
|
1820 symbol_c *last_type_symbol = NULL; |
|
1821 |
|
1822 { |
|
1823 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1824 symbol_c *IN_param_value = &this->default_variable_name; |
|
1825 |
|
1826 symbol_c *IN_type_symbol = param_data_type; |
|
1827 last_type_symbol = param_data_type; |
|
1828 |
|
1829 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1830 { |
|
1831 |
|
1832 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1833 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
1834 function_type_prefix = return_type_symbol; |
|
1835 break; |
|
1836 |
|
1837 } |
|
1838 |
|
1839 |
|
1840 ERROR; |
|
1841 } |
|
1842 |
|
1843 }/*function_dint_to_real*/ |
|
1844 break; |
|
1845 |
|
1846 /**** |
|
1847 *DINT_TO_SINT |
|
1848 */ |
|
1849 case function_dint_to_sint : |
|
1850 { |
|
1851 symbol_c *last_type_symbol = NULL; |
|
1852 |
|
1853 { |
|
1854 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1855 symbol_c *IN_param_value = &this->default_variable_name; |
|
1856 |
|
1857 symbol_c *IN_type_symbol = param_data_type; |
|
1858 last_type_symbol = param_data_type; |
|
1859 |
|
1860 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1861 { |
|
1862 |
|
1863 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1864 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1865 function_type_prefix = return_type_symbol; |
|
1866 break; |
|
1867 |
|
1868 } |
|
1869 |
|
1870 |
|
1871 ERROR; |
|
1872 } |
|
1873 |
|
1874 }/*function_dint_to_sint*/ |
|
1875 break; |
|
1876 |
|
1877 /**** |
|
1878 *DINT_TO_LINT |
|
1879 */ |
|
1880 case function_dint_to_lint : |
|
1881 { |
|
1882 symbol_c *last_type_symbol = NULL; |
|
1883 |
|
1884 { |
|
1885 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1886 symbol_c *IN_param_value = &this->default_variable_name; |
|
1887 |
|
1888 symbol_c *IN_type_symbol = param_data_type; |
|
1889 last_type_symbol = param_data_type; |
|
1890 |
|
1891 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1892 { |
|
1893 |
|
1894 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1895 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
1896 function_type_prefix = return_type_symbol; |
|
1897 break; |
|
1898 |
|
1899 } |
|
1900 |
|
1901 |
|
1902 ERROR; |
|
1903 } |
|
1904 |
|
1905 }/*function_dint_to_lint*/ |
|
1906 break; |
|
1907 |
|
1908 /**** |
|
1909 *DINT_TO_DATE |
|
1910 */ |
|
1911 case function_dint_to_date : |
|
1912 { |
|
1913 symbol_c *last_type_symbol = NULL; |
|
1914 |
|
1915 { |
|
1916 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1917 symbol_c *IN_param_value = &this->default_variable_name; |
|
1918 |
|
1919 symbol_c *IN_type_symbol = param_data_type; |
|
1920 last_type_symbol = param_data_type; |
|
1921 |
|
1922 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1923 { |
|
1924 |
|
1925 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1926 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1927 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1928 function_type_prefix = return_type_symbol; |
|
1929 break; |
|
1930 |
|
1931 } |
|
1932 |
|
1933 |
|
1934 ERROR; |
|
1935 } |
|
1936 |
|
1937 }/*function_dint_to_date*/ |
|
1938 break; |
|
1939 |
|
1940 /**** |
|
1941 *DINT_TO_DWORD |
|
1942 */ |
|
1943 case function_dint_to_dword : |
|
1944 { |
|
1945 symbol_c *last_type_symbol = NULL; |
|
1946 |
|
1947 { |
|
1948 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1949 symbol_c *IN_param_value = &this->default_variable_name; |
|
1950 |
|
1951 symbol_c *IN_type_symbol = param_data_type; |
|
1952 last_type_symbol = param_data_type; |
|
1953 |
|
1954 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1955 { |
|
1956 |
|
1957 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1958 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1959 function_type_prefix = return_type_symbol; |
|
1960 break; |
|
1961 |
|
1962 } |
|
1963 |
|
1964 |
|
1965 ERROR; |
|
1966 } |
|
1967 |
|
1968 }/*function_dint_to_dword*/ |
|
1969 break; |
|
1970 |
|
1971 /**** |
|
1972 *DINT_TO_DT |
|
1973 */ |
|
1974 case function_dint_to_dt : |
|
1975 { |
|
1976 symbol_c *last_type_symbol = NULL; |
|
1977 |
|
1978 { |
|
1979 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1980 symbol_c *IN_param_value = &this->default_variable_name; |
|
1981 |
|
1982 symbol_c *IN_type_symbol = param_data_type; |
|
1983 last_type_symbol = param_data_type; |
|
1984 |
|
1985 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1986 { |
|
1987 |
|
1988 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1989 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
1990 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1991 function_type_prefix = return_type_symbol; |
|
1992 break; |
|
1993 |
|
1994 } |
|
1995 |
|
1996 |
|
1997 ERROR; |
|
1998 } |
|
1999 |
|
2000 }/*function_dint_to_dt*/ |
|
2001 break; |
|
2002 |
|
2003 /**** |
|
2004 *DINT_TO_TOD |
|
2005 */ |
|
2006 case function_dint_to_tod : |
|
2007 { |
|
2008 symbol_c *last_type_symbol = NULL; |
|
2009 |
|
2010 { |
|
2011 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2012 symbol_c *IN_param_value = &this->default_variable_name; |
|
2013 |
|
2014 symbol_c *IN_type_symbol = param_data_type; |
|
2015 last_type_symbol = param_data_type; |
|
2016 |
|
2017 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2018 { |
|
2019 |
|
2020 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2021 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2022 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2023 function_type_prefix = return_type_symbol; |
|
2024 break; |
|
2025 |
|
2026 } |
|
2027 |
|
2028 |
|
2029 ERROR; |
|
2030 } |
|
2031 |
|
2032 }/*function_dint_to_tod*/ |
|
2033 break; |
|
2034 |
|
2035 /**** |
|
2036 *DINT_TO_UDINT |
|
2037 */ |
|
2038 case function_dint_to_udint : |
|
2039 { |
|
2040 symbol_c *last_type_symbol = NULL; |
|
2041 |
|
2042 { |
|
2043 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2044 symbol_c *IN_param_value = &this->default_variable_name; |
|
2045 |
|
2046 symbol_c *IN_type_symbol = param_data_type; |
|
2047 last_type_symbol = param_data_type; |
|
2048 |
|
2049 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2050 { |
|
2051 |
|
2052 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2053 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2054 function_type_prefix = return_type_symbol; |
|
2055 break; |
|
2056 |
|
2057 } |
|
2058 |
|
2059 |
|
2060 ERROR; |
|
2061 } |
|
2062 |
|
2063 }/*function_dint_to_udint*/ |
|
2064 break; |
|
2065 |
|
2066 /**** |
|
2067 *DINT_TO_WORD |
|
2068 */ |
|
2069 case function_dint_to_word : |
|
2070 { |
|
2071 symbol_c *last_type_symbol = NULL; |
|
2072 |
|
2073 { |
|
2074 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2075 symbol_c *IN_param_value = &this->default_variable_name; |
|
2076 |
|
2077 symbol_c *IN_type_symbol = param_data_type; |
|
2078 last_type_symbol = param_data_type; |
|
2079 |
|
2080 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2081 { |
|
2082 |
|
2083 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2084 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2085 function_type_prefix = return_type_symbol; |
|
2086 break; |
|
2087 |
|
2088 } |
|
2089 |
|
2090 |
|
2091 ERROR; |
|
2092 } |
|
2093 |
|
2094 }/*function_dint_to_word*/ |
|
2095 break; |
|
2096 |
|
2097 /**** |
|
2098 *DINT_TO_STRING |
|
2099 */ |
|
2100 case function_dint_to_string : |
|
2101 { |
|
2102 symbol_c *last_type_symbol = NULL; |
|
2103 |
|
2104 { |
|
2105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2106 symbol_c *IN_param_value = &this->default_variable_name; |
|
2107 |
|
2108 symbol_c *IN_type_symbol = param_data_type; |
|
2109 last_type_symbol = param_data_type; |
|
2110 |
|
2111 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2112 { |
|
2113 |
|
2114 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
2115 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2116 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2117 function_type_prefix = return_type_symbol; |
|
2118 break; |
|
2119 |
|
2120 } |
|
2121 |
|
2122 |
|
2123 ERROR; |
|
2124 } |
|
2125 |
|
2126 }/*function_dint_to_string*/ |
|
2127 break; |
|
2128 |
|
2129 /**** |
|
2130 *DINT_TO_LWORD |
|
2131 */ |
|
2132 case function_dint_to_lword : |
|
2133 { |
|
2134 symbol_c *last_type_symbol = NULL; |
|
2135 |
|
2136 { |
|
2137 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2138 symbol_c *IN_param_value = &this->default_variable_name; |
|
2139 |
|
2140 symbol_c *IN_type_symbol = param_data_type; |
|
2141 last_type_symbol = param_data_type; |
|
2142 |
|
2143 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2144 { |
|
2145 |
|
2146 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2147 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
2148 function_type_prefix = return_type_symbol; |
|
2149 break; |
|
2150 |
|
2151 } |
|
2152 |
|
2153 |
|
2154 ERROR; |
|
2155 } |
|
2156 |
|
2157 }/*function_dint_to_lword*/ |
|
2158 break; |
|
2159 |
|
2160 /**** |
|
2161 *DINT_TO_UINT |
|
2162 */ |
|
2163 case function_dint_to_uint : |
|
2164 { |
|
2165 symbol_c *last_type_symbol = NULL; |
|
2166 |
|
2167 { |
|
2168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2169 symbol_c *IN_param_value = &this->default_variable_name; |
|
2170 |
|
2171 symbol_c *IN_type_symbol = param_data_type; |
|
2172 last_type_symbol = param_data_type; |
|
2173 |
|
2174 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2175 { |
|
2176 |
|
2177 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2178 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2179 function_type_prefix = return_type_symbol; |
|
2180 break; |
|
2181 |
|
2182 } |
|
2183 |
|
2184 |
|
2185 ERROR; |
|
2186 } |
|
2187 |
|
2188 }/*function_dint_to_uint*/ |
|
2189 break; |
|
2190 |
|
2191 /**** |
|
2192 *DINT_TO_LREAL |
|
2193 */ |
|
2194 case function_dint_to_lreal : |
|
2195 { |
|
2196 symbol_c *last_type_symbol = NULL; |
|
2197 |
|
2198 { |
|
2199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2200 symbol_c *IN_param_value = &this->default_variable_name; |
|
2201 |
|
2202 symbol_c *IN_type_symbol = param_data_type; |
|
2203 last_type_symbol = param_data_type; |
|
2204 |
|
2205 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2206 { |
|
2207 |
|
2208 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2209 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2210 function_type_prefix = return_type_symbol; |
|
2211 break; |
|
2212 |
|
2213 } |
|
2214 |
|
2215 |
|
2216 ERROR; |
|
2217 } |
|
2218 |
|
2219 }/*function_dint_to_lreal*/ |
|
2220 break; |
|
2221 |
|
2222 /**** |
|
2223 *DINT_TO_BYTE |
|
2224 */ |
|
2225 case function_dint_to_byte : |
|
2226 { |
|
2227 symbol_c *last_type_symbol = NULL; |
|
2228 |
|
2229 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2237 { |
|
2238 |
|
2239 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2240 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2241 function_type_prefix = return_type_symbol; |
|
2242 break; |
|
2243 |
|
2244 } |
|
2245 |
|
2246 |
|
2247 ERROR; |
|
2248 } |
|
2249 |
|
2250 }/*function_dint_to_byte*/ |
|
2251 break; |
|
2252 |
|
2253 /**** |
|
2254 *DINT_TO_USINT |
|
2255 */ |
|
2256 case function_dint_to_usint : |
|
2257 { |
|
2258 symbol_c *last_type_symbol = NULL; |
|
2259 |
|
2260 { |
|
2261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2262 symbol_c *IN_param_value = &this->default_variable_name; |
|
2263 |
|
2264 symbol_c *IN_type_symbol = param_data_type; |
|
2265 last_type_symbol = param_data_type; |
|
2266 |
|
2267 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2268 { |
|
2269 |
|
2270 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2271 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2272 function_type_prefix = return_type_symbol; |
|
2273 break; |
|
2274 |
|
2275 } |
|
2276 |
|
2277 |
|
2278 ERROR; |
|
2279 } |
|
2280 |
|
2281 }/*function_dint_to_usint*/ |
|
2282 break; |
|
2283 |
|
2284 /**** |
|
2285 *DINT_TO_ULINT |
|
2286 */ |
|
2287 case function_dint_to_ulint : |
|
2288 { |
|
2289 symbol_c *last_type_symbol = NULL; |
|
2290 |
|
2291 { |
|
2292 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2293 symbol_c *IN_param_value = &this->default_variable_name; |
|
2294 |
|
2295 symbol_c *IN_type_symbol = param_data_type; |
|
2296 last_type_symbol = param_data_type; |
|
2297 |
|
2298 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2299 { |
|
2300 |
|
2301 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2302 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2303 function_type_prefix = return_type_symbol; |
|
2304 break; |
|
2305 |
|
2306 } |
|
2307 |
|
2308 |
|
2309 ERROR; |
|
2310 } |
|
2311 |
|
2312 }/*function_dint_to_ulint*/ |
|
2313 break; |
|
2314 |
|
2315 /**** |
|
2316 *DINT_TO_BOOL |
|
2317 */ |
|
2318 case function_dint_to_bool : |
|
2319 { |
|
2320 symbol_c *last_type_symbol = NULL; |
|
2321 |
|
2322 { |
|
2323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2324 symbol_c *IN_param_value = &this->default_variable_name; |
|
2325 |
|
2326 symbol_c *IN_type_symbol = param_data_type; |
|
2327 last_type_symbol = param_data_type; |
|
2328 |
|
2329 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2330 { |
|
2331 |
|
2332 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2333 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2334 function_type_prefix = return_type_symbol; |
|
2335 break; |
|
2336 |
|
2337 } |
|
2338 |
|
2339 |
|
2340 ERROR; |
|
2341 } |
|
2342 |
|
2343 }/*function_dint_to_bool*/ |
|
2344 break; |
|
2345 |
|
2346 /**** |
|
2347 *DINT_TO_TIME |
|
2348 */ |
|
2349 case function_dint_to_time : |
|
2350 { |
|
2351 symbol_c *last_type_symbol = NULL; |
|
2352 |
|
2353 { |
|
2354 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2355 symbol_c *IN_param_value = &this->default_variable_name; |
|
2356 |
|
2357 symbol_c *IN_type_symbol = param_data_type; |
|
2358 last_type_symbol = param_data_type; |
|
2359 |
|
2360 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2361 { |
|
2362 |
|
2363 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2364 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2365 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2366 function_type_prefix = return_type_symbol; |
|
2367 break; |
|
2368 |
|
2369 } |
|
2370 |
|
2371 |
|
2372 ERROR; |
|
2373 } |
|
2374 |
|
2375 }/*function_dint_to_time*/ |
|
2376 break; |
|
2377 |
|
2378 /**** |
|
2379 *DINT_TO_INT |
|
2380 */ |
|
2381 case function_dint_to_int : |
|
2382 { |
|
2383 symbol_c *last_type_symbol = NULL; |
|
2384 |
|
2385 { |
|
2386 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2387 symbol_c *IN_param_value = &this->default_variable_name; |
|
2388 |
|
2389 symbol_c *IN_type_symbol = param_data_type; |
|
2390 last_type_symbol = param_data_type; |
|
2391 |
|
2392 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2393 { |
|
2394 |
|
2395 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2396 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2397 function_type_prefix = return_type_symbol; |
|
2398 break; |
|
2399 |
|
2400 } |
|
2401 |
|
2402 |
|
2403 ERROR; |
|
2404 } |
|
2405 |
|
2406 }/*function_dint_to_int*/ |
|
2407 break; |
|
2408 |
|
2409 /**** |
|
2410 *DATE_TO_REAL |
|
2411 */ |
|
2412 case function_date_to_real : |
|
2413 { |
|
2414 symbol_c *last_type_symbol = NULL; |
|
2415 |
|
2416 { |
|
2417 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2418 symbol_c *IN_param_value = &this->default_variable_name; |
|
2419 |
|
2420 symbol_c *IN_type_symbol = param_data_type; |
|
2421 last_type_symbol = param_data_type; |
|
2422 |
|
2423 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2424 { |
|
2425 |
|
2426 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
2427 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2428 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2429 function_type_prefix = return_type_symbol; |
|
2430 break; |
|
2431 |
|
2432 } |
|
2433 |
|
2434 |
|
2435 ERROR; |
|
2436 } |
|
2437 |
|
2438 }/*function_date_to_real*/ |
|
2439 break; |
|
2440 |
|
2441 /**** |
|
2442 *DATE_TO_SINT |
|
2443 */ |
|
2444 case function_date_to_sint : |
|
2445 { |
|
2446 symbol_c *last_type_symbol = NULL; |
|
2447 |
|
2448 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2456 { |
|
2457 |
|
2458 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2459 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2460 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2461 function_type_prefix = return_type_symbol; |
|
2462 break; |
|
2463 |
|
2464 } |
|
2465 |
|
2466 |
|
2467 ERROR; |
|
2468 } |
|
2469 |
|
2470 }/*function_date_to_sint*/ |
|
2471 break; |
|
2472 |
|
2473 /**** |
|
2474 *DATE_TO_LINT |
|
2475 */ |
|
2476 case function_date_to_lint : |
|
2477 { |
|
2478 symbol_c *last_type_symbol = NULL; |
|
2479 |
|
2480 { |
|
2481 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2482 symbol_c *IN_param_value = &this->default_variable_name; |
|
2483 |
|
2484 symbol_c *IN_type_symbol = param_data_type; |
|
2485 last_type_symbol = param_data_type; |
|
2486 |
|
2487 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2488 { |
|
2489 |
|
2490 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2491 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2492 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2493 function_type_prefix = return_type_symbol; |
|
2494 break; |
|
2495 |
|
2496 } |
|
2497 |
|
2498 |
|
2499 ERROR; |
|
2500 } |
|
2501 |
|
2502 }/*function_date_to_lint*/ |
|
2503 break; |
|
2504 |
|
2505 /**** |
|
2506 *DATE_TO_DINT |
|
2507 */ |
|
2508 case function_date_to_dint : |
|
2509 { |
|
2510 symbol_c *last_type_symbol = NULL; |
|
2511 |
|
2512 { |
|
2513 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2514 symbol_c *IN_param_value = &this->default_variable_name; |
|
2515 |
|
2516 symbol_c *IN_type_symbol = param_data_type; |
|
2517 last_type_symbol = param_data_type; |
|
2518 |
|
2519 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2520 { |
|
2521 |
|
2522 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2523 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2524 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
2525 function_type_prefix = return_type_symbol; |
|
2526 break; |
|
2527 |
|
2528 } |
|
2529 |
|
2530 |
|
2531 ERROR; |
|
2532 } |
|
2533 |
|
2534 }/*function_date_to_dint*/ |
|
2535 break; |
|
2536 |
|
2537 /**** |
|
2538 *DATE_TO_DWORD |
|
2539 */ |
|
2540 case function_date_to_dword : |
|
2541 { |
|
2542 symbol_c *last_type_symbol = NULL; |
|
2543 |
|
2544 { |
|
2545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2546 symbol_c *IN_param_value = &this->default_variable_name; |
|
2547 |
|
2548 symbol_c *IN_type_symbol = param_data_type; |
|
2549 last_type_symbol = param_data_type; |
|
2550 |
|
2551 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2552 { |
|
2553 |
|
2554 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2555 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2556 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2557 function_type_prefix = return_type_symbol; |
|
2558 break; |
|
2559 |
|
2560 } |
|
2561 |
|
2562 |
|
2563 ERROR; |
|
2564 } |
|
2565 |
|
2566 }/*function_date_to_dword*/ |
|
2567 break; |
|
2568 |
|
2569 /**** |
|
2570 *DATE_TO_UDINT |
|
2571 */ |
|
2572 case function_date_to_udint : |
|
2573 { |
|
2574 symbol_c *last_type_symbol = NULL; |
|
2575 |
|
2576 { |
|
2577 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2578 symbol_c *IN_param_value = &this->default_variable_name; |
|
2579 |
|
2580 symbol_c *IN_type_symbol = param_data_type; |
|
2581 last_type_symbol = param_data_type; |
|
2582 |
|
2583 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2584 { |
|
2585 |
|
2586 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2587 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2588 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2589 function_type_prefix = return_type_symbol; |
|
2590 break; |
|
2591 |
|
2592 } |
|
2593 |
|
2594 |
|
2595 ERROR; |
|
2596 } |
|
2597 |
|
2598 }/*function_date_to_udint*/ |
|
2599 break; |
|
2600 |
|
2601 /**** |
|
2602 *DATE_TO_WORD |
|
2603 */ |
|
2604 case function_date_to_word : |
|
2605 { |
|
2606 symbol_c *last_type_symbol = NULL; |
|
2607 |
|
2608 { |
|
2609 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2610 symbol_c *IN_param_value = &this->default_variable_name; |
|
2611 |
|
2612 symbol_c *IN_type_symbol = param_data_type; |
|
2613 last_type_symbol = param_data_type; |
|
2614 |
|
2615 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2616 { |
|
2617 |
|
2618 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2619 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2620 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2621 function_type_prefix = return_type_symbol; |
|
2622 break; |
|
2623 |
|
2624 } |
|
2625 |
|
2626 |
|
2627 ERROR; |
|
2628 } |
|
2629 |
|
2630 }/*function_date_to_word*/ |
|
2631 break; |
|
2632 |
|
2633 /**** |
|
2634 *DATE_TO_STRING |
|
2635 */ |
|
2636 case function_date_to_string : |
|
2637 { |
|
2638 symbol_c *last_type_symbol = NULL; |
|
2639 |
|
2640 { |
|
2641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2642 symbol_c *IN_param_value = &this->default_variable_name; |
|
2643 |
|
2644 symbol_c *IN_type_symbol = param_data_type; |
|
2645 last_type_symbol = param_data_type; |
|
2646 |
|
2647 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2648 { |
|
2649 |
|
2650 function_name = (symbol_c*)(new pragma_c("__date_to_string")); |
|
2651 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2652 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2653 function_type_prefix = return_type_symbol; |
|
2654 break; |
|
2655 |
|
2656 } |
|
2657 |
|
2658 |
|
2659 ERROR; |
|
2660 } |
|
2661 |
|
2662 }/*function_date_to_string*/ |
|
2663 break; |
|
2664 |
|
2665 /**** |
|
2666 *DATE_TO_LWORD |
|
2667 */ |
|
2668 case function_date_to_lword : |
|
2669 { |
|
2670 symbol_c *last_type_symbol = NULL; |
|
2671 |
|
2672 { |
|
2673 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2674 symbol_c *IN_param_value = &this->default_variable_name; |
|
2675 |
|
2676 symbol_c *IN_type_symbol = param_data_type; |
|
2677 last_type_symbol = param_data_type; |
|
2678 |
|
2679 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2680 { |
|
2681 |
|
2682 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2683 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2684 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
2685 function_type_prefix = return_type_symbol; |
|
2686 break; |
|
2687 |
|
2688 } |
|
2689 |
|
2690 |
|
2691 ERROR; |
|
2692 } |
|
2693 |
|
2694 }/*function_date_to_lword*/ |
|
2695 break; |
|
2696 |
|
2697 /**** |
|
2698 *DATE_TO_UINT |
|
2699 */ |
|
2700 case function_date_to_uint : |
|
2701 { |
|
2702 symbol_c *last_type_symbol = NULL; |
|
2703 |
|
2704 { |
|
2705 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2706 symbol_c *IN_param_value = &this->default_variable_name; |
|
2707 |
|
2708 symbol_c *IN_type_symbol = param_data_type; |
|
2709 last_type_symbol = param_data_type; |
|
2710 |
|
2711 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2712 { |
|
2713 |
|
2714 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2715 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2716 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2717 function_type_prefix = return_type_symbol; |
|
2718 break; |
|
2719 |
|
2720 } |
|
2721 |
|
2722 |
|
2723 ERROR; |
|
2724 } |
|
2725 |
|
2726 }/*function_date_to_uint*/ |
|
2727 break; |
|
2728 |
|
2729 /**** |
|
2730 *DATE_TO_LREAL |
|
2731 */ |
|
2732 case function_date_to_lreal : |
|
2733 { |
|
2734 symbol_c *last_type_symbol = NULL; |
|
2735 |
|
2736 { |
|
2737 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2738 symbol_c *IN_param_value = &this->default_variable_name; |
|
2739 |
|
2740 symbol_c *IN_type_symbol = param_data_type; |
|
2741 last_type_symbol = param_data_type; |
|
2742 |
|
2743 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2744 { |
|
2745 |
|
2746 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
2747 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2748 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2749 function_type_prefix = return_type_symbol; |
|
2750 break; |
|
2751 |
|
2752 } |
|
2753 |
|
2754 |
|
2755 ERROR; |
|
2756 } |
|
2757 |
|
2758 }/*function_date_to_lreal*/ |
|
2759 break; |
|
2760 |
|
2761 /**** |
|
2762 *DATE_TO_BYTE |
|
2763 */ |
|
2764 case function_date_to_byte : |
|
2765 { |
|
2766 symbol_c *last_type_symbol = NULL; |
|
2767 |
|
2768 { |
|
2769 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2770 symbol_c *IN_param_value = &this->default_variable_name; |
|
2771 |
|
2772 symbol_c *IN_type_symbol = param_data_type; |
|
2773 last_type_symbol = param_data_type; |
|
2774 |
|
2775 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2776 { |
|
2777 |
|
2778 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2779 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2780 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2781 function_type_prefix = return_type_symbol; |
|
2782 break; |
|
2783 |
|
2784 } |
|
2785 |
|
2786 |
|
2787 ERROR; |
|
2788 } |
|
2789 |
|
2790 }/*function_date_to_byte*/ |
|
2791 break; |
|
2792 |
|
2793 /**** |
|
2794 *DATE_TO_USINT |
|
2795 */ |
|
2796 case function_date_to_usint : |
|
2797 { |
|
2798 symbol_c *last_type_symbol = NULL; |
|
2799 |
|
2800 { |
|
2801 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2802 symbol_c *IN_param_value = &this->default_variable_name; |
|
2803 |
|
2804 symbol_c *IN_type_symbol = param_data_type; |
|
2805 last_type_symbol = param_data_type; |
|
2806 |
|
2807 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2808 { |
|
2809 |
|
2810 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2811 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2812 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2813 function_type_prefix = return_type_symbol; |
|
2814 break; |
|
2815 |
|
2816 } |
|
2817 |
|
2818 |
|
2819 ERROR; |
|
2820 } |
|
2821 |
|
2822 }/*function_date_to_usint*/ |
|
2823 break; |
|
2824 |
|
2825 /**** |
|
2826 *DATE_TO_ULINT |
|
2827 */ |
|
2828 case function_date_to_ulint : |
|
2829 { |
|
2830 symbol_c *last_type_symbol = NULL; |
|
2831 |
|
2832 { |
|
2833 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2834 symbol_c *IN_param_value = &this->default_variable_name; |
|
2835 |
|
2836 symbol_c *IN_type_symbol = param_data_type; |
|
2837 last_type_symbol = param_data_type; |
|
2838 |
|
2839 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2840 { |
|
2841 |
|
2842 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2843 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2844 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2845 function_type_prefix = return_type_symbol; |
|
2846 break; |
|
2847 |
|
2848 } |
|
2849 |
|
2850 |
|
2851 ERROR; |
|
2852 } |
|
2853 |
|
2854 }/*function_date_to_ulint*/ |
|
2855 break; |
|
2856 |
|
2857 /**** |
|
2858 *DATE_TO_INT |
|
2859 */ |
|
2860 case function_date_to_int : |
|
2861 { |
|
2862 symbol_c *last_type_symbol = NULL; |
|
2863 |
|
2864 { |
|
2865 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2866 symbol_c *IN_param_value = &this->default_variable_name; |
|
2867 |
|
2868 symbol_c *IN_type_symbol = param_data_type; |
|
2869 last_type_symbol = param_data_type; |
|
2870 |
|
2871 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
2872 { |
|
2873 |
|
2874 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
2875 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2876 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2877 function_type_prefix = return_type_symbol; |
|
2878 break; |
|
2879 |
|
2880 } |
|
2881 |
|
2882 |
|
2883 ERROR; |
|
2884 } |
|
2885 |
|
2886 }/*function_date_to_int*/ |
|
2887 break; |
|
2888 |
|
2889 /**** |
|
2890 *DWORD_TO_REAL |
|
2891 */ |
|
2892 case function_dword_to_real : |
|
2893 { |
|
2894 symbol_c *last_type_symbol = NULL; |
|
2895 |
|
2896 { |
|
2897 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2898 symbol_c *IN_param_value = &this->default_variable_name; |
|
2899 |
|
2900 symbol_c *IN_type_symbol = param_data_type; |
|
2901 last_type_symbol = param_data_type; |
|
2902 |
|
2903 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
2904 { |
|
2905 |
|
2906 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2907 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2908 function_type_prefix = return_type_symbol; |
|
2909 break; |
|
2910 |
|
2911 } |
|
2912 |
|
2913 |
|
2914 ERROR; |
|
2915 } |
|
2916 |
|
2917 }/*function_dword_to_real*/ |
|
2918 break; |
|
2919 |
|
2920 /**** |
|
2921 *DWORD_TO_SINT |
|
2922 */ |
|
2923 case function_dword_to_sint : |
|
2924 { |
|
2925 symbol_c *last_type_symbol = NULL; |
|
2926 |
|
2927 { |
|
2928 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2929 symbol_c *IN_param_value = &this->default_variable_name; |
|
2930 |
|
2931 symbol_c *IN_type_symbol = param_data_type; |
|
2932 last_type_symbol = param_data_type; |
|
2933 |
|
2934 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
2935 { |
|
2936 |
|
2937 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2938 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2939 function_type_prefix = return_type_symbol; |
|
2940 break; |
|
2941 |
|
2942 } |
|
2943 |
|
2944 |
|
2945 ERROR; |
|
2946 } |
|
2947 |
|
2948 }/*function_dword_to_sint*/ |
|
2949 break; |
|
2950 |
|
2951 /**** |
|
2952 *DWORD_TO_LINT |
|
2953 */ |
|
2954 case function_dword_to_lint : |
|
2955 { |
|
2956 symbol_c *last_type_symbol = NULL; |
|
2957 |
|
2958 { |
|
2959 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2960 symbol_c *IN_param_value = &this->default_variable_name; |
|
2961 |
|
2962 symbol_c *IN_type_symbol = param_data_type; |
|
2963 last_type_symbol = param_data_type; |
|
2964 |
|
2965 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
2966 { |
|
2967 |
|
2968 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
2969 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
2970 function_type_prefix = return_type_symbol; |
|
2971 break; |
|
2972 |
|
2973 } |
|
2974 |
|
2975 |
|
2976 ERROR; |
|
2977 } |
|
2978 |
|
2979 }/*function_dword_to_lint*/ |
|
2980 break; |
|
2981 |
|
2982 /**** |
|
2983 *DWORD_TO_DINT |
|
2984 */ |
|
2985 case function_dword_to_dint : |
|
2986 { |
|
2987 symbol_c *last_type_symbol = NULL; |
|
2988 |
|
2989 { |
|
2990 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2991 symbol_c *IN_param_value = &this->default_variable_name; |
|
2992 |
|
2993 symbol_c *IN_type_symbol = param_data_type; |
|
2994 last_type_symbol = param_data_type; |
|
2995 |
|
2996 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
2997 { |
|
2998 |
|
2999 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3000 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3001 function_type_prefix = return_type_symbol; |
|
3002 break; |
|
3003 |
|
3004 } |
|
3005 |
|
3006 |
|
3007 ERROR; |
|
3008 } |
|
3009 |
|
3010 }/*function_dword_to_dint*/ |
|
3011 break; |
|
3012 |
|
3013 /**** |
|
3014 *DWORD_TO_DATE |
|
3015 */ |
|
3016 case function_dword_to_date : |
|
3017 { |
|
3018 symbol_c *last_type_symbol = NULL; |
|
3019 |
|
3020 { |
|
3021 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3022 symbol_c *IN_param_value = &this->default_variable_name; |
|
3023 |
|
3024 symbol_c *IN_type_symbol = param_data_type; |
|
3025 last_type_symbol = param_data_type; |
|
3026 |
|
3027 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3028 { |
|
3029 |
|
3030 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3031 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3032 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3033 function_type_prefix = return_type_symbol; |
|
3034 break; |
|
3035 |
|
3036 } |
|
3037 |
|
3038 |
|
3039 ERROR; |
|
3040 } |
|
3041 |
|
3042 }/*function_dword_to_date*/ |
|
3043 break; |
|
3044 |
|
3045 /**** |
|
3046 *DWORD_TO_DT |
|
3047 */ |
|
3048 case function_dword_to_dt : |
|
3049 { |
|
3050 symbol_c *last_type_symbol = NULL; |
|
3051 |
|
3052 { |
|
3053 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3054 symbol_c *IN_param_value = &this->default_variable_name; |
|
3055 |
|
3056 symbol_c *IN_type_symbol = param_data_type; |
|
3057 last_type_symbol = param_data_type; |
|
3058 |
|
3059 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3060 { |
|
3061 |
|
3062 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3063 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3064 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3065 function_type_prefix = return_type_symbol; |
|
3066 break; |
|
3067 |
|
3068 } |
|
3069 |
|
3070 |
|
3071 ERROR; |
|
3072 } |
|
3073 |
|
3074 }/*function_dword_to_dt*/ |
|
3075 break; |
|
3076 |
|
3077 /**** |
|
3078 *DWORD_TO_TOD |
|
3079 */ |
|
3080 case function_dword_to_tod : |
|
3081 { |
|
3082 symbol_c *last_type_symbol = NULL; |
|
3083 |
|
3084 { |
|
3085 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3086 symbol_c *IN_param_value = &this->default_variable_name; |
|
3087 |
|
3088 symbol_c *IN_type_symbol = param_data_type; |
|
3089 last_type_symbol = param_data_type; |
|
3090 |
|
3091 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3092 { |
|
3093 |
|
3094 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3095 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3096 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3097 function_type_prefix = return_type_symbol; |
|
3098 break; |
|
3099 |
|
3100 } |
|
3101 |
|
3102 |
|
3103 ERROR; |
|
3104 } |
|
3105 |
|
3106 }/*function_dword_to_tod*/ |
|
3107 break; |
|
3108 |
|
3109 /**** |
|
3110 *DWORD_TO_UDINT |
|
3111 */ |
|
3112 case function_dword_to_udint : |
|
3113 { |
|
3114 symbol_c *last_type_symbol = NULL; |
|
3115 |
|
3116 { |
|
3117 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3118 symbol_c *IN_param_value = &this->default_variable_name; |
|
3119 |
|
3120 symbol_c *IN_type_symbol = param_data_type; |
|
3121 last_type_symbol = param_data_type; |
|
3122 |
|
3123 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3124 { |
|
3125 |
|
3126 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3127 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3128 function_type_prefix = return_type_symbol; |
|
3129 break; |
|
3130 |
|
3131 } |
|
3132 |
|
3133 |
|
3134 ERROR; |
|
3135 } |
|
3136 |
|
3137 }/*function_dword_to_udint*/ |
|
3138 break; |
|
3139 |
|
3140 /**** |
|
3141 *DWORD_TO_WORD |
|
3142 */ |
|
3143 case function_dword_to_word : |
|
3144 { |
|
3145 symbol_c *last_type_symbol = NULL; |
|
3146 |
|
3147 { |
|
3148 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3149 symbol_c *IN_param_value = &this->default_variable_name; |
|
3150 |
|
3151 symbol_c *IN_type_symbol = param_data_type; |
|
3152 last_type_symbol = param_data_type; |
|
3153 |
|
3154 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3155 { |
|
3156 |
|
3157 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3158 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3159 function_type_prefix = return_type_symbol; |
|
3160 break; |
|
3161 |
|
3162 } |
|
3163 |
|
3164 |
|
3165 ERROR; |
|
3166 } |
|
3167 |
|
3168 }/*function_dword_to_word*/ |
|
3169 break; |
|
3170 |
|
3171 /**** |
|
3172 *DWORD_TO_STRING |
|
3173 */ |
|
3174 case function_dword_to_string : |
|
3175 { |
|
3176 symbol_c *last_type_symbol = NULL; |
|
3177 |
|
3178 { |
|
3179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3180 symbol_c *IN_param_value = &this->default_variable_name; |
|
3181 |
|
3182 symbol_c *IN_type_symbol = param_data_type; |
|
3183 last_type_symbol = param_data_type; |
|
3184 |
|
3185 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3186 { |
|
3187 |
|
3188 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
3189 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3190 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3191 function_type_prefix = return_type_symbol; |
|
3192 break; |
|
3193 |
|
3194 } |
|
3195 |
|
3196 |
|
3197 ERROR; |
|
3198 } |
|
3199 |
|
3200 }/*function_dword_to_string*/ |
|
3201 break; |
|
3202 |
|
3203 /**** |
|
3204 *DWORD_TO_LWORD |
|
3205 */ |
|
3206 case function_dword_to_lword : |
|
3207 { |
|
3208 symbol_c *last_type_symbol = NULL; |
|
3209 |
|
3210 { |
|
3211 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3212 symbol_c *IN_param_value = &this->default_variable_name; |
|
3213 |
|
3214 symbol_c *IN_type_symbol = param_data_type; |
|
3215 last_type_symbol = param_data_type; |
|
3216 |
|
3217 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3218 { |
|
3219 |
|
3220 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3221 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3222 function_type_prefix = return_type_symbol; |
|
3223 break; |
|
3224 |
|
3225 } |
|
3226 |
|
3227 |
|
3228 ERROR; |
|
3229 } |
|
3230 |
|
3231 }/*function_dword_to_lword*/ |
|
3232 break; |
|
3233 |
|
3234 /**** |
|
3235 *DWORD_TO_UINT |
|
3236 */ |
|
3237 case function_dword_to_uint : |
|
3238 { |
|
3239 symbol_c *last_type_symbol = NULL; |
|
3240 |
|
3241 { |
|
3242 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3243 symbol_c *IN_param_value = &this->default_variable_name; |
|
3244 |
|
3245 symbol_c *IN_type_symbol = param_data_type; |
|
3246 last_type_symbol = param_data_type; |
|
3247 |
|
3248 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3249 { |
|
3250 |
|
3251 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3252 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3253 function_type_prefix = return_type_symbol; |
|
3254 break; |
|
3255 |
|
3256 } |
|
3257 |
|
3258 |
|
3259 ERROR; |
|
3260 } |
|
3261 |
|
3262 }/*function_dword_to_uint*/ |
|
3263 break; |
|
3264 |
|
3265 /**** |
|
3266 *DWORD_TO_LREAL |
|
3267 */ |
|
3268 case function_dword_to_lreal : |
|
3269 { |
|
3270 symbol_c *last_type_symbol = NULL; |
|
3271 |
|
3272 { |
|
3273 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3274 symbol_c *IN_param_value = &this->default_variable_name; |
|
3275 |
|
3276 symbol_c *IN_type_symbol = param_data_type; |
|
3277 last_type_symbol = param_data_type; |
|
3278 |
|
3279 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3280 { |
|
3281 |
|
3282 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3283 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3284 function_type_prefix = return_type_symbol; |
|
3285 break; |
|
3286 |
|
3287 } |
|
3288 |
|
3289 |
|
3290 ERROR; |
|
3291 } |
|
3292 |
|
3293 }/*function_dword_to_lreal*/ |
|
3294 break; |
|
3295 |
|
3296 /**** |
|
3297 *DWORD_TO_BYTE |
|
3298 */ |
|
3299 case function_dword_to_byte : |
|
3300 { |
|
3301 symbol_c *last_type_symbol = NULL; |
|
3302 |
|
3303 { |
|
3304 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3305 symbol_c *IN_param_value = &this->default_variable_name; |
|
3306 |
|
3307 symbol_c *IN_type_symbol = param_data_type; |
|
3308 last_type_symbol = param_data_type; |
|
3309 |
|
3310 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3311 { |
|
3312 |
|
3313 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3314 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3315 function_type_prefix = return_type_symbol; |
|
3316 break; |
|
3317 |
|
3318 } |
|
3319 |
|
3320 |
|
3321 ERROR; |
|
3322 } |
|
3323 |
|
3324 }/*function_dword_to_byte*/ |
|
3325 break; |
|
3326 |
|
3327 /**** |
|
3328 *DWORD_TO_USINT |
|
3329 */ |
|
3330 case function_dword_to_usint : |
|
3331 { |
|
3332 symbol_c *last_type_symbol = NULL; |
|
3333 |
|
3334 { |
|
3335 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3336 symbol_c *IN_param_value = &this->default_variable_name; |
|
3337 |
|
3338 symbol_c *IN_type_symbol = param_data_type; |
|
3339 last_type_symbol = param_data_type; |
|
3340 |
|
3341 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3342 { |
|
3343 |
|
3344 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3345 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3346 function_type_prefix = return_type_symbol; |
|
3347 break; |
|
3348 |
|
3349 } |
|
3350 |
|
3351 |
|
3352 ERROR; |
|
3353 } |
|
3354 |
|
3355 }/*function_dword_to_usint*/ |
|
3356 break; |
|
3357 |
|
3358 /**** |
|
3359 *DWORD_TO_ULINT |
|
3360 */ |
|
3361 case function_dword_to_ulint : |
|
3362 { |
|
3363 symbol_c *last_type_symbol = NULL; |
|
3364 |
|
3365 { |
|
3366 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3367 symbol_c *IN_param_value = &this->default_variable_name; |
|
3368 |
|
3369 symbol_c *IN_type_symbol = param_data_type; |
|
3370 last_type_symbol = param_data_type; |
|
3371 |
|
3372 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3373 { |
|
3374 |
|
3375 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3376 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3377 function_type_prefix = return_type_symbol; |
|
3378 break; |
|
3379 |
|
3380 } |
|
3381 |
|
3382 |
|
3383 ERROR; |
|
3384 } |
|
3385 |
|
3386 }/*function_dword_to_ulint*/ |
|
3387 break; |
|
3388 |
|
3389 /**** |
|
3390 *DWORD_TO_BOOL |
|
3391 */ |
|
3392 case function_dword_to_bool : |
|
3393 { |
|
3394 symbol_c *last_type_symbol = NULL; |
|
3395 |
|
3396 { |
|
3397 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3398 symbol_c *IN_param_value = &this->default_variable_name; |
|
3399 |
|
3400 symbol_c *IN_type_symbol = param_data_type; |
|
3401 last_type_symbol = param_data_type; |
|
3402 |
|
3403 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3404 { |
|
3405 |
|
3406 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3407 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3408 function_type_prefix = return_type_symbol; |
|
3409 break; |
|
3410 |
|
3411 } |
|
3412 |
|
3413 |
|
3414 ERROR; |
|
3415 } |
|
3416 |
|
3417 }/*function_dword_to_bool*/ |
|
3418 break; |
|
3419 |
|
3420 /**** |
|
3421 *DWORD_TO_TIME |
|
3422 */ |
|
3423 case function_dword_to_time : |
|
3424 { |
|
3425 symbol_c *last_type_symbol = NULL; |
|
3426 |
|
3427 { |
|
3428 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3429 symbol_c *IN_param_value = &this->default_variable_name; |
|
3430 |
|
3431 symbol_c *IN_type_symbol = param_data_type; |
|
3432 last_type_symbol = param_data_type; |
|
3433 |
|
3434 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3435 { |
|
3436 |
|
3437 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3438 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3439 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
3440 function_type_prefix = return_type_symbol; |
|
3441 break; |
|
3442 |
|
3443 } |
|
3444 |
|
3445 |
|
3446 ERROR; |
|
3447 } |
|
3448 |
|
3449 }/*function_dword_to_time*/ |
|
3450 break; |
|
3451 |
|
3452 /**** |
|
3453 *DWORD_TO_INT |
|
3454 */ |
|
3455 case function_dword_to_int : |
|
3456 { |
|
3457 symbol_c *last_type_symbol = NULL; |
|
3458 |
|
3459 { |
|
3460 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3461 symbol_c *IN_param_value = &this->default_variable_name; |
|
3462 |
|
3463 symbol_c *IN_type_symbol = param_data_type; |
|
3464 last_type_symbol = param_data_type; |
|
3465 |
|
3466 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3467 { |
|
3468 |
|
3469 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3470 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3471 function_type_prefix = return_type_symbol; |
|
3472 break; |
|
3473 |
|
3474 } |
|
3475 |
|
3476 |
|
3477 ERROR; |
|
3478 } |
|
3479 |
|
3480 }/*function_dword_to_int*/ |
|
3481 break; |
|
3482 |
|
3483 /**** |
|
3484 *DT_TO_REAL |
|
3485 */ |
|
3486 case function_dt_to_real : |
|
3487 { |
|
3488 symbol_c *last_type_symbol = NULL; |
|
3489 |
|
3490 { |
|
3491 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3492 symbol_c *IN_param_value = &this->default_variable_name; |
|
3493 |
|
3494 symbol_c *IN_type_symbol = param_data_type; |
|
3495 last_type_symbol = param_data_type; |
|
3496 |
|
3497 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3498 { |
|
3499 |
|
3500 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3501 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3502 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3503 function_type_prefix = return_type_symbol; |
|
3504 break; |
|
3505 |
|
3506 } |
|
3507 |
|
3508 |
|
3509 ERROR; |
|
3510 } |
|
3511 |
|
3512 }/*function_dt_to_real*/ |
|
3513 break; |
|
3514 |
|
3515 /**** |
|
3516 *DT_TO_SINT |
|
3517 */ |
|
3518 case function_dt_to_sint : |
|
3519 { |
|
3520 symbol_c *last_type_symbol = NULL; |
|
3521 |
|
3522 { |
|
3523 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3524 symbol_c *IN_param_value = &this->default_variable_name; |
|
3525 |
|
3526 symbol_c *IN_type_symbol = param_data_type; |
|
3527 last_type_symbol = param_data_type; |
|
3528 |
|
3529 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3530 { |
|
3531 |
|
3532 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3533 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3534 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3535 function_type_prefix = return_type_symbol; |
|
3536 break; |
|
3537 |
|
3538 } |
|
3539 |
|
3540 |
|
3541 ERROR; |
|
3542 } |
|
3543 |
|
3544 }/*function_dt_to_sint*/ |
|
3545 break; |
|
3546 |
|
3547 /**** |
|
3548 *DT_TO_LINT |
|
3549 */ |
|
3550 case function_dt_to_lint : |
|
3551 { |
|
3552 symbol_c *last_type_symbol = NULL; |
|
3553 |
|
3554 { |
|
3555 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3556 symbol_c *IN_param_value = &this->default_variable_name; |
|
3557 |
|
3558 symbol_c *IN_type_symbol = param_data_type; |
|
3559 last_type_symbol = param_data_type; |
|
3560 |
|
3561 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3562 { |
|
3563 |
|
3564 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3565 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3566 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
3567 function_type_prefix = return_type_symbol; |
|
3568 break; |
|
3569 |
|
3570 } |
|
3571 |
|
3572 |
|
3573 ERROR; |
|
3574 } |
|
3575 |
|
3576 }/*function_dt_to_lint*/ |
|
3577 break; |
|
3578 |
|
3579 /**** |
|
3580 *DT_TO_DINT |
|
3581 */ |
|
3582 case function_dt_to_dint : |
|
3583 { |
|
3584 symbol_c *last_type_symbol = NULL; |
|
3585 |
|
3586 { |
|
3587 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3588 symbol_c *IN_param_value = &this->default_variable_name; |
|
3589 |
|
3590 symbol_c *IN_type_symbol = param_data_type; |
|
3591 last_type_symbol = param_data_type; |
|
3592 |
|
3593 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3594 { |
|
3595 |
|
3596 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3597 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3598 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3599 function_type_prefix = return_type_symbol; |
|
3600 break; |
|
3601 |
|
3602 } |
|
3603 |
|
3604 |
|
3605 ERROR; |
|
3606 } |
|
3607 |
|
3608 }/*function_dt_to_dint*/ |
|
3609 break; |
|
3610 |
|
3611 /**** |
|
3612 *DT_TO_DWORD |
|
3613 */ |
|
3614 case function_dt_to_dword : |
|
3615 { |
|
3616 symbol_c *last_type_symbol = NULL; |
|
3617 |
|
3618 { |
|
3619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3620 symbol_c *IN_param_value = &this->default_variable_name; |
|
3621 |
|
3622 symbol_c *IN_type_symbol = param_data_type; |
|
3623 last_type_symbol = param_data_type; |
|
3624 |
|
3625 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3626 { |
|
3627 |
|
3628 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3629 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3630 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
3631 function_type_prefix = return_type_symbol; |
|
3632 break; |
|
3633 |
|
3634 } |
|
3635 |
|
3636 |
|
3637 ERROR; |
|
3638 } |
|
3639 |
|
3640 }/*function_dt_to_dword*/ |
|
3641 break; |
|
3642 |
|
3643 /**** |
|
3644 *DT_TO_UDINT |
|
3645 */ |
|
3646 case function_dt_to_udint : |
|
3647 { |
|
3648 symbol_c *last_type_symbol = NULL; |
|
3649 |
|
3650 { |
|
3651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3652 symbol_c *IN_param_value = &this->default_variable_name; |
|
3653 |
|
3654 symbol_c *IN_type_symbol = param_data_type; |
|
3655 last_type_symbol = param_data_type; |
|
3656 |
|
3657 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3658 { |
|
3659 |
|
3660 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3661 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3662 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3663 function_type_prefix = return_type_symbol; |
|
3664 break; |
|
3665 |
|
3666 } |
|
3667 |
|
3668 |
|
3669 ERROR; |
|
3670 } |
|
3671 |
|
3672 }/*function_dt_to_udint*/ |
|
3673 break; |
|
3674 |
|
3675 /**** |
|
3676 *DT_TO_WORD |
|
3677 */ |
|
3678 case function_dt_to_word : |
|
3679 { |
|
3680 symbol_c *last_type_symbol = NULL; |
|
3681 |
|
3682 { |
|
3683 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3684 symbol_c *IN_param_value = &this->default_variable_name; |
|
3685 |
|
3686 symbol_c *IN_type_symbol = param_data_type; |
|
3687 last_type_symbol = param_data_type; |
|
3688 |
|
3689 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3690 { |
|
3691 |
|
3692 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3693 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3694 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3695 function_type_prefix = return_type_symbol; |
|
3696 break; |
|
3697 |
|
3698 } |
|
3699 |
|
3700 |
|
3701 ERROR; |
|
3702 } |
|
3703 |
|
3704 }/*function_dt_to_word*/ |
|
3705 break; |
|
3706 |
|
3707 /**** |
|
3708 *DT_TO_STRING |
|
3709 */ |
|
3710 case function_dt_to_string : |
|
3711 { |
|
3712 symbol_c *last_type_symbol = NULL; |
|
3713 |
|
3714 { |
|
3715 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3716 symbol_c *IN_param_value = &this->default_variable_name; |
|
3717 |
|
3718 symbol_c *IN_type_symbol = param_data_type; |
|
3719 last_type_symbol = param_data_type; |
|
3720 |
|
3721 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3722 { |
|
3723 |
|
3724 function_name = (symbol_c*)(new pragma_c("__dt_to_string")); |
|
3725 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3726 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3727 function_type_prefix = return_type_symbol; |
|
3728 break; |
|
3729 |
|
3730 } |
|
3731 |
|
3732 |
|
3733 ERROR; |
|
3734 } |
|
3735 |
|
3736 }/*function_dt_to_string*/ |
|
3737 break; |
|
3738 |
|
3739 /**** |
|
3740 *DT_TO_LWORD |
|
3741 */ |
|
3742 case function_dt_to_lword : |
|
3743 { |
|
3744 symbol_c *last_type_symbol = NULL; |
|
3745 |
|
3746 { |
|
3747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3748 symbol_c *IN_param_value = &this->default_variable_name; |
|
3749 |
|
3750 symbol_c *IN_type_symbol = param_data_type; |
|
3751 last_type_symbol = param_data_type; |
|
3752 |
|
3753 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3754 { |
|
3755 |
|
3756 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3757 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3758 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3759 function_type_prefix = return_type_symbol; |
|
3760 break; |
|
3761 |
|
3762 } |
|
3763 |
|
3764 |
|
3765 ERROR; |
|
3766 } |
|
3767 |
|
3768 }/*function_dt_to_lword*/ |
|
3769 break; |
|
3770 |
|
3771 /**** |
|
3772 *DT_TO_UINT |
|
3773 */ |
|
3774 case function_dt_to_uint : |
|
3775 { |
|
3776 symbol_c *last_type_symbol = NULL; |
|
3777 |
|
3778 { |
|
3779 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3780 symbol_c *IN_param_value = &this->default_variable_name; |
|
3781 |
|
3782 symbol_c *IN_type_symbol = param_data_type; |
|
3783 last_type_symbol = param_data_type; |
|
3784 |
|
3785 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3786 { |
|
3787 |
|
3788 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3789 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3790 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3791 function_type_prefix = return_type_symbol; |
|
3792 break; |
|
3793 |
|
3794 } |
|
3795 |
|
3796 |
|
3797 ERROR; |
|
3798 } |
|
3799 |
|
3800 }/*function_dt_to_uint*/ |
|
3801 break; |
|
3802 |
|
3803 /**** |
|
3804 *DT_TO_LREAL |
|
3805 */ |
|
3806 case function_dt_to_lreal : |
|
3807 { |
|
3808 symbol_c *last_type_symbol = NULL; |
|
3809 |
|
3810 { |
|
3811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3812 symbol_c *IN_param_value = &this->default_variable_name; |
|
3813 |
|
3814 symbol_c *IN_type_symbol = param_data_type; |
|
3815 last_type_symbol = param_data_type; |
|
3816 |
|
3817 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3818 { |
|
3819 |
|
3820 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3821 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3822 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3823 function_type_prefix = return_type_symbol; |
|
3824 break; |
|
3825 |
|
3826 } |
|
3827 |
|
3828 |
|
3829 ERROR; |
|
3830 } |
|
3831 |
|
3832 }/*function_dt_to_lreal*/ |
|
3833 break; |
|
3834 |
|
3835 /**** |
|
3836 *DT_TO_BYTE |
|
3837 */ |
|
3838 case function_dt_to_byte : |
|
3839 { |
|
3840 symbol_c *last_type_symbol = NULL; |
|
3841 |
|
3842 { |
|
3843 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3844 symbol_c *IN_param_value = &this->default_variable_name; |
|
3845 |
|
3846 symbol_c *IN_type_symbol = param_data_type; |
|
3847 last_type_symbol = param_data_type; |
|
3848 |
|
3849 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3850 { |
|
3851 |
|
3852 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3853 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3854 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3855 function_type_prefix = return_type_symbol; |
|
3856 break; |
|
3857 |
|
3858 } |
|
3859 |
|
3860 |
|
3861 ERROR; |
|
3862 } |
|
3863 |
|
3864 }/*function_dt_to_byte*/ |
|
3865 break; |
|
3866 |
|
3867 /**** |
|
3868 *DT_TO_USINT |
|
3869 */ |
|
3870 case function_dt_to_usint : |
|
3871 { |
|
3872 symbol_c *last_type_symbol = NULL; |
|
3873 |
|
3874 { |
|
3875 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3876 symbol_c *IN_param_value = &this->default_variable_name; |
|
3877 |
|
3878 symbol_c *IN_type_symbol = param_data_type; |
|
3879 last_type_symbol = param_data_type; |
|
3880 |
|
3881 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3882 { |
|
3883 |
|
3884 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3885 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3886 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3887 function_type_prefix = return_type_symbol; |
|
3888 break; |
|
3889 |
|
3890 } |
|
3891 |
|
3892 |
|
3893 ERROR; |
|
3894 } |
|
3895 |
|
3896 }/*function_dt_to_usint*/ |
|
3897 break; |
|
3898 |
|
3899 /**** |
|
3900 *DT_TO_ULINT |
|
3901 */ |
|
3902 case function_dt_to_ulint : |
|
3903 { |
|
3904 symbol_c *last_type_symbol = NULL; |
|
3905 |
|
3906 { |
|
3907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3908 symbol_c *IN_param_value = &this->default_variable_name; |
|
3909 |
|
3910 symbol_c *IN_type_symbol = param_data_type; |
|
3911 last_type_symbol = param_data_type; |
|
3912 |
|
3913 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3914 { |
|
3915 |
|
3916 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3917 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3918 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3919 function_type_prefix = return_type_symbol; |
|
3920 break; |
|
3921 |
|
3922 } |
|
3923 |
|
3924 |
|
3925 ERROR; |
|
3926 } |
|
3927 |
|
3928 }/*function_dt_to_ulint*/ |
|
3929 break; |
|
3930 |
|
3931 /**** |
|
3932 *DT_TO_INT |
|
3933 */ |
|
3934 case function_dt_to_int : |
|
3935 { |
|
3936 symbol_c *last_type_symbol = NULL; |
|
3937 |
|
3938 { |
|
3939 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3940 symbol_c *IN_param_value = &this->default_variable_name; |
|
3941 |
|
3942 symbol_c *IN_type_symbol = param_data_type; |
|
3943 last_type_symbol = param_data_type; |
|
3944 |
|
3945 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
3946 { |
|
3947 |
|
3948 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3949 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3950 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3951 function_type_prefix = return_type_symbol; |
|
3952 break; |
|
3953 |
|
3954 } |
|
3955 |
|
3956 |
|
3957 ERROR; |
|
3958 } |
|
3959 |
|
3960 }/*function_dt_to_int*/ |
|
3961 break; |
|
3962 |
|
3963 /**** |
|
3964 *TOD_TO_REAL |
|
3965 */ |
|
3966 case function_tod_to_real : |
|
3967 { |
|
3968 symbol_c *last_type_symbol = NULL; |
|
3969 |
|
3970 { |
|
3971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3972 symbol_c *IN_param_value = &this->default_variable_name; |
|
3973 |
|
3974 symbol_c *IN_type_symbol = param_data_type; |
|
3975 last_type_symbol = param_data_type; |
|
3976 |
|
3977 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
3978 { |
|
3979 |
|
3980 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3981 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
3982 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3983 function_type_prefix = return_type_symbol; |
|
3984 break; |
|
3985 |
|
3986 } |
|
3987 |
|
3988 |
|
3989 ERROR; |
|
3990 } |
|
3991 |
|
3992 }/*function_tod_to_real*/ |
|
3993 break; |
|
3994 |
|
3995 /**** |
|
3996 *TOD_TO_SINT |
|
3997 */ |
|
3998 case function_tod_to_sint : |
|
3999 { |
|
4000 symbol_c *last_type_symbol = NULL; |
|
4001 |
|
4002 { |
|
4003 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4004 symbol_c *IN_param_value = &this->default_variable_name; |
|
4005 |
|
4006 symbol_c *IN_type_symbol = param_data_type; |
|
4007 last_type_symbol = param_data_type; |
|
4008 |
|
4009 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4010 { |
|
4011 |
|
4012 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4013 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4014 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4015 function_type_prefix = return_type_symbol; |
|
4016 break; |
|
4017 |
|
4018 } |
|
4019 |
|
4020 |
|
4021 ERROR; |
|
4022 } |
|
4023 |
|
4024 }/*function_tod_to_sint*/ |
|
4025 break; |
|
4026 |
|
4027 /**** |
|
4028 *TOD_TO_LINT |
|
4029 */ |
|
4030 case function_tod_to_lint : |
|
4031 { |
|
4032 symbol_c *last_type_symbol = NULL; |
|
4033 |
|
4034 { |
|
4035 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4036 symbol_c *IN_param_value = &this->default_variable_name; |
|
4037 |
|
4038 symbol_c *IN_type_symbol = param_data_type; |
|
4039 last_type_symbol = param_data_type; |
|
4040 |
|
4041 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4042 { |
|
4043 |
|
4044 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4045 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4046 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4047 function_type_prefix = return_type_symbol; |
|
4048 break; |
|
4049 |
|
4050 } |
|
4051 |
|
4052 |
|
4053 ERROR; |
|
4054 } |
|
4055 |
|
4056 }/*function_tod_to_lint*/ |
|
4057 break; |
|
4058 |
|
4059 /**** |
|
4060 *TOD_TO_DINT |
|
4061 */ |
|
4062 case function_tod_to_dint : |
|
4063 { |
|
4064 symbol_c *last_type_symbol = NULL; |
|
4065 |
|
4066 { |
|
4067 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4068 symbol_c *IN_param_value = &this->default_variable_name; |
|
4069 |
|
4070 symbol_c *IN_type_symbol = param_data_type; |
|
4071 last_type_symbol = param_data_type; |
|
4072 |
|
4073 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4074 { |
|
4075 |
|
4076 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4077 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4078 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4079 function_type_prefix = return_type_symbol; |
|
4080 break; |
|
4081 |
|
4082 } |
|
4083 |
|
4084 |
|
4085 ERROR; |
|
4086 } |
|
4087 |
|
4088 }/*function_tod_to_dint*/ |
|
4089 break; |
|
4090 |
|
4091 /**** |
|
4092 *TOD_TO_DWORD |
|
4093 */ |
|
4094 case function_tod_to_dword : |
|
4095 { |
|
4096 symbol_c *last_type_symbol = NULL; |
|
4097 |
|
4098 { |
|
4099 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4100 symbol_c *IN_param_value = &this->default_variable_name; |
|
4101 |
|
4102 symbol_c *IN_type_symbol = param_data_type; |
|
4103 last_type_symbol = param_data_type; |
|
4104 |
|
4105 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4106 { |
|
4107 |
|
4108 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4109 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4110 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4111 function_type_prefix = return_type_symbol; |
|
4112 break; |
|
4113 |
|
4114 } |
|
4115 |
|
4116 |
|
4117 ERROR; |
|
4118 } |
|
4119 |
|
4120 }/*function_tod_to_dword*/ |
|
4121 break; |
|
4122 |
|
4123 /**** |
|
4124 *TOD_TO_UDINT |
|
4125 */ |
|
4126 case function_tod_to_udint : |
|
4127 { |
|
4128 symbol_c *last_type_symbol = NULL; |
|
4129 |
|
4130 { |
|
4131 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4132 symbol_c *IN_param_value = &this->default_variable_name; |
|
4133 |
|
4134 symbol_c *IN_type_symbol = param_data_type; |
|
4135 last_type_symbol = param_data_type; |
|
4136 |
|
4137 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4138 { |
|
4139 |
|
4140 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4141 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4142 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
4143 function_type_prefix = return_type_symbol; |
|
4144 break; |
|
4145 |
|
4146 } |
|
4147 |
|
4148 |
|
4149 ERROR; |
|
4150 } |
|
4151 |
|
4152 }/*function_tod_to_udint*/ |
|
4153 break; |
|
4154 |
|
4155 /**** |
|
4156 *TOD_TO_WORD |
|
4157 */ |
|
4158 case function_tod_to_word : |
|
4159 { |
|
4160 symbol_c *last_type_symbol = NULL; |
|
4161 |
|
4162 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4170 { |
|
4171 |
|
4172 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4173 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4174 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4175 function_type_prefix = return_type_symbol; |
|
4176 break; |
|
4177 |
|
4178 } |
|
4179 |
|
4180 |
|
4181 ERROR; |
|
4182 } |
|
4183 |
|
4184 }/*function_tod_to_word*/ |
|
4185 break; |
|
4186 |
|
4187 /**** |
|
4188 *TOD_TO_STRING |
|
4189 */ |
|
4190 case function_tod_to_string : |
|
4191 { |
|
4192 symbol_c *last_type_symbol = NULL; |
|
4193 |
|
4194 { |
|
4195 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4196 symbol_c *IN_param_value = &this->default_variable_name; |
|
4197 |
|
4198 symbol_c *IN_type_symbol = param_data_type; |
|
4199 last_type_symbol = param_data_type; |
|
4200 |
|
4201 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4202 { |
|
4203 |
|
4204 function_name = (symbol_c*)(new pragma_c("__tod_to_string")); |
|
4205 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4206 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4207 function_type_prefix = return_type_symbol; |
|
4208 break; |
|
4209 |
|
4210 } |
|
4211 |
|
4212 |
|
4213 ERROR; |
|
4214 } |
|
4215 |
|
4216 }/*function_tod_to_string*/ |
|
4217 break; |
|
4218 |
|
4219 /**** |
|
4220 *TOD_TO_LWORD |
|
4221 */ |
|
4222 case function_tod_to_lword : |
|
4223 { |
|
4224 symbol_c *last_type_symbol = NULL; |
|
4225 |
|
4226 { |
|
4227 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4228 symbol_c *IN_param_value = &this->default_variable_name; |
|
4229 |
|
4230 symbol_c *IN_type_symbol = param_data_type; |
|
4231 last_type_symbol = param_data_type; |
|
4232 |
|
4233 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4234 { |
|
4235 |
|
4236 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4237 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4238 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4239 function_type_prefix = return_type_symbol; |
|
4240 break; |
|
4241 |
|
4242 } |
|
4243 |
|
4244 |
|
4245 ERROR; |
|
4246 } |
|
4247 |
|
4248 }/*function_tod_to_lword*/ |
|
4249 break; |
|
4250 |
|
4251 /**** |
|
4252 *TOD_TO_UINT |
|
4253 */ |
|
4254 case function_tod_to_uint : |
|
4255 { |
|
4256 symbol_c *last_type_symbol = NULL; |
|
4257 |
|
4258 { |
|
4259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4260 symbol_c *IN_param_value = &this->default_variable_name; |
|
4261 |
|
4262 symbol_c *IN_type_symbol = param_data_type; |
|
4263 last_type_symbol = param_data_type; |
|
4264 |
|
4265 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4266 { |
|
4267 |
|
4268 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4269 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4270 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4271 function_type_prefix = return_type_symbol; |
|
4272 break; |
|
4273 |
|
4274 } |
|
4275 |
|
4276 |
|
4277 ERROR; |
|
4278 } |
|
4279 |
|
4280 }/*function_tod_to_uint*/ |
|
4281 break; |
|
4282 |
|
4283 /**** |
|
4284 *TOD_TO_LREAL |
|
4285 */ |
|
4286 case function_tod_to_lreal : |
|
4287 { |
|
4288 symbol_c *last_type_symbol = NULL; |
|
4289 |
|
4290 { |
|
4291 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4292 symbol_c *IN_param_value = &this->default_variable_name; |
|
4293 |
|
4294 symbol_c *IN_type_symbol = param_data_type; |
|
4295 last_type_symbol = param_data_type; |
|
4296 |
|
4297 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4298 { |
|
4299 |
|
4300 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4301 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4302 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4303 function_type_prefix = return_type_symbol; |
|
4304 break; |
|
4305 |
|
4306 } |
|
4307 |
|
4308 |
|
4309 ERROR; |
|
4310 } |
|
4311 |
|
4312 }/*function_tod_to_lreal*/ |
|
4313 break; |
|
4314 |
|
4315 /**** |
|
4316 *TOD_TO_BYTE |
|
4317 */ |
|
4318 case function_tod_to_byte : |
|
4319 { |
|
4320 symbol_c *last_type_symbol = NULL; |
|
4321 |
|
4322 { |
|
4323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4324 symbol_c *IN_param_value = &this->default_variable_name; |
|
4325 |
|
4326 symbol_c *IN_type_symbol = param_data_type; |
|
4327 last_type_symbol = param_data_type; |
|
4328 |
|
4329 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4330 { |
|
4331 |
|
4332 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4333 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4334 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4335 function_type_prefix = return_type_symbol; |
|
4336 break; |
|
4337 |
|
4338 } |
|
4339 |
|
4340 |
|
4341 ERROR; |
|
4342 } |
|
4343 |
|
4344 }/*function_tod_to_byte*/ |
|
4345 break; |
|
4346 |
|
4347 /**** |
|
4348 *TOD_TO_USINT |
|
4349 */ |
|
4350 case function_tod_to_usint : |
|
4351 { |
|
4352 symbol_c *last_type_symbol = NULL; |
|
4353 |
|
4354 { |
|
4355 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4356 symbol_c *IN_param_value = &this->default_variable_name; |
|
4357 |
|
4358 symbol_c *IN_type_symbol = param_data_type; |
|
4359 last_type_symbol = param_data_type; |
|
4360 |
|
4361 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4362 { |
|
4363 |
|
4364 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4365 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4366 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4367 function_type_prefix = return_type_symbol; |
|
4368 break; |
|
4369 |
|
4370 } |
|
4371 |
|
4372 |
|
4373 ERROR; |
|
4374 } |
|
4375 |
|
4376 }/*function_tod_to_usint*/ |
|
4377 break; |
|
4378 |
|
4379 /**** |
|
4380 *TOD_TO_ULINT |
|
4381 */ |
|
4382 case function_tod_to_ulint : |
|
4383 { |
|
4384 symbol_c *last_type_symbol = NULL; |
|
4385 |
|
4386 { |
|
4387 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4388 symbol_c *IN_param_value = &this->default_variable_name; |
|
4389 |
|
4390 symbol_c *IN_type_symbol = param_data_type; |
|
4391 last_type_symbol = param_data_type; |
|
4392 |
|
4393 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4394 { |
|
4395 |
|
4396 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4397 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4398 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4399 function_type_prefix = return_type_symbol; |
|
4400 break; |
|
4401 |
|
4402 } |
|
4403 |
|
4404 |
|
4405 ERROR; |
|
4406 } |
|
4407 |
|
4408 }/*function_tod_to_ulint*/ |
|
4409 break; |
|
4410 |
|
4411 /**** |
|
4412 *TOD_TO_INT |
|
4413 */ |
|
4414 case function_tod_to_int : |
|
4415 { |
|
4416 symbol_c *last_type_symbol = NULL; |
|
4417 |
|
4418 { |
|
4419 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4420 symbol_c *IN_param_value = &this->default_variable_name; |
|
4421 |
|
4422 symbol_c *IN_type_symbol = param_data_type; |
|
4423 last_type_symbol = param_data_type; |
|
4424 |
|
4425 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
4426 { |
|
4427 |
|
4428 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4429 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4430 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4431 function_type_prefix = return_type_symbol; |
|
4432 break; |
|
4433 |
|
4434 } |
|
4435 |
|
4436 |
|
4437 ERROR; |
|
4438 } |
|
4439 |
|
4440 }/*function_tod_to_int*/ |
|
4441 break; |
|
4442 |
|
4443 /**** |
|
4444 *UDINT_TO_REAL |
|
4445 */ |
|
4446 case function_udint_to_real : |
|
4447 { |
|
4448 symbol_c *last_type_symbol = NULL; |
|
4449 |
|
4450 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4458 { |
|
4459 |
|
4460 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4461 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4462 function_type_prefix = return_type_symbol; |
|
4463 break; |
|
4464 |
|
4465 } |
|
4466 |
|
4467 |
|
4468 ERROR; |
|
4469 } |
|
4470 |
|
4471 }/*function_udint_to_real*/ |
|
4472 break; |
|
4473 |
|
4474 /**** |
|
4475 *UDINT_TO_SINT |
|
4476 */ |
|
4477 case function_udint_to_sint : |
|
4478 { |
|
4479 symbol_c *last_type_symbol = NULL; |
|
4480 |
|
4481 { |
|
4482 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4483 symbol_c *IN_param_value = &this->default_variable_name; |
|
4484 |
|
4485 symbol_c *IN_type_symbol = param_data_type; |
|
4486 last_type_symbol = param_data_type; |
|
4487 |
|
4488 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4489 { |
|
4490 |
|
4491 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4492 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4493 function_type_prefix = return_type_symbol; |
|
4494 break; |
|
4495 |
|
4496 } |
|
4497 |
|
4498 |
|
4499 ERROR; |
|
4500 } |
|
4501 |
|
4502 }/*function_udint_to_sint*/ |
|
4503 break; |
|
4504 |
|
4505 /**** |
|
4506 *UDINT_TO_LINT |
|
4507 */ |
|
4508 case function_udint_to_lint : |
|
4509 { |
|
4510 symbol_c *last_type_symbol = NULL; |
|
4511 |
|
4512 { |
|
4513 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4514 symbol_c *IN_param_value = &this->default_variable_name; |
|
4515 |
|
4516 symbol_c *IN_type_symbol = param_data_type; |
|
4517 last_type_symbol = param_data_type; |
|
4518 |
|
4519 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4520 { |
|
4521 |
|
4522 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4523 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4524 function_type_prefix = return_type_symbol; |
|
4525 break; |
|
4526 |
|
4527 } |
|
4528 |
|
4529 |
|
4530 ERROR; |
|
4531 } |
|
4532 |
|
4533 }/*function_udint_to_lint*/ |
|
4534 break; |
|
4535 |
|
4536 /**** |
|
4537 *UDINT_TO_DINT |
|
4538 */ |
|
4539 case function_udint_to_dint : |
|
4540 { |
|
4541 symbol_c *last_type_symbol = NULL; |
|
4542 |
|
4543 { |
|
4544 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4545 symbol_c *IN_param_value = &this->default_variable_name; |
|
4546 |
|
4547 symbol_c *IN_type_symbol = param_data_type; |
|
4548 last_type_symbol = param_data_type; |
|
4549 |
|
4550 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4551 { |
|
4552 |
|
4553 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4554 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4555 function_type_prefix = return_type_symbol; |
|
4556 break; |
|
4557 |
|
4558 } |
|
4559 |
|
4560 |
|
4561 ERROR; |
|
4562 } |
|
4563 |
|
4564 }/*function_udint_to_dint*/ |
|
4565 break; |
|
4566 |
|
4567 /**** |
|
4568 *UDINT_TO_DATE |
|
4569 */ |
|
4570 case function_udint_to_date : |
|
4571 { |
|
4572 symbol_c *last_type_symbol = NULL; |
|
4573 |
|
4574 { |
|
4575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4576 symbol_c *IN_param_value = &this->default_variable_name; |
|
4577 |
|
4578 symbol_c *IN_type_symbol = param_data_type; |
|
4579 last_type_symbol = param_data_type; |
|
4580 |
|
4581 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4582 { |
|
4583 |
|
4584 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4585 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4586 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
4587 function_type_prefix = return_type_symbol; |
|
4588 break; |
|
4589 |
|
4590 } |
|
4591 |
|
4592 |
|
4593 ERROR; |
|
4594 } |
|
4595 |
|
4596 }/*function_udint_to_date*/ |
|
4597 break; |
|
4598 |
|
4599 /**** |
|
4600 *UDINT_TO_DWORD |
|
4601 */ |
|
4602 case function_udint_to_dword : |
|
4603 { |
|
4604 symbol_c *last_type_symbol = NULL; |
|
4605 |
|
4606 { |
|
4607 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4608 symbol_c *IN_param_value = &this->default_variable_name; |
|
4609 |
|
4610 symbol_c *IN_type_symbol = param_data_type; |
|
4611 last_type_symbol = param_data_type; |
|
4612 |
|
4613 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4614 { |
|
4615 |
|
4616 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4617 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4618 function_type_prefix = return_type_symbol; |
|
4619 break; |
|
4620 |
|
4621 } |
|
4622 |
|
4623 |
|
4624 ERROR; |
|
4625 } |
|
4626 |
|
4627 }/*function_udint_to_dword*/ |
|
4628 break; |
|
4629 |
|
4630 /**** |
|
4631 *UDINT_TO_DT |
|
4632 */ |
|
4633 case function_udint_to_dt : |
|
4634 { |
|
4635 symbol_c *last_type_symbol = NULL; |
|
4636 |
|
4637 { |
|
4638 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4639 symbol_c *IN_param_value = &this->default_variable_name; |
|
4640 |
|
4641 symbol_c *IN_type_symbol = param_data_type; |
|
4642 last_type_symbol = param_data_type; |
|
4643 |
|
4644 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4645 { |
|
4646 |
|
4647 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4648 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4649 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
4650 function_type_prefix = return_type_symbol; |
|
4651 break; |
|
4652 |
|
4653 } |
|
4654 |
|
4655 |
|
4656 ERROR; |
|
4657 } |
|
4658 |
|
4659 }/*function_udint_to_dt*/ |
|
4660 break; |
|
4661 |
|
4662 /**** |
|
4663 *UDINT_TO_TOD |
|
4664 */ |
|
4665 case function_udint_to_tod : |
|
4666 { |
|
4667 symbol_c *last_type_symbol = NULL; |
|
4668 |
|
4669 { |
|
4670 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4671 symbol_c *IN_param_value = &this->default_variable_name; |
|
4672 |
|
4673 symbol_c *IN_type_symbol = param_data_type; |
|
4674 last_type_symbol = param_data_type; |
|
4675 |
|
4676 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4677 { |
|
4678 |
|
4679 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4680 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4681 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
4682 function_type_prefix = return_type_symbol; |
|
4683 break; |
|
4684 |
|
4685 } |
|
4686 |
|
4687 |
|
4688 ERROR; |
|
4689 } |
|
4690 |
|
4691 }/*function_udint_to_tod*/ |
|
4692 break; |
|
4693 |
|
4694 /**** |
|
4695 *UDINT_TO_WORD |
|
4696 */ |
|
4697 case function_udint_to_word : |
|
4698 { |
|
4699 symbol_c *last_type_symbol = NULL; |
|
4700 |
|
4701 { |
|
4702 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4703 symbol_c *IN_param_value = &this->default_variable_name; |
|
4704 |
|
4705 symbol_c *IN_type_symbol = param_data_type; |
|
4706 last_type_symbol = param_data_type; |
|
4707 |
|
4708 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4709 { |
|
4710 |
|
4711 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4712 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4713 function_type_prefix = return_type_symbol; |
|
4714 break; |
|
4715 |
|
4716 } |
|
4717 |
|
4718 |
|
4719 ERROR; |
|
4720 } |
|
4721 |
|
4722 }/*function_udint_to_word*/ |
|
4723 break; |
|
4724 |
|
4725 /**** |
|
4726 *UDINT_TO_STRING |
|
4727 */ |
|
4728 case function_udint_to_string : |
|
4729 { |
|
4730 symbol_c *last_type_symbol = NULL; |
|
4731 |
|
4732 { |
|
4733 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4734 symbol_c *IN_param_value = &this->default_variable_name; |
|
4735 |
|
4736 symbol_c *IN_type_symbol = param_data_type; |
|
4737 last_type_symbol = param_data_type; |
|
4738 |
|
4739 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4740 { |
|
4741 |
|
4742 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
4743 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4744 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4745 function_type_prefix = return_type_symbol; |
|
4746 break; |
|
4747 |
|
4748 } |
|
4749 |
|
4750 |
|
4751 ERROR; |
|
4752 } |
|
4753 |
|
4754 }/*function_udint_to_string*/ |
|
4755 break; |
|
4756 |
|
4757 /**** |
|
4758 *UDINT_TO_LWORD |
|
4759 */ |
|
4760 case function_udint_to_lword : |
|
4761 { |
|
4762 symbol_c *last_type_symbol = NULL; |
|
4763 |
|
4764 { |
|
4765 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4766 symbol_c *IN_param_value = &this->default_variable_name; |
|
4767 |
|
4768 symbol_c *IN_type_symbol = param_data_type; |
|
4769 last_type_symbol = param_data_type; |
|
4770 |
|
4771 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4772 { |
|
4773 |
|
4774 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4775 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4776 function_type_prefix = return_type_symbol; |
|
4777 break; |
|
4778 |
|
4779 } |
|
4780 |
|
4781 |
|
4782 ERROR; |
|
4783 } |
|
4784 |
|
4785 }/*function_udint_to_lword*/ |
|
4786 break; |
|
4787 |
|
4788 /**** |
|
4789 *UDINT_TO_UINT |
|
4790 */ |
|
4791 case function_udint_to_uint : |
|
4792 { |
|
4793 symbol_c *last_type_symbol = NULL; |
|
4794 |
|
4795 { |
|
4796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4797 symbol_c *IN_param_value = &this->default_variable_name; |
|
4798 |
|
4799 symbol_c *IN_type_symbol = param_data_type; |
|
4800 last_type_symbol = param_data_type; |
|
4801 |
|
4802 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4803 { |
|
4804 |
|
4805 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4806 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4807 function_type_prefix = return_type_symbol; |
|
4808 break; |
|
4809 |
|
4810 } |
|
4811 |
|
4812 |
|
4813 ERROR; |
|
4814 } |
|
4815 |
|
4816 }/*function_udint_to_uint*/ |
|
4817 break; |
|
4818 |
|
4819 /**** |
|
4820 *UDINT_TO_LREAL |
|
4821 */ |
|
4822 case function_udint_to_lreal : |
|
4823 { |
|
4824 symbol_c *last_type_symbol = NULL; |
|
4825 |
|
4826 { |
|
4827 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4828 symbol_c *IN_param_value = &this->default_variable_name; |
|
4829 |
|
4830 symbol_c *IN_type_symbol = param_data_type; |
|
4831 last_type_symbol = param_data_type; |
|
4832 |
|
4833 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4834 { |
|
4835 |
|
4836 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4837 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4838 function_type_prefix = return_type_symbol; |
|
4839 break; |
|
4840 |
|
4841 } |
|
4842 |
|
4843 |
|
4844 ERROR; |
|
4845 } |
|
4846 |
|
4847 }/*function_udint_to_lreal*/ |
|
4848 break; |
|
4849 |
|
4850 /**** |
|
4851 *UDINT_TO_BYTE |
|
4852 */ |
|
4853 case function_udint_to_byte : |
|
4854 { |
|
4855 symbol_c *last_type_symbol = NULL; |
|
4856 |
|
4857 { |
|
4858 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4859 symbol_c *IN_param_value = &this->default_variable_name; |
|
4860 |
|
4861 symbol_c *IN_type_symbol = param_data_type; |
|
4862 last_type_symbol = param_data_type; |
|
4863 |
|
4864 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4865 { |
|
4866 |
|
4867 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4868 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4869 function_type_prefix = return_type_symbol; |
|
4870 break; |
|
4871 |
|
4872 } |
|
4873 |
|
4874 |
|
4875 ERROR; |
|
4876 } |
|
4877 |
|
4878 }/*function_udint_to_byte*/ |
|
4879 break; |
|
4880 |
|
4881 /**** |
|
4882 *UDINT_TO_USINT |
|
4883 */ |
|
4884 case function_udint_to_usint : |
|
4885 { |
|
4886 symbol_c *last_type_symbol = NULL; |
|
4887 |
|
4888 { |
|
4889 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4890 symbol_c *IN_param_value = &this->default_variable_name; |
|
4891 |
|
4892 symbol_c *IN_type_symbol = param_data_type; |
|
4893 last_type_symbol = param_data_type; |
|
4894 |
|
4895 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4896 { |
|
4897 |
|
4898 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4899 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4900 function_type_prefix = return_type_symbol; |
|
4901 break; |
|
4902 |
|
4903 } |
|
4904 |
|
4905 |
|
4906 ERROR; |
|
4907 } |
|
4908 |
|
4909 }/*function_udint_to_usint*/ |
|
4910 break; |
|
4911 |
|
4912 /**** |
|
4913 *UDINT_TO_ULINT |
|
4914 */ |
|
4915 case function_udint_to_ulint : |
|
4916 { |
|
4917 symbol_c *last_type_symbol = NULL; |
|
4918 |
|
4919 { |
|
4920 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4921 symbol_c *IN_param_value = &this->default_variable_name; |
|
4922 |
|
4923 symbol_c *IN_type_symbol = param_data_type; |
|
4924 last_type_symbol = param_data_type; |
|
4925 |
|
4926 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4927 { |
|
4928 |
|
4929 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4930 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4931 function_type_prefix = return_type_symbol; |
|
4932 break; |
|
4933 |
|
4934 } |
|
4935 |
|
4936 |
|
4937 ERROR; |
|
4938 } |
|
4939 |
|
4940 }/*function_udint_to_ulint*/ |
|
4941 break; |
|
4942 |
|
4943 /**** |
|
4944 *UDINT_TO_BOOL |
|
4945 */ |
|
4946 case function_udint_to_bool : |
|
4947 { |
|
4948 symbol_c *last_type_symbol = NULL; |
|
4949 |
|
4950 { |
|
4951 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4952 symbol_c *IN_param_value = &this->default_variable_name; |
|
4953 |
|
4954 symbol_c *IN_type_symbol = param_data_type; |
|
4955 last_type_symbol = param_data_type; |
|
4956 |
|
4957 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4958 { |
|
4959 |
|
4960 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4961 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
4962 function_type_prefix = return_type_symbol; |
|
4963 break; |
|
4964 |
|
4965 } |
|
4966 |
|
4967 |
|
4968 ERROR; |
|
4969 } |
|
4970 |
|
4971 }/*function_udint_to_bool*/ |
|
4972 break; |
|
4973 |
|
4974 /**** |
|
4975 *UDINT_TO_TIME |
|
4976 */ |
|
4977 case function_udint_to_time : |
|
4978 { |
|
4979 symbol_c *last_type_symbol = NULL; |
|
4980 |
|
4981 { |
|
4982 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4983 symbol_c *IN_param_value = &this->default_variable_name; |
|
4984 |
|
4985 symbol_c *IN_type_symbol = param_data_type; |
|
4986 last_type_symbol = param_data_type; |
|
4987 |
|
4988 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4989 { |
|
4990 |
|
4991 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4992 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
4993 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
4994 function_type_prefix = return_type_symbol; |
|
4995 break; |
|
4996 |
|
4997 } |
|
4998 |
|
4999 |
|
5000 ERROR; |
|
5001 } |
|
5002 |
|
5003 }/*function_udint_to_time*/ |
|
5004 break; |
|
5005 |
|
5006 /**** |
|
5007 *UDINT_TO_INT |
|
5008 */ |
|
5009 case function_udint_to_int : |
|
5010 { |
|
5011 symbol_c *last_type_symbol = NULL; |
|
5012 |
|
5013 { |
|
5014 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5015 symbol_c *IN_param_value = &this->default_variable_name; |
|
5016 |
|
5017 symbol_c *IN_type_symbol = param_data_type; |
|
5018 last_type_symbol = param_data_type; |
|
5019 |
|
5020 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5021 { |
|
5022 |
|
5023 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5024 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5025 function_type_prefix = return_type_symbol; |
|
5026 break; |
|
5027 |
|
5028 } |
|
5029 |
|
5030 |
|
5031 ERROR; |
|
5032 } |
|
5033 |
|
5034 }/*function_udint_to_int*/ |
|
5035 break; |
|
5036 |
|
5037 /**** |
|
5038 *WORD_TO_REAL |
|
5039 */ |
|
5040 case function_word_to_real : |
|
5041 { |
|
5042 symbol_c *last_type_symbol = NULL; |
|
5043 |
|
5044 { |
|
5045 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5046 symbol_c *IN_param_value = &this->default_variable_name; |
|
5047 |
|
5048 symbol_c *IN_type_symbol = param_data_type; |
|
5049 last_type_symbol = param_data_type; |
|
5050 |
|
5051 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5052 { |
|
5053 |
|
5054 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5055 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5056 function_type_prefix = return_type_symbol; |
|
5057 break; |
|
5058 |
|
5059 } |
|
5060 |
|
5061 |
|
5062 ERROR; |
|
5063 } |
|
5064 |
|
5065 }/*function_word_to_real*/ |
|
5066 break; |
|
5067 |
|
5068 /**** |
|
5069 *WORD_TO_SINT |
|
5070 */ |
|
5071 case function_word_to_sint : |
|
5072 { |
|
5073 symbol_c *last_type_symbol = NULL; |
|
5074 |
|
5075 { |
|
5076 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5077 symbol_c *IN_param_value = &this->default_variable_name; |
|
5078 |
|
5079 symbol_c *IN_type_symbol = param_data_type; |
|
5080 last_type_symbol = param_data_type; |
|
5081 |
|
5082 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5083 { |
|
5084 |
|
5085 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5086 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5087 function_type_prefix = return_type_symbol; |
|
5088 break; |
|
5089 |
|
5090 } |
|
5091 |
|
5092 |
|
5093 ERROR; |
|
5094 } |
|
5095 |
|
5096 }/*function_word_to_sint*/ |
|
5097 break; |
|
5098 |
|
5099 /**** |
|
5100 *WORD_TO_LINT |
|
5101 */ |
|
5102 case function_word_to_lint : |
|
5103 { |
|
5104 symbol_c *last_type_symbol = NULL; |
|
5105 |
|
5106 { |
|
5107 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5108 symbol_c *IN_param_value = &this->default_variable_name; |
|
5109 |
|
5110 symbol_c *IN_type_symbol = param_data_type; |
|
5111 last_type_symbol = param_data_type; |
|
5112 |
|
5113 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5114 { |
|
5115 |
|
5116 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5117 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5118 function_type_prefix = return_type_symbol; |
|
5119 break; |
|
5120 |
|
5121 } |
|
5122 |
|
5123 |
|
5124 ERROR; |
|
5125 } |
|
5126 |
|
5127 }/*function_word_to_lint*/ |
|
5128 break; |
|
5129 |
|
5130 /**** |
|
5131 *WORD_TO_DINT |
|
5132 */ |
|
5133 case function_word_to_dint : |
|
5134 { |
|
5135 symbol_c *last_type_symbol = NULL; |
|
5136 |
|
5137 { |
|
5138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5139 symbol_c *IN_param_value = &this->default_variable_name; |
|
5140 |
|
5141 symbol_c *IN_type_symbol = param_data_type; |
|
5142 last_type_symbol = param_data_type; |
|
5143 |
|
5144 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5145 { |
|
5146 |
|
5147 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5148 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5149 function_type_prefix = return_type_symbol; |
|
5150 break; |
|
5151 |
|
5152 } |
|
5153 |
|
5154 |
|
5155 ERROR; |
|
5156 } |
|
5157 |
|
5158 }/*function_word_to_dint*/ |
|
5159 break; |
|
5160 |
|
5161 /**** |
|
5162 *WORD_TO_DATE |
|
5163 */ |
|
5164 case function_word_to_date : |
|
5165 { |
|
5166 symbol_c *last_type_symbol = NULL; |
|
5167 |
|
5168 { |
|
5169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5170 symbol_c *IN_param_value = &this->default_variable_name; |
|
5171 |
|
5172 symbol_c *IN_type_symbol = param_data_type; |
|
5173 last_type_symbol = param_data_type; |
|
5174 |
|
5175 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5176 { |
|
5177 |
|
5178 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5179 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5180 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5181 function_type_prefix = return_type_symbol; |
|
5182 break; |
|
5183 |
|
5184 } |
|
5185 |
|
5186 |
|
5187 ERROR; |
|
5188 } |
|
5189 |
|
5190 }/*function_word_to_date*/ |
|
5191 break; |
|
5192 |
|
5193 /**** |
|
5194 *WORD_TO_DWORD |
|
5195 */ |
|
5196 case function_word_to_dword : |
|
5197 { |
|
5198 symbol_c *last_type_symbol = NULL; |
|
5199 |
|
5200 { |
|
5201 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5202 symbol_c *IN_param_value = &this->default_variable_name; |
|
5203 |
|
5204 symbol_c *IN_type_symbol = param_data_type; |
|
5205 last_type_symbol = param_data_type; |
|
5206 |
|
5207 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5208 { |
|
5209 |
|
5210 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5211 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5212 function_type_prefix = return_type_symbol; |
|
5213 break; |
|
5214 |
|
5215 } |
|
5216 |
|
5217 |
|
5218 ERROR; |
|
5219 } |
|
5220 |
|
5221 }/*function_word_to_dword*/ |
|
5222 break; |
|
5223 |
|
5224 /**** |
|
5225 *WORD_TO_DT |
|
5226 */ |
|
5227 case function_word_to_dt : |
|
5228 { |
|
5229 symbol_c *last_type_symbol = NULL; |
|
5230 |
|
5231 { |
|
5232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5233 symbol_c *IN_param_value = &this->default_variable_name; |
|
5234 |
|
5235 symbol_c *IN_type_symbol = param_data_type; |
|
5236 last_type_symbol = param_data_type; |
|
5237 |
|
5238 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5239 { |
|
5240 |
|
5241 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5242 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5243 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5244 function_type_prefix = return_type_symbol; |
|
5245 break; |
|
5246 |
|
5247 } |
|
5248 |
|
5249 |
|
5250 ERROR; |
|
5251 } |
|
5252 |
|
5253 }/*function_word_to_dt*/ |
|
5254 break; |
|
5255 |
|
5256 /**** |
|
5257 *WORD_TO_TOD |
|
5258 */ |
|
5259 case function_word_to_tod : |
|
5260 { |
|
5261 symbol_c *last_type_symbol = NULL; |
|
5262 |
|
5263 { |
|
5264 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5265 symbol_c *IN_param_value = &this->default_variable_name; |
|
5266 |
|
5267 symbol_c *IN_type_symbol = param_data_type; |
|
5268 last_type_symbol = param_data_type; |
|
5269 |
|
5270 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5271 { |
|
5272 |
|
5273 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5274 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5275 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5276 function_type_prefix = return_type_symbol; |
|
5277 break; |
|
5278 |
|
5279 } |
|
5280 |
|
5281 |
|
5282 ERROR; |
|
5283 } |
|
5284 |
|
5285 }/*function_word_to_tod*/ |
|
5286 break; |
|
5287 |
|
5288 /**** |
|
5289 *WORD_TO_UDINT |
|
5290 */ |
|
5291 case function_word_to_udint : |
|
5292 { |
|
5293 symbol_c *last_type_symbol = NULL; |
|
5294 |
|
5295 { |
|
5296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5297 symbol_c *IN_param_value = &this->default_variable_name; |
|
5298 |
|
5299 symbol_c *IN_type_symbol = param_data_type; |
|
5300 last_type_symbol = param_data_type; |
|
5301 |
|
5302 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5303 { |
|
5304 |
|
5305 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5306 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
5307 function_type_prefix = return_type_symbol; |
|
5308 break; |
|
5309 |
|
5310 } |
|
5311 |
|
5312 |
|
5313 ERROR; |
|
5314 } |
|
5315 |
|
5316 }/*function_word_to_udint*/ |
|
5317 break; |
|
5318 |
|
5319 /**** |
|
5320 *WORD_TO_STRING |
|
5321 */ |
|
5322 case function_word_to_string : |
|
5323 { |
|
5324 symbol_c *last_type_symbol = NULL; |
|
5325 |
|
5326 { |
|
5327 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5328 symbol_c *IN_param_value = &this->default_variable_name; |
|
5329 |
|
5330 symbol_c *IN_type_symbol = param_data_type; |
|
5331 last_type_symbol = param_data_type; |
|
5332 |
|
5333 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5334 { |
|
5335 |
|
5336 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
5337 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5338 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5339 function_type_prefix = return_type_symbol; |
|
5340 break; |
|
5341 |
|
5342 } |
|
5343 |
|
5344 |
|
5345 ERROR; |
|
5346 } |
|
5347 |
|
5348 }/*function_word_to_string*/ |
|
5349 break; |
|
5350 |
|
5351 /**** |
|
5352 *WORD_TO_LWORD |
|
5353 */ |
|
5354 case function_word_to_lword : |
|
5355 { |
|
5356 symbol_c *last_type_symbol = NULL; |
|
5357 |
|
5358 { |
|
5359 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5360 symbol_c *IN_param_value = &this->default_variable_name; |
|
5361 |
|
5362 symbol_c *IN_type_symbol = param_data_type; |
|
5363 last_type_symbol = param_data_type; |
|
5364 |
|
5365 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5366 { |
|
5367 |
|
5368 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5369 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5370 function_type_prefix = return_type_symbol; |
|
5371 break; |
|
5372 |
|
5373 } |
|
5374 |
|
5375 |
|
5376 ERROR; |
|
5377 } |
|
5378 |
|
5379 }/*function_word_to_lword*/ |
|
5380 break; |
|
5381 |
|
5382 /**** |
|
5383 *WORD_TO_UINT |
|
5384 */ |
|
5385 case function_word_to_uint : |
|
5386 { |
|
5387 symbol_c *last_type_symbol = NULL; |
|
5388 |
|
5389 { |
|
5390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5391 symbol_c *IN_param_value = &this->default_variable_name; |
|
5392 |
|
5393 symbol_c *IN_type_symbol = param_data_type; |
|
5394 last_type_symbol = param_data_type; |
|
5395 |
|
5396 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5397 { |
|
5398 |
|
5399 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5400 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5401 function_type_prefix = return_type_symbol; |
|
5402 break; |
|
5403 |
|
5404 } |
|
5405 |
|
5406 |
|
5407 ERROR; |
|
5408 } |
|
5409 |
|
5410 }/*function_word_to_uint*/ |
|
5411 break; |
|
5412 |
|
5413 /**** |
|
5414 *WORD_TO_LREAL |
|
5415 */ |
|
5416 case function_word_to_lreal : |
|
5417 { |
|
5418 symbol_c *last_type_symbol = NULL; |
|
5419 |
|
5420 { |
|
5421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5422 symbol_c *IN_param_value = &this->default_variable_name; |
|
5423 |
|
5424 symbol_c *IN_type_symbol = param_data_type; |
|
5425 last_type_symbol = param_data_type; |
|
5426 |
|
5427 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5428 { |
|
5429 |
|
5430 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5431 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5432 function_type_prefix = return_type_symbol; |
|
5433 break; |
|
5434 |
|
5435 } |
|
5436 |
|
5437 |
|
5438 ERROR; |
|
5439 } |
|
5440 |
|
5441 }/*function_word_to_lreal*/ |
|
5442 break; |
|
5443 |
|
5444 /**** |
|
5445 *WORD_TO_BYTE |
|
5446 */ |
|
5447 case function_word_to_byte : |
|
5448 { |
|
5449 symbol_c *last_type_symbol = NULL; |
|
5450 |
|
5451 { |
|
5452 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5453 symbol_c *IN_param_value = &this->default_variable_name; |
|
5454 |
|
5455 symbol_c *IN_type_symbol = param_data_type; |
|
5456 last_type_symbol = param_data_type; |
|
5457 |
|
5458 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5459 { |
|
5460 |
|
5461 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5462 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5463 function_type_prefix = return_type_symbol; |
|
5464 break; |
|
5465 |
|
5466 } |
|
5467 |
|
5468 |
|
5469 ERROR; |
|
5470 } |
|
5471 |
|
5472 }/*function_word_to_byte*/ |
|
5473 break; |
|
5474 |
|
5475 /**** |
|
5476 *WORD_TO_USINT |
|
5477 */ |
|
5478 case function_word_to_usint : |
|
5479 { |
|
5480 symbol_c *last_type_symbol = NULL; |
|
5481 |
|
5482 { |
|
5483 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5484 symbol_c *IN_param_value = &this->default_variable_name; |
|
5485 |
|
5486 symbol_c *IN_type_symbol = param_data_type; |
|
5487 last_type_symbol = param_data_type; |
|
5488 |
|
5489 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5490 { |
|
5491 |
|
5492 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5493 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5494 function_type_prefix = return_type_symbol; |
|
5495 break; |
|
5496 |
|
5497 } |
|
5498 |
|
5499 |
|
5500 ERROR; |
|
5501 } |
|
5502 |
|
5503 }/*function_word_to_usint*/ |
|
5504 break; |
|
5505 |
|
5506 /**** |
|
5507 *WORD_TO_ULINT |
|
5508 */ |
|
5509 case function_word_to_ulint : |
|
5510 { |
|
5511 symbol_c *last_type_symbol = NULL; |
|
5512 |
|
5513 { |
|
5514 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5515 symbol_c *IN_param_value = &this->default_variable_name; |
|
5516 |
|
5517 symbol_c *IN_type_symbol = param_data_type; |
|
5518 last_type_symbol = param_data_type; |
|
5519 |
|
5520 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5521 { |
|
5522 |
|
5523 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5524 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5525 function_type_prefix = return_type_symbol; |
|
5526 break; |
|
5527 |
|
5528 } |
|
5529 |
|
5530 |
|
5531 ERROR; |
|
5532 } |
|
5533 |
|
5534 }/*function_word_to_ulint*/ |
|
5535 break; |
|
5536 |
|
5537 /**** |
|
5538 *WORD_TO_BOOL |
|
5539 */ |
|
5540 case function_word_to_bool : |
|
5541 { |
|
5542 symbol_c *last_type_symbol = NULL; |
|
5543 |
|
5544 { |
|
5545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5546 symbol_c *IN_param_value = &this->default_variable_name; |
|
5547 |
|
5548 symbol_c *IN_type_symbol = param_data_type; |
|
5549 last_type_symbol = param_data_type; |
|
5550 |
|
5551 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5552 { |
|
5553 |
|
5554 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5555 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
5556 function_type_prefix = return_type_symbol; |
|
5557 break; |
|
5558 |
|
5559 } |
|
5560 |
|
5561 |
|
5562 ERROR; |
|
5563 } |
|
5564 |
|
5565 }/*function_word_to_bool*/ |
|
5566 break; |
|
5567 |
|
5568 /**** |
|
5569 *WORD_TO_TIME |
|
5570 */ |
|
5571 case function_word_to_time : |
|
5572 { |
|
5573 symbol_c *last_type_symbol = NULL; |
|
5574 |
|
5575 { |
|
5576 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5577 symbol_c *IN_param_value = &this->default_variable_name; |
|
5578 |
|
5579 symbol_c *IN_type_symbol = param_data_type; |
|
5580 last_type_symbol = param_data_type; |
|
5581 |
|
5582 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5583 { |
|
5584 |
|
5585 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
5586 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5587 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5588 function_type_prefix = return_type_symbol; |
|
5589 break; |
|
5590 |
|
5591 } |
|
5592 |
|
5593 |
|
5594 ERROR; |
|
5595 } |
|
5596 |
|
5597 }/*function_word_to_time*/ |
|
5598 break; |
|
5599 |
|
5600 /**** |
|
5601 *WORD_TO_INT |
|
5602 */ |
|
5603 case function_word_to_int : |
|
5604 { |
|
5605 symbol_c *last_type_symbol = NULL; |
|
5606 |
|
5607 { |
|
5608 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5609 symbol_c *IN_param_value = &this->default_variable_name; |
|
5610 |
|
5611 symbol_c *IN_type_symbol = param_data_type; |
|
5612 last_type_symbol = param_data_type; |
|
5613 |
|
5614 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
5615 { |
|
5616 |
|
5617 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5618 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5619 function_type_prefix = return_type_symbol; |
|
5620 break; |
|
5621 |
|
5622 } |
|
5623 |
|
5624 |
|
5625 ERROR; |
|
5626 } |
|
5627 |
|
5628 }/*function_word_to_int*/ |
|
5629 break; |
|
5630 |
|
5631 /**** |
|
5632 *STRING_TO_REAL |
|
5633 */ |
|
5634 case function_string_to_real : |
|
5635 { |
|
5636 symbol_c *last_type_symbol = NULL; |
|
5637 |
|
5638 { |
|
5639 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5640 symbol_c *IN_param_value = &this->default_variable_name; |
|
5641 |
|
5642 symbol_c *IN_type_symbol = param_data_type; |
|
5643 last_type_symbol = param_data_type; |
|
5644 |
|
5645 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5646 { |
|
5647 |
|
5648 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
5649 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5650 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5651 function_type_prefix = return_type_symbol; |
|
5652 break; |
|
5653 |
|
5654 } |
|
5655 |
|
5656 |
|
5657 ERROR; |
|
5658 } |
|
5659 |
|
5660 }/*function_string_to_real*/ |
|
5661 break; |
|
5662 |
|
5663 /**** |
|
5664 *STRING_TO_SINT |
|
5665 */ |
|
5666 case function_string_to_sint : |
|
5667 { |
|
5668 symbol_c *last_type_symbol = NULL; |
|
5669 |
|
5670 { |
|
5671 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5672 symbol_c *IN_param_value = &this->default_variable_name; |
|
5673 |
|
5674 symbol_c *IN_type_symbol = param_data_type; |
|
5675 last_type_symbol = param_data_type; |
|
5676 |
|
5677 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5678 { |
|
5679 |
|
5680 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
5681 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5682 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5683 function_type_prefix = return_type_symbol; |
|
5684 break; |
|
5685 |
|
5686 } |
|
5687 |
|
5688 |
|
5689 ERROR; |
|
5690 } |
|
5691 |
|
5692 }/*function_string_to_sint*/ |
|
5693 break; |
|
5694 |
|
5695 /**** |
|
5696 *STRING_TO_LINT |
|
5697 */ |
|
5698 case function_string_to_lint : |
|
5699 { |
|
5700 symbol_c *last_type_symbol = NULL; |
|
5701 |
|
5702 { |
|
5703 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5704 symbol_c *IN_param_value = &this->default_variable_name; |
|
5705 |
|
5706 symbol_c *IN_type_symbol = param_data_type; |
|
5707 last_type_symbol = param_data_type; |
|
5708 |
|
5709 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5710 { |
|
5711 |
|
5712 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
5713 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5714 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5715 function_type_prefix = return_type_symbol; |
|
5716 break; |
|
5717 |
|
5718 } |
|
5719 |
|
5720 |
|
5721 ERROR; |
|
5722 } |
|
5723 |
|
5724 }/*function_string_to_lint*/ |
|
5725 break; |
|
5726 |
|
5727 /**** |
|
5728 *STRING_TO_DINT |
|
5729 */ |
|
5730 case function_string_to_dint : |
|
5731 { |
|
5732 symbol_c *last_type_symbol = NULL; |
|
5733 |
|
5734 { |
|
5735 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5736 symbol_c *IN_param_value = &this->default_variable_name; |
|
5737 |
|
5738 symbol_c *IN_type_symbol = param_data_type; |
|
5739 last_type_symbol = param_data_type; |
|
5740 |
|
5741 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5742 { |
|
5743 |
|
5744 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
5745 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5746 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5747 function_type_prefix = return_type_symbol; |
|
5748 break; |
|
5749 |
|
5750 } |
|
5751 |
|
5752 |
|
5753 ERROR; |
|
5754 } |
|
5755 |
|
5756 }/*function_string_to_dint*/ |
|
5757 break; |
|
5758 |
|
5759 /**** |
|
5760 *STRING_TO_DATE |
|
5761 */ |
|
5762 case function_string_to_date : |
|
5763 { |
|
5764 symbol_c *last_type_symbol = NULL; |
|
5765 |
|
5766 { |
|
5767 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5768 symbol_c *IN_param_value = &this->default_variable_name; |
|
5769 |
|
5770 symbol_c *IN_type_symbol = param_data_type; |
|
5771 last_type_symbol = param_data_type; |
|
5772 |
|
5773 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5774 { |
|
5775 |
|
5776 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
5777 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5778 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5779 function_type_prefix = return_type_symbol; |
|
5780 break; |
|
5781 |
|
5782 } |
|
5783 |
|
5784 |
|
5785 ERROR; |
|
5786 } |
|
5787 |
|
5788 }/*function_string_to_date*/ |
|
5789 break; |
|
5790 |
|
5791 /**** |
|
5792 *STRING_TO_DWORD |
|
5793 */ |
|
5794 case function_string_to_dword : |
|
5795 { |
|
5796 symbol_c *last_type_symbol = NULL; |
|
5797 |
|
5798 { |
|
5799 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5800 symbol_c *IN_param_value = &this->default_variable_name; |
|
5801 |
|
5802 symbol_c *IN_type_symbol = param_data_type; |
|
5803 last_type_symbol = param_data_type; |
|
5804 |
|
5805 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5806 { |
|
5807 |
|
5808 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
5809 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5810 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5811 function_type_prefix = return_type_symbol; |
|
5812 break; |
|
5813 |
|
5814 } |
|
5815 |
|
5816 |
|
5817 ERROR; |
|
5818 } |
|
5819 |
|
5820 }/*function_string_to_dword*/ |
|
5821 break; |
|
5822 |
|
5823 /**** |
|
5824 *STRING_TO_DT |
|
5825 */ |
|
5826 case function_string_to_dt : |
|
5827 { |
|
5828 symbol_c *last_type_symbol = NULL; |
|
5829 |
|
5830 { |
|
5831 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5832 symbol_c *IN_param_value = &this->default_variable_name; |
|
5833 |
|
5834 symbol_c *IN_type_symbol = param_data_type; |
|
5835 last_type_symbol = param_data_type; |
|
5836 |
|
5837 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5838 { |
|
5839 |
|
5840 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
5841 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5842 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5843 function_type_prefix = return_type_symbol; |
|
5844 break; |
|
5845 |
|
5846 } |
|
5847 |
|
5848 |
|
5849 ERROR; |
|
5850 } |
|
5851 |
|
5852 }/*function_string_to_dt*/ |
|
5853 break; |
|
5854 |
|
5855 /**** |
|
5856 *STRING_TO_TOD |
|
5857 */ |
|
5858 case function_string_to_tod : |
|
5859 { |
|
5860 symbol_c *last_type_symbol = NULL; |
|
5861 |
|
5862 { |
|
5863 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5864 symbol_c *IN_param_value = &this->default_variable_name; |
|
5865 |
|
5866 symbol_c *IN_type_symbol = param_data_type; |
|
5867 last_type_symbol = param_data_type; |
|
5868 |
|
5869 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5870 { |
|
5871 |
|
5872 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
5873 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5874 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5875 function_type_prefix = return_type_symbol; |
|
5876 break; |
|
5877 |
|
5878 } |
|
5879 |
|
5880 |
|
5881 ERROR; |
|
5882 } |
|
5883 |
|
5884 }/*function_string_to_tod*/ |
|
5885 break; |
|
5886 |
|
5887 /**** |
|
5888 *STRING_TO_UDINT |
|
5889 */ |
|
5890 case function_string_to_udint : |
|
5891 { |
|
5892 symbol_c *last_type_symbol = NULL; |
|
5893 |
|
5894 { |
|
5895 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5896 symbol_c *IN_param_value = &this->default_variable_name; |
|
5897 |
|
5898 symbol_c *IN_type_symbol = param_data_type; |
|
5899 last_type_symbol = param_data_type; |
|
5900 |
|
5901 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5902 { |
|
5903 |
|
5904 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
5905 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5906 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
5907 function_type_prefix = return_type_symbol; |
|
5908 break; |
|
5909 |
|
5910 } |
|
5911 |
|
5912 |
|
5913 ERROR; |
|
5914 } |
|
5915 |
|
5916 }/*function_string_to_udint*/ |
|
5917 break; |
|
5918 |
|
5919 /**** |
|
5920 *STRING_TO_WORD |
|
5921 */ |
|
5922 case function_string_to_word : |
|
5923 { |
|
5924 symbol_c *last_type_symbol = NULL; |
|
5925 |
|
5926 { |
|
5927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5928 symbol_c *IN_param_value = &this->default_variable_name; |
|
5929 |
|
5930 symbol_c *IN_type_symbol = param_data_type; |
|
5931 last_type_symbol = param_data_type; |
|
5932 |
|
5933 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5934 { |
|
5935 |
|
5936 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
5937 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5938 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
5939 function_type_prefix = return_type_symbol; |
|
5940 break; |
|
5941 |
|
5942 } |
|
5943 |
|
5944 |
|
5945 ERROR; |
|
5946 } |
|
5947 |
|
5948 }/*function_string_to_word*/ |
|
5949 break; |
|
5950 |
|
5951 /**** |
|
5952 *STRING_TO_LWORD |
|
5953 */ |
|
5954 case function_string_to_lword : |
|
5955 { |
|
5956 symbol_c *last_type_symbol = NULL; |
|
5957 |
|
5958 { |
|
5959 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5960 symbol_c *IN_param_value = &this->default_variable_name; |
|
5961 |
|
5962 symbol_c *IN_type_symbol = param_data_type; |
|
5963 last_type_symbol = param_data_type; |
|
5964 |
|
5965 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5966 { |
|
5967 |
|
5968 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
5969 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
5970 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5971 function_type_prefix = return_type_symbol; |
|
5972 break; |
|
5973 |
|
5974 } |
|
5975 |
|
5976 |
|
5977 ERROR; |
|
5978 } |
|
5979 |
|
5980 }/*function_string_to_lword*/ |
|
5981 break; |
|
5982 |
|
5983 /**** |
|
5984 *STRING_TO_UINT |
|
5985 */ |
|
5986 case function_string_to_uint : |
|
5987 { |
|
5988 symbol_c *last_type_symbol = NULL; |
|
5989 |
|
5990 { |
|
5991 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5992 symbol_c *IN_param_value = &this->default_variable_name; |
|
5993 |
|
5994 symbol_c *IN_type_symbol = param_data_type; |
|
5995 last_type_symbol = param_data_type; |
|
5996 |
|
5997 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
5998 { |
|
5999 |
|
6000 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6001 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6002 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6003 function_type_prefix = return_type_symbol; |
|
6004 break; |
|
6005 |
|
6006 } |
|
6007 |
|
6008 |
|
6009 ERROR; |
|
6010 } |
|
6011 |
|
6012 }/*function_string_to_uint*/ |
|
6013 break; |
|
6014 |
|
6015 /**** |
|
6016 *STRING_TO_LREAL |
|
6017 */ |
|
6018 case function_string_to_lreal : |
|
6019 { |
|
6020 symbol_c *last_type_symbol = NULL; |
|
6021 |
|
6022 { |
|
6023 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6024 symbol_c *IN_param_value = &this->default_variable_name; |
|
6025 |
|
6026 symbol_c *IN_type_symbol = param_data_type; |
|
6027 last_type_symbol = param_data_type; |
|
6028 |
|
6029 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6030 { |
|
6031 |
|
6032 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
6033 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6034 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6035 function_type_prefix = return_type_symbol; |
|
6036 break; |
|
6037 |
|
6038 } |
|
6039 |
|
6040 |
|
6041 ERROR; |
|
6042 } |
|
6043 |
|
6044 }/*function_string_to_lreal*/ |
|
6045 break; |
|
6046 |
|
6047 /**** |
|
6048 *STRING_TO_BYTE |
|
6049 */ |
|
6050 case function_string_to_byte : |
|
6051 { |
|
6052 symbol_c *last_type_symbol = NULL; |
|
6053 |
|
6054 { |
|
6055 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6056 symbol_c *IN_param_value = &this->default_variable_name; |
|
6057 |
|
6058 symbol_c *IN_type_symbol = param_data_type; |
|
6059 last_type_symbol = param_data_type; |
|
6060 |
|
6061 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6062 { |
|
6063 |
|
6064 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
6065 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6066 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6067 function_type_prefix = return_type_symbol; |
|
6068 break; |
|
6069 |
|
6070 } |
|
6071 |
|
6072 |
|
6073 ERROR; |
|
6074 } |
|
6075 |
|
6076 }/*function_string_to_byte*/ |
|
6077 break; |
|
6078 |
|
6079 /**** |
|
6080 *STRING_TO_USINT |
|
6081 */ |
|
6082 case function_string_to_usint : |
|
6083 { |
|
6084 symbol_c *last_type_symbol = NULL; |
|
6085 |
|
6086 { |
|
6087 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6088 symbol_c *IN_param_value = &this->default_variable_name; |
|
6089 |
|
6090 symbol_c *IN_type_symbol = param_data_type; |
|
6091 last_type_symbol = param_data_type; |
|
6092 |
|
6093 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6094 { |
|
6095 |
|
6096 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6097 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6098 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6099 function_type_prefix = return_type_symbol; |
|
6100 break; |
|
6101 |
|
6102 } |
|
6103 |
|
6104 |
|
6105 ERROR; |
|
6106 } |
|
6107 |
|
6108 }/*function_string_to_usint*/ |
|
6109 break; |
|
6110 |
|
6111 /**** |
|
6112 *STRING_TO_ULINT |
|
6113 */ |
|
6114 case function_string_to_ulint : |
|
6115 { |
|
6116 symbol_c *last_type_symbol = NULL; |
|
6117 |
|
6118 { |
|
6119 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6120 symbol_c *IN_param_value = &this->default_variable_name; |
|
6121 |
|
6122 symbol_c *IN_type_symbol = param_data_type; |
|
6123 last_type_symbol = param_data_type; |
|
6124 |
|
6125 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6126 { |
|
6127 |
|
6128 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
6129 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6130 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6131 function_type_prefix = return_type_symbol; |
|
6132 break; |
|
6133 |
|
6134 } |
|
6135 |
|
6136 |
|
6137 ERROR; |
|
6138 } |
|
6139 |
|
6140 }/*function_string_to_ulint*/ |
|
6141 break; |
|
6142 |
|
6143 /**** |
|
6144 *STRING_TO_BOOL |
|
6145 */ |
|
6146 case function_string_to_bool : |
|
6147 { |
|
6148 symbol_c *last_type_symbol = NULL; |
|
6149 |
|
6150 { |
|
6151 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6152 symbol_c *IN_param_value = &this->default_variable_name; |
|
6153 |
|
6154 symbol_c *IN_type_symbol = param_data_type; |
|
6155 last_type_symbol = param_data_type; |
|
6156 |
|
6157 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6158 { |
|
6159 |
|
6160 function_name = (symbol_c*)(new pragma_c("__string_to_bool")); |
|
6161 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6162 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6163 function_type_prefix = return_type_symbol; |
|
6164 break; |
|
6165 |
|
6166 } |
|
6167 |
|
6168 |
|
6169 ERROR; |
|
6170 } |
|
6171 |
|
6172 }/*function_string_to_bool*/ |
|
6173 break; |
|
6174 |
|
6175 /**** |
|
6176 *STRING_TO_TIME |
|
6177 */ |
|
6178 case function_string_to_time : |
|
6179 { |
|
6180 symbol_c *last_type_symbol = NULL; |
|
6181 |
|
6182 { |
|
6183 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6184 symbol_c *IN_param_value = &this->default_variable_name; |
|
6185 |
|
6186 symbol_c *IN_type_symbol = param_data_type; |
|
6187 last_type_symbol = param_data_type; |
|
6188 |
|
6189 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6190 { |
|
6191 |
|
6192 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
6193 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6194 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6195 function_type_prefix = return_type_symbol; |
|
6196 break; |
|
6197 |
|
6198 } |
|
6199 |
|
6200 |
|
6201 ERROR; |
|
6202 } |
|
6203 |
|
6204 }/*function_string_to_time*/ |
|
6205 break; |
|
6206 |
|
6207 /**** |
|
6208 *STRING_TO_INT |
|
6209 */ |
|
6210 case function_string_to_int : |
|
6211 { |
|
6212 symbol_c *last_type_symbol = NULL; |
|
6213 |
|
6214 { |
|
6215 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6216 symbol_c *IN_param_value = &this->default_variable_name; |
|
6217 |
|
6218 symbol_c *IN_type_symbol = param_data_type; |
|
6219 last_type_symbol = param_data_type; |
|
6220 |
|
6221 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
6222 { |
|
6223 |
|
6224 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
6225 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6226 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6227 function_type_prefix = return_type_symbol; |
|
6228 break; |
|
6229 |
|
6230 } |
|
6231 |
|
6232 |
|
6233 ERROR; |
|
6234 } |
|
6235 |
|
6236 }/*function_string_to_int*/ |
|
6237 break; |
|
6238 |
|
6239 /**** |
|
6240 *LWORD_TO_REAL |
|
6241 */ |
|
6242 case function_lword_to_real : |
|
6243 { |
|
6244 symbol_c *last_type_symbol = NULL; |
|
6245 |
|
6246 { |
|
6247 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6248 symbol_c *IN_param_value = &this->default_variable_name; |
|
6249 |
|
6250 symbol_c *IN_type_symbol = param_data_type; |
|
6251 last_type_symbol = param_data_type; |
|
6252 |
|
6253 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6254 { |
|
6255 |
|
6256 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6257 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6258 function_type_prefix = return_type_symbol; |
|
6259 break; |
|
6260 |
|
6261 } |
|
6262 |
|
6263 |
|
6264 ERROR; |
|
6265 } |
|
6266 |
|
6267 }/*function_lword_to_real*/ |
|
6268 break; |
|
6269 |
|
6270 /**** |
|
6271 *LWORD_TO_SINT |
|
6272 */ |
|
6273 case function_lword_to_sint : |
|
6274 { |
|
6275 symbol_c *last_type_symbol = NULL; |
|
6276 |
|
6277 { |
|
6278 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6279 symbol_c *IN_param_value = &this->default_variable_name; |
|
6280 |
|
6281 symbol_c *IN_type_symbol = param_data_type; |
|
6282 last_type_symbol = param_data_type; |
|
6283 |
|
6284 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6285 { |
|
6286 |
|
6287 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6288 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6289 function_type_prefix = return_type_symbol; |
|
6290 break; |
|
6291 |
|
6292 } |
|
6293 |
|
6294 |
|
6295 ERROR; |
|
6296 } |
|
6297 |
|
6298 }/*function_lword_to_sint*/ |
|
6299 break; |
|
6300 |
|
6301 /**** |
|
6302 *LWORD_TO_LINT |
|
6303 */ |
|
6304 case function_lword_to_lint : |
|
6305 { |
|
6306 symbol_c *last_type_symbol = NULL; |
|
6307 |
|
6308 { |
|
6309 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6310 symbol_c *IN_param_value = &this->default_variable_name; |
|
6311 |
|
6312 symbol_c *IN_type_symbol = param_data_type; |
|
6313 last_type_symbol = param_data_type; |
|
6314 |
|
6315 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6316 { |
|
6317 |
|
6318 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6319 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6320 function_type_prefix = return_type_symbol; |
|
6321 break; |
|
6322 |
|
6323 } |
|
6324 |
|
6325 |
|
6326 ERROR; |
|
6327 } |
|
6328 |
|
6329 }/*function_lword_to_lint*/ |
|
6330 break; |
|
6331 |
|
6332 /**** |
|
6333 *LWORD_TO_DINT |
|
6334 */ |
|
6335 case function_lword_to_dint : |
|
6336 { |
|
6337 symbol_c *last_type_symbol = NULL; |
|
6338 |
|
6339 { |
|
6340 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6341 symbol_c *IN_param_value = &this->default_variable_name; |
|
6342 |
|
6343 symbol_c *IN_type_symbol = param_data_type; |
|
6344 last_type_symbol = param_data_type; |
|
6345 |
|
6346 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6347 { |
|
6348 |
|
6349 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6350 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6351 function_type_prefix = return_type_symbol; |
|
6352 break; |
|
6353 |
|
6354 } |
|
6355 |
|
6356 |
|
6357 ERROR; |
|
6358 } |
|
6359 |
|
6360 }/*function_lword_to_dint*/ |
|
6361 break; |
|
6362 |
|
6363 /**** |
|
6364 *LWORD_TO_DATE |
|
6365 */ |
|
6366 case function_lword_to_date : |
|
6367 { |
|
6368 symbol_c *last_type_symbol = NULL; |
|
6369 |
|
6370 { |
|
6371 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6372 symbol_c *IN_param_value = &this->default_variable_name; |
|
6373 |
|
6374 symbol_c *IN_type_symbol = param_data_type; |
|
6375 last_type_symbol = param_data_type; |
|
6376 |
|
6377 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6378 { |
|
6379 |
|
6380 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6381 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6382 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6383 function_type_prefix = return_type_symbol; |
|
6384 break; |
|
6385 |
|
6386 } |
|
6387 |
|
6388 |
|
6389 ERROR; |
|
6390 } |
|
6391 |
|
6392 }/*function_lword_to_date*/ |
|
6393 break; |
|
6394 |
|
6395 /**** |
|
6396 *LWORD_TO_DWORD |
|
6397 */ |
|
6398 case function_lword_to_dword : |
|
6399 { |
|
6400 symbol_c *last_type_symbol = NULL; |
|
6401 |
|
6402 { |
|
6403 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6404 symbol_c *IN_param_value = &this->default_variable_name; |
|
6405 |
|
6406 symbol_c *IN_type_symbol = param_data_type; |
|
6407 last_type_symbol = param_data_type; |
|
6408 |
|
6409 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6410 { |
|
6411 |
|
6412 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6413 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6414 function_type_prefix = return_type_symbol; |
|
6415 break; |
|
6416 |
|
6417 } |
|
6418 |
|
6419 |
|
6420 ERROR; |
|
6421 } |
|
6422 |
|
6423 }/*function_lword_to_dword*/ |
|
6424 break; |
|
6425 |
|
6426 /**** |
|
6427 *LWORD_TO_DT |
|
6428 */ |
|
6429 case function_lword_to_dt : |
|
6430 { |
|
6431 symbol_c *last_type_symbol = NULL; |
|
6432 |
|
6433 { |
|
6434 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6435 symbol_c *IN_param_value = &this->default_variable_name; |
|
6436 |
|
6437 symbol_c *IN_type_symbol = param_data_type; |
|
6438 last_type_symbol = param_data_type; |
|
6439 |
|
6440 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6441 { |
|
6442 |
|
6443 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6444 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6445 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6446 function_type_prefix = return_type_symbol; |
|
6447 break; |
|
6448 |
|
6449 } |
|
6450 |
|
6451 |
|
6452 ERROR; |
|
6453 } |
|
6454 |
|
6455 }/*function_lword_to_dt*/ |
|
6456 break; |
|
6457 |
|
6458 /**** |
|
6459 *LWORD_TO_TOD |
|
6460 */ |
|
6461 case function_lword_to_tod : |
|
6462 { |
|
6463 symbol_c *last_type_symbol = NULL; |
|
6464 |
|
6465 { |
|
6466 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6467 symbol_c *IN_param_value = &this->default_variable_name; |
|
6468 |
|
6469 symbol_c *IN_type_symbol = param_data_type; |
|
6470 last_type_symbol = param_data_type; |
|
6471 |
|
6472 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6473 { |
|
6474 |
|
6475 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6476 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6477 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6478 function_type_prefix = return_type_symbol; |
|
6479 break; |
|
6480 |
|
6481 } |
|
6482 |
|
6483 |
|
6484 ERROR; |
|
6485 } |
|
6486 |
|
6487 }/*function_lword_to_tod*/ |
|
6488 break; |
|
6489 |
|
6490 /**** |
|
6491 *LWORD_TO_UDINT |
|
6492 */ |
|
6493 case function_lword_to_udint : |
|
6494 { |
|
6495 symbol_c *last_type_symbol = NULL; |
|
6496 |
|
6497 { |
|
6498 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6499 symbol_c *IN_param_value = &this->default_variable_name; |
|
6500 |
|
6501 symbol_c *IN_type_symbol = param_data_type; |
|
6502 last_type_symbol = param_data_type; |
|
6503 |
|
6504 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6505 { |
|
6506 |
|
6507 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6508 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6509 function_type_prefix = return_type_symbol; |
|
6510 break; |
|
6511 |
|
6512 } |
|
6513 |
|
6514 |
|
6515 ERROR; |
|
6516 } |
|
6517 |
|
6518 }/*function_lword_to_udint*/ |
|
6519 break; |
|
6520 |
|
6521 /**** |
|
6522 *LWORD_TO_WORD |
|
6523 */ |
|
6524 case function_lword_to_word : |
|
6525 { |
|
6526 symbol_c *last_type_symbol = NULL; |
|
6527 |
|
6528 { |
|
6529 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6530 symbol_c *IN_param_value = &this->default_variable_name; |
|
6531 |
|
6532 symbol_c *IN_type_symbol = param_data_type; |
|
6533 last_type_symbol = param_data_type; |
|
6534 |
|
6535 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6536 { |
|
6537 |
|
6538 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6539 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6540 function_type_prefix = return_type_symbol; |
|
6541 break; |
|
6542 |
|
6543 } |
|
6544 |
|
6545 |
|
6546 ERROR; |
|
6547 } |
|
6548 |
|
6549 }/*function_lword_to_word*/ |
|
6550 break; |
|
6551 |
|
6552 /**** |
|
6553 *LWORD_TO_STRING |
|
6554 */ |
|
6555 case function_lword_to_string : |
|
6556 { |
|
6557 symbol_c *last_type_symbol = NULL; |
|
6558 |
|
6559 { |
|
6560 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6561 symbol_c *IN_param_value = &this->default_variable_name; |
|
6562 |
|
6563 symbol_c *IN_type_symbol = param_data_type; |
|
6564 last_type_symbol = param_data_type; |
|
6565 |
|
6566 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6567 { |
|
6568 |
|
6569 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
6570 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6571 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6572 function_type_prefix = return_type_symbol; |
|
6573 break; |
|
6574 |
|
6575 } |
|
6576 |
|
6577 |
|
6578 ERROR; |
|
6579 } |
|
6580 |
|
6581 }/*function_lword_to_string*/ |
|
6582 break; |
|
6583 |
|
6584 /**** |
|
6585 *LWORD_TO_UINT |
|
6586 */ |
|
6587 case function_lword_to_uint : |
|
6588 { |
|
6589 symbol_c *last_type_symbol = NULL; |
|
6590 |
|
6591 { |
|
6592 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6593 symbol_c *IN_param_value = &this->default_variable_name; |
|
6594 |
|
6595 symbol_c *IN_type_symbol = param_data_type; |
|
6596 last_type_symbol = param_data_type; |
|
6597 |
|
6598 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6599 { |
|
6600 |
|
6601 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6602 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6603 function_type_prefix = return_type_symbol; |
|
6604 break; |
|
6605 |
|
6606 } |
|
6607 |
|
6608 |
|
6609 ERROR; |
|
6610 } |
|
6611 |
|
6612 }/*function_lword_to_uint*/ |
|
6613 break; |
|
6614 |
|
6615 /**** |
|
6616 *LWORD_TO_LREAL |
|
6617 */ |
|
6618 case function_lword_to_lreal : |
|
6619 { |
|
6620 symbol_c *last_type_symbol = NULL; |
|
6621 |
|
6622 { |
|
6623 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6624 symbol_c *IN_param_value = &this->default_variable_name; |
|
6625 |
|
6626 symbol_c *IN_type_symbol = param_data_type; |
|
6627 last_type_symbol = param_data_type; |
|
6628 |
|
6629 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6630 { |
|
6631 |
|
6632 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6633 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
6634 function_type_prefix = return_type_symbol; |
|
6635 break; |
|
6636 |
|
6637 } |
|
6638 |
|
6639 |
|
6640 ERROR; |
|
6641 } |
|
6642 |
|
6643 }/*function_lword_to_lreal*/ |
|
6644 break; |
|
6645 |
|
6646 /**** |
|
6647 *LWORD_TO_BYTE |
|
6648 */ |
|
6649 case function_lword_to_byte : |
|
6650 { |
|
6651 symbol_c *last_type_symbol = NULL; |
|
6652 |
|
6653 { |
|
6654 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6655 symbol_c *IN_param_value = &this->default_variable_name; |
|
6656 |
|
6657 symbol_c *IN_type_symbol = param_data_type; |
|
6658 last_type_symbol = param_data_type; |
|
6659 |
|
6660 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6661 { |
|
6662 |
|
6663 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6664 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6665 function_type_prefix = return_type_symbol; |
|
6666 break; |
|
6667 |
|
6668 } |
|
6669 |
|
6670 |
|
6671 ERROR; |
|
6672 } |
|
6673 |
|
6674 }/*function_lword_to_byte*/ |
|
6675 break; |
|
6676 |
|
6677 /**** |
|
6678 *LWORD_TO_USINT |
|
6679 */ |
|
6680 case function_lword_to_usint : |
|
6681 { |
|
6682 symbol_c *last_type_symbol = NULL; |
|
6683 |
|
6684 { |
|
6685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6686 symbol_c *IN_param_value = &this->default_variable_name; |
|
6687 |
|
6688 symbol_c *IN_type_symbol = param_data_type; |
|
6689 last_type_symbol = param_data_type; |
|
6690 |
|
6691 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6692 { |
|
6693 |
|
6694 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6695 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6696 function_type_prefix = return_type_symbol; |
|
6697 break; |
|
6698 |
|
6699 } |
|
6700 |
|
6701 |
|
6702 ERROR; |
|
6703 } |
|
6704 |
|
6705 }/*function_lword_to_usint*/ |
|
6706 break; |
|
6707 |
|
6708 /**** |
|
6709 *LWORD_TO_ULINT |
|
6710 */ |
|
6711 case function_lword_to_ulint : |
|
6712 { |
|
6713 symbol_c *last_type_symbol = NULL; |
|
6714 |
|
6715 { |
|
6716 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6717 symbol_c *IN_param_value = &this->default_variable_name; |
|
6718 |
|
6719 symbol_c *IN_type_symbol = param_data_type; |
|
6720 last_type_symbol = param_data_type; |
|
6721 |
|
6722 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6723 { |
|
6724 |
|
6725 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6726 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6727 function_type_prefix = return_type_symbol; |
|
6728 break; |
|
6729 |
|
6730 } |
|
6731 |
|
6732 |
|
6733 ERROR; |
|
6734 } |
|
6735 |
|
6736 }/*function_lword_to_ulint*/ |
|
6737 break; |
|
6738 |
|
6739 /**** |
|
6740 *LWORD_TO_BOOL |
|
6741 */ |
|
6742 case function_lword_to_bool : |
|
6743 { |
|
6744 symbol_c *last_type_symbol = NULL; |
|
6745 |
|
6746 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6754 { |
|
6755 |
|
6756 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6757 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6758 function_type_prefix = return_type_symbol; |
|
6759 break; |
|
6760 |
|
6761 } |
|
6762 |
|
6763 |
|
6764 ERROR; |
|
6765 } |
|
6766 |
|
6767 }/*function_lword_to_bool*/ |
|
6768 break; |
|
6769 |
|
6770 /**** |
|
6771 *LWORD_TO_TIME |
|
6772 */ |
|
6773 case function_lword_to_time : |
|
6774 { |
|
6775 symbol_c *last_type_symbol = NULL; |
|
6776 |
|
6777 { |
|
6778 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6779 symbol_c *IN_param_value = &this->default_variable_name; |
|
6780 |
|
6781 symbol_c *IN_type_symbol = param_data_type; |
|
6782 last_type_symbol = param_data_type; |
|
6783 |
|
6784 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6785 { |
|
6786 |
|
6787 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6788 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6789 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6790 function_type_prefix = return_type_symbol; |
|
6791 break; |
|
6792 |
|
6793 } |
|
6794 |
|
6795 |
|
6796 ERROR; |
|
6797 } |
|
6798 |
|
6799 }/*function_lword_to_time*/ |
|
6800 break; |
|
6801 |
|
6802 /**** |
|
6803 *LWORD_TO_INT |
|
6804 */ |
|
6805 case function_lword_to_int : |
|
6806 { |
|
6807 symbol_c *last_type_symbol = NULL; |
|
6808 |
|
6809 { |
|
6810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6811 symbol_c *IN_param_value = &this->default_variable_name; |
|
6812 |
|
6813 symbol_c *IN_type_symbol = param_data_type; |
|
6814 last_type_symbol = param_data_type; |
|
6815 |
|
6816 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
6817 { |
|
6818 |
|
6819 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6820 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6821 function_type_prefix = return_type_symbol; |
|
6822 break; |
|
6823 |
|
6824 } |
|
6825 |
|
6826 |
|
6827 ERROR; |
|
6828 } |
|
6829 |
|
6830 }/*function_lword_to_int*/ |
|
6831 break; |
|
6832 |
|
6833 /**** |
|
6834 *UINT_TO_REAL |
|
6835 */ |
|
6836 case function_uint_to_real : |
|
6837 { |
|
6838 symbol_c *last_type_symbol = NULL; |
|
6839 |
|
6840 { |
|
6841 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6842 symbol_c *IN_param_value = &this->default_variable_name; |
|
6843 |
|
6844 symbol_c *IN_type_symbol = param_data_type; |
|
6845 last_type_symbol = param_data_type; |
|
6846 |
|
6847 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
6848 { |
|
6849 |
|
6850 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6851 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6852 function_type_prefix = return_type_symbol; |
|
6853 break; |
|
6854 |
|
6855 } |
|
6856 |
|
6857 |
|
6858 ERROR; |
|
6859 } |
|
6860 |
|
6861 }/*function_uint_to_real*/ |
|
6862 break; |
|
6863 |
|
6864 /**** |
|
6865 *UINT_TO_SINT |
|
6866 */ |
|
6867 case function_uint_to_sint : |
|
6868 { |
|
6869 symbol_c *last_type_symbol = NULL; |
|
6870 |
|
6871 { |
|
6872 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6873 symbol_c *IN_param_value = &this->default_variable_name; |
|
6874 |
|
6875 symbol_c *IN_type_symbol = param_data_type; |
|
6876 last_type_symbol = param_data_type; |
|
6877 |
|
6878 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
6879 { |
|
6880 |
|
6881 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6882 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6883 function_type_prefix = return_type_symbol; |
|
6884 break; |
|
6885 |
|
6886 } |
|
6887 |
|
6888 |
|
6889 ERROR; |
|
6890 } |
|
6891 |
|
6892 }/*function_uint_to_sint*/ |
|
6893 break; |
|
6894 |
|
6895 /**** |
|
6896 *UINT_TO_LINT |
|
6897 */ |
|
6898 case function_uint_to_lint : |
|
6899 { |
|
6900 symbol_c *last_type_symbol = NULL; |
|
6901 |
|
6902 { |
|
6903 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6904 symbol_c *IN_param_value = &this->default_variable_name; |
|
6905 |
|
6906 symbol_c *IN_type_symbol = param_data_type; |
|
6907 last_type_symbol = param_data_type; |
|
6908 |
|
6909 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
6910 { |
|
6911 |
|
6912 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6913 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6914 function_type_prefix = return_type_symbol; |
|
6915 break; |
|
6916 |
|
6917 } |
|
6918 |
|
6919 |
|
6920 ERROR; |
|
6921 } |
|
6922 |
|
6923 }/*function_uint_to_lint*/ |
|
6924 break; |
|
6925 |
|
6926 /**** |
|
6927 *UINT_TO_DINT |
|
6928 */ |
|
6929 case function_uint_to_dint : |
|
6930 { |
|
6931 symbol_c *last_type_symbol = NULL; |
|
6932 |
|
6933 { |
|
6934 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6935 symbol_c *IN_param_value = &this->default_variable_name; |
|
6936 |
|
6937 symbol_c *IN_type_symbol = param_data_type; |
|
6938 last_type_symbol = param_data_type; |
|
6939 |
|
6940 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
6941 { |
|
6942 |
|
6943 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6944 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6945 function_type_prefix = return_type_symbol; |
|
6946 break; |
|
6947 |
|
6948 } |
|
6949 |
|
6950 |
|
6951 ERROR; |
|
6952 } |
|
6953 |
|
6954 }/*function_uint_to_dint*/ |
|
6955 break; |
|
6956 |
|
6957 /**** |
|
6958 *UINT_TO_DATE |
|
6959 */ |
|
6960 case function_uint_to_date : |
|
6961 { |
|
6962 symbol_c *last_type_symbol = NULL; |
|
6963 |
|
6964 { |
|
6965 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6966 symbol_c *IN_param_value = &this->default_variable_name; |
|
6967 |
|
6968 symbol_c *IN_type_symbol = param_data_type; |
|
6969 last_type_symbol = param_data_type; |
|
6970 |
|
6971 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
6972 { |
|
6973 |
|
6974 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6975 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
6976 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6977 function_type_prefix = return_type_symbol; |
|
6978 break; |
|
6979 |
|
6980 } |
|
6981 |
|
6982 |
|
6983 ERROR; |
|
6984 } |
|
6985 |
|
6986 }/*function_uint_to_date*/ |
|
6987 break; |
|
6988 |
|
6989 /**** |
|
6990 *UINT_TO_DWORD |
|
6991 */ |
|
6992 case function_uint_to_dword : |
|
6993 { |
|
6994 symbol_c *last_type_symbol = NULL; |
|
6995 |
|
6996 { |
|
6997 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6998 symbol_c *IN_param_value = &this->default_variable_name; |
|
6999 |
|
7000 symbol_c *IN_type_symbol = param_data_type; |
|
7001 last_type_symbol = param_data_type; |
|
7002 |
|
7003 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7004 { |
|
7005 |
|
7006 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7007 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7008 function_type_prefix = return_type_symbol; |
|
7009 break; |
|
7010 |
|
7011 } |
|
7012 |
|
7013 |
|
7014 ERROR; |
|
7015 } |
|
7016 |
|
7017 }/*function_uint_to_dword*/ |
|
7018 break; |
|
7019 |
|
7020 /**** |
|
7021 *UINT_TO_DT |
|
7022 */ |
|
7023 case function_uint_to_dt : |
|
7024 { |
|
7025 symbol_c *last_type_symbol = NULL; |
|
7026 |
|
7027 { |
|
7028 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7029 symbol_c *IN_param_value = &this->default_variable_name; |
|
7030 |
|
7031 symbol_c *IN_type_symbol = param_data_type; |
|
7032 last_type_symbol = param_data_type; |
|
7033 |
|
7034 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7035 { |
|
7036 |
|
7037 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7038 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7039 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
7040 function_type_prefix = return_type_symbol; |
|
7041 break; |
|
7042 |
|
7043 } |
|
7044 |
|
7045 |
|
7046 ERROR; |
|
7047 } |
|
7048 |
|
7049 }/*function_uint_to_dt*/ |
|
7050 break; |
|
7051 |
|
7052 /**** |
|
7053 *UINT_TO_TOD |
|
7054 */ |
|
7055 case function_uint_to_tod : |
|
7056 { |
|
7057 symbol_c *last_type_symbol = NULL; |
|
7058 |
|
7059 { |
|
7060 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7061 symbol_c *IN_param_value = &this->default_variable_name; |
|
7062 |
|
7063 symbol_c *IN_type_symbol = param_data_type; |
|
7064 last_type_symbol = param_data_type; |
|
7065 |
|
7066 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7067 { |
|
7068 |
|
7069 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7070 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7071 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
7072 function_type_prefix = return_type_symbol; |
|
7073 break; |
|
7074 |
|
7075 } |
|
7076 |
|
7077 |
|
7078 ERROR; |
|
7079 } |
|
7080 |
|
7081 }/*function_uint_to_tod*/ |
|
7082 break; |
|
7083 |
|
7084 /**** |
|
7085 *UINT_TO_UDINT |
|
7086 */ |
|
7087 case function_uint_to_udint : |
|
7088 { |
|
7089 symbol_c *last_type_symbol = NULL; |
|
7090 |
|
7091 { |
|
7092 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7093 symbol_c *IN_param_value = &this->default_variable_name; |
|
7094 |
|
7095 symbol_c *IN_type_symbol = param_data_type; |
|
7096 last_type_symbol = param_data_type; |
|
7097 |
|
7098 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7099 { |
|
7100 |
|
7101 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7102 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7103 function_type_prefix = return_type_symbol; |
|
7104 break; |
|
7105 |
|
7106 } |
|
7107 |
|
7108 |
|
7109 ERROR; |
|
7110 } |
|
7111 |
|
7112 }/*function_uint_to_udint*/ |
|
7113 break; |
|
7114 |
|
7115 /**** |
|
7116 *UINT_TO_WORD |
|
7117 */ |
|
7118 case function_uint_to_word : |
|
7119 { |
|
7120 symbol_c *last_type_symbol = NULL; |
|
7121 |
|
7122 { |
|
7123 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7124 symbol_c *IN_param_value = &this->default_variable_name; |
|
7125 |
|
7126 symbol_c *IN_type_symbol = param_data_type; |
|
7127 last_type_symbol = param_data_type; |
|
7128 |
|
7129 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7130 { |
|
7131 |
|
7132 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7133 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7134 function_type_prefix = return_type_symbol; |
|
7135 break; |
|
7136 |
|
7137 } |
|
7138 |
|
7139 |
|
7140 ERROR; |
|
7141 } |
|
7142 |
|
7143 }/*function_uint_to_word*/ |
|
7144 break; |
|
7145 |
|
7146 /**** |
|
7147 *UINT_TO_STRING |
|
7148 */ |
|
7149 case function_uint_to_string : |
|
7150 { |
|
7151 symbol_c *last_type_symbol = NULL; |
|
7152 |
|
7153 { |
|
7154 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7155 symbol_c *IN_param_value = &this->default_variable_name; |
|
7156 |
|
7157 symbol_c *IN_type_symbol = param_data_type; |
|
7158 last_type_symbol = param_data_type; |
|
7159 |
|
7160 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7161 { |
|
7162 |
|
7163 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
7164 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7165 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7166 function_type_prefix = return_type_symbol; |
|
7167 break; |
|
7168 |
|
7169 } |
|
7170 |
|
7171 |
|
7172 ERROR; |
|
7173 } |
|
7174 |
|
7175 }/*function_uint_to_string*/ |
|
7176 break; |
|
7177 |
|
7178 /**** |
|
7179 *UINT_TO_LWORD |
|
7180 */ |
|
7181 case function_uint_to_lword : |
|
7182 { |
|
7183 symbol_c *last_type_symbol = NULL; |
|
7184 |
|
7185 { |
|
7186 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7187 symbol_c *IN_param_value = &this->default_variable_name; |
|
7188 |
|
7189 symbol_c *IN_type_symbol = param_data_type; |
|
7190 last_type_symbol = param_data_type; |
|
7191 |
|
7192 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7193 { |
|
7194 |
|
7195 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7196 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
7197 function_type_prefix = return_type_symbol; |
|
7198 break; |
|
7199 |
|
7200 } |
|
7201 |
|
7202 |
|
7203 ERROR; |
|
7204 } |
|
7205 |
|
7206 }/*function_uint_to_lword*/ |
|
7207 break; |
|
7208 |
|
7209 /**** |
|
7210 *UINT_TO_LREAL |
|
7211 */ |
|
7212 case function_uint_to_lreal : |
|
7213 { |
|
7214 symbol_c *last_type_symbol = NULL; |
|
7215 |
|
7216 { |
|
7217 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7218 symbol_c *IN_param_value = &this->default_variable_name; |
|
7219 |
|
7220 symbol_c *IN_type_symbol = param_data_type; |
|
7221 last_type_symbol = param_data_type; |
|
7222 |
|
7223 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7224 { |
|
7225 |
|
7226 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7227 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7228 function_type_prefix = return_type_symbol; |
|
7229 break; |
|
7230 |
|
7231 } |
|
7232 |
|
7233 |
|
7234 ERROR; |
|
7235 } |
|
7236 |
|
7237 }/*function_uint_to_lreal*/ |
|
7238 break; |
|
7239 |
|
7240 /**** |
|
7241 *UINT_TO_BYTE |
|
7242 */ |
|
7243 case function_uint_to_byte : |
|
7244 { |
|
7245 symbol_c *last_type_symbol = NULL; |
|
7246 |
|
7247 { |
|
7248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7249 symbol_c *IN_param_value = &this->default_variable_name; |
|
7250 |
|
7251 symbol_c *IN_type_symbol = param_data_type; |
|
7252 last_type_symbol = param_data_type; |
|
7253 |
|
7254 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7255 { |
|
7256 |
|
7257 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7258 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7259 function_type_prefix = return_type_symbol; |
|
7260 break; |
|
7261 |
|
7262 } |
|
7263 |
|
7264 |
|
7265 ERROR; |
|
7266 } |
|
7267 |
|
7268 }/*function_uint_to_byte*/ |
|
7269 break; |
|
7270 |
|
7271 /**** |
|
7272 *UINT_TO_USINT |
|
7273 */ |
|
7274 case function_uint_to_usint : |
|
7275 { |
|
7276 symbol_c *last_type_symbol = NULL; |
|
7277 |
|
7278 { |
|
7279 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7280 symbol_c *IN_param_value = &this->default_variable_name; |
|
7281 |
|
7282 symbol_c *IN_type_symbol = param_data_type; |
|
7283 last_type_symbol = param_data_type; |
|
7284 |
|
7285 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7286 { |
|
7287 |
|
7288 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7289 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7290 function_type_prefix = return_type_symbol; |
|
7291 break; |
|
7292 |
|
7293 } |
|
7294 |
|
7295 |
|
7296 ERROR; |
|
7297 } |
|
7298 |
|
7299 }/*function_uint_to_usint*/ |
|
7300 break; |
|
7301 |
|
7302 /**** |
|
7303 *UINT_TO_ULINT |
|
7304 */ |
|
7305 case function_uint_to_ulint : |
|
7306 { |
|
7307 symbol_c *last_type_symbol = NULL; |
|
7308 |
|
7309 { |
|
7310 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7311 symbol_c *IN_param_value = &this->default_variable_name; |
|
7312 |
|
7313 symbol_c *IN_type_symbol = param_data_type; |
|
7314 last_type_symbol = param_data_type; |
|
7315 |
|
7316 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7317 { |
|
7318 |
|
7319 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7320 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7321 function_type_prefix = return_type_symbol; |
|
7322 break; |
|
7323 |
|
7324 } |
|
7325 |
|
7326 |
|
7327 ERROR; |
|
7328 } |
|
7329 |
|
7330 }/*function_uint_to_ulint*/ |
|
7331 break; |
|
7332 |
|
7333 /**** |
|
7334 *UINT_TO_BOOL |
|
7335 */ |
|
7336 case function_uint_to_bool : |
|
7337 { |
|
7338 symbol_c *last_type_symbol = NULL; |
|
7339 |
|
7340 { |
|
7341 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7342 symbol_c *IN_param_value = &this->default_variable_name; |
|
7343 |
|
7344 symbol_c *IN_type_symbol = param_data_type; |
|
7345 last_type_symbol = param_data_type; |
|
7346 |
|
7347 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7348 { |
|
7349 |
|
7350 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7351 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7352 function_type_prefix = return_type_symbol; |
|
7353 break; |
|
7354 |
|
7355 } |
|
7356 |
|
7357 |
|
7358 ERROR; |
|
7359 } |
|
7360 |
|
7361 }/*function_uint_to_bool*/ |
|
7362 break; |
|
7363 |
|
7364 /**** |
|
7365 *UINT_TO_TIME |
|
7366 */ |
|
7367 case function_uint_to_time : |
|
7368 { |
|
7369 symbol_c *last_type_symbol = NULL; |
|
7370 |
|
7371 { |
|
7372 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7373 symbol_c *IN_param_value = &this->default_variable_name; |
|
7374 |
|
7375 symbol_c *IN_type_symbol = param_data_type; |
|
7376 last_type_symbol = param_data_type; |
|
7377 |
|
7378 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7379 { |
|
7380 |
|
7381 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7382 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7383 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7384 function_type_prefix = return_type_symbol; |
|
7385 break; |
|
7386 |
|
7387 } |
|
7388 |
|
7389 |
|
7390 ERROR; |
|
7391 } |
|
7392 |
|
7393 }/*function_uint_to_time*/ |
|
7394 break; |
|
7395 |
|
7396 /**** |
|
7397 *UINT_TO_INT |
|
7398 */ |
|
7399 case function_uint_to_int : |
|
7400 { |
|
7401 symbol_c *last_type_symbol = NULL; |
|
7402 |
|
7403 { |
|
7404 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7405 symbol_c *IN_param_value = &this->default_variable_name; |
|
7406 |
|
7407 symbol_c *IN_type_symbol = param_data_type; |
|
7408 last_type_symbol = param_data_type; |
|
7409 |
|
7410 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
7411 { |
|
7412 |
|
7413 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7414 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7415 function_type_prefix = return_type_symbol; |
|
7416 break; |
|
7417 |
|
7418 } |
|
7419 |
|
7420 |
|
7421 ERROR; |
|
7422 } |
|
7423 |
|
7424 }/*function_uint_to_int*/ |
|
7425 break; |
|
7426 |
|
7427 /**** |
|
7428 *LREAL_TO_REAL |
|
7429 */ |
|
7430 case function_lreal_to_real : |
|
7431 { |
|
7432 symbol_c *last_type_symbol = NULL; |
|
7433 |
|
7434 { |
|
7435 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7436 symbol_c *IN_param_value = &this->default_variable_name; |
|
7437 |
|
7438 symbol_c *IN_type_symbol = param_data_type; |
|
7439 last_type_symbol = param_data_type; |
|
7440 |
|
7441 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7442 { |
|
7443 |
|
7444 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7445 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7446 function_type_prefix = return_type_symbol; |
|
7447 break; |
|
7448 |
|
7449 } |
|
7450 |
|
7451 |
|
7452 ERROR; |
|
7453 } |
|
7454 |
|
7455 }/*function_lreal_to_real*/ |
|
7456 break; |
|
7457 |
|
7458 /**** |
|
7459 *LREAL_TO_SINT |
|
7460 */ |
|
7461 case function_lreal_to_sint : |
|
7462 { |
|
7463 symbol_c *last_type_symbol = NULL; |
|
7464 |
|
7465 { |
|
7466 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7467 symbol_c *IN_param_value = &this->default_variable_name; |
|
7468 |
|
7469 symbol_c *IN_type_symbol = param_data_type; |
|
7470 last_type_symbol = param_data_type; |
|
7471 |
|
7472 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7473 { |
|
7474 |
|
7475 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7476 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7477 function_type_prefix = return_type_symbol; |
|
7478 break; |
|
7479 |
|
7480 } |
|
7481 |
|
7482 |
|
7483 ERROR; |
|
7484 } |
|
7485 |
|
7486 }/*function_lreal_to_sint*/ |
|
7487 break; |
|
7488 |
|
7489 /**** |
|
7490 *LREAL_TO_LINT |
|
7491 */ |
|
7492 case function_lreal_to_lint : |
|
7493 { |
|
7494 symbol_c *last_type_symbol = NULL; |
|
7495 |
|
7496 { |
|
7497 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7498 symbol_c *IN_param_value = &this->default_variable_name; |
|
7499 |
|
7500 symbol_c *IN_type_symbol = param_data_type; |
|
7501 last_type_symbol = param_data_type; |
|
7502 |
|
7503 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7504 { |
|
7505 |
|
7506 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7507 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7508 function_type_prefix = return_type_symbol; |
|
7509 break; |
|
7510 |
|
7511 } |
|
7512 |
|
7513 |
|
7514 ERROR; |
|
7515 } |
|
7516 |
|
7517 }/*function_lreal_to_lint*/ |
|
7518 break; |
|
7519 |
|
7520 /**** |
|
7521 *LREAL_TO_DINT |
|
7522 */ |
|
7523 case function_lreal_to_dint : |
|
7524 { |
|
7525 symbol_c *last_type_symbol = NULL; |
|
7526 |
|
7527 { |
|
7528 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7529 symbol_c *IN_param_value = &this->default_variable_name; |
|
7530 |
|
7531 symbol_c *IN_type_symbol = param_data_type; |
|
7532 last_type_symbol = param_data_type; |
|
7533 |
|
7534 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7535 { |
|
7536 |
|
7537 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7538 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7539 function_type_prefix = return_type_symbol; |
|
7540 break; |
|
7541 |
|
7542 } |
|
7543 |
|
7544 |
|
7545 ERROR; |
|
7546 } |
|
7547 |
|
7548 }/*function_lreal_to_dint*/ |
|
7549 break; |
|
7550 |
|
7551 /**** |
|
7552 *LREAL_TO_DATE |
|
7553 */ |
|
7554 case function_lreal_to_date : |
|
7555 { |
|
7556 symbol_c *last_type_symbol = NULL; |
|
7557 |
|
7558 { |
|
7559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7560 symbol_c *IN_param_value = &this->default_variable_name; |
|
7561 |
|
7562 symbol_c *IN_type_symbol = param_data_type; |
|
7563 last_type_symbol = param_data_type; |
|
7564 |
|
7565 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7566 { |
|
7567 |
|
7568 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
7569 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7570 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
7571 function_type_prefix = return_type_symbol; |
|
7572 break; |
|
7573 |
|
7574 } |
|
7575 |
|
7576 |
|
7577 ERROR; |
|
7578 } |
|
7579 |
|
7580 }/*function_lreal_to_date*/ |
|
7581 break; |
|
7582 |
|
7583 /**** |
|
7584 *LREAL_TO_DWORD |
|
7585 */ |
|
7586 case function_lreal_to_dword : |
|
7587 { |
|
7588 symbol_c *last_type_symbol = NULL; |
|
7589 |
|
7590 { |
|
7591 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7592 symbol_c *IN_param_value = &this->default_variable_name; |
|
7593 |
|
7594 symbol_c *IN_type_symbol = param_data_type; |
|
7595 last_type_symbol = param_data_type; |
|
7596 |
|
7597 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7598 { |
|
7599 |
|
7600 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7601 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7602 function_type_prefix = return_type_symbol; |
|
7603 break; |
|
7604 |
|
7605 } |
|
7606 |
|
7607 |
|
7608 ERROR; |
|
7609 } |
|
7610 |
|
7611 }/*function_lreal_to_dword*/ |
|
7612 break; |
|
7613 |
|
7614 /**** |
|
7615 *LREAL_TO_DT |
|
7616 */ |
|
7617 case function_lreal_to_dt : |
|
7618 { |
|
7619 symbol_c *last_type_symbol = NULL; |
|
7620 |
|
7621 { |
|
7622 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7623 symbol_c *IN_param_value = &this->default_variable_name; |
|
7624 |
|
7625 symbol_c *IN_type_symbol = param_data_type; |
|
7626 last_type_symbol = param_data_type; |
|
7627 |
|
7628 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7629 { |
|
7630 |
|
7631 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
7632 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7633 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
7634 function_type_prefix = return_type_symbol; |
|
7635 break; |
|
7636 |
|
7637 } |
|
7638 |
|
7639 |
|
7640 ERROR; |
|
7641 } |
|
7642 |
|
7643 }/*function_lreal_to_dt*/ |
|
7644 break; |
|
7645 |
|
7646 /**** |
|
7647 *LREAL_TO_TOD |
|
7648 */ |
|
7649 case function_lreal_to_tod : |
|
7650 { |
|
7651 symbol_c *last_type_symbol = NULL; |
|
7652 |
|
7653 { |
|
7654 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7655 symbol_c *IN_param_value = &this->default_variable_name; |
|
7656 |
|
7657 symbol_c *IN_type_symbol = param_data_type; |
|
7658 last_type_symbol = param_data_type; |
|
7659 |
|
7660 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7661 { |
|
7662 |
|
7663 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
7664 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7665 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
7666 function_type_prefix = return_type_symbol; |
|
7667 break; |
|
7668 |
|
7669 } |
|
7670 |
|
7671 |
|
7672 ERROR; |
|
7673 } |
|
7674 |
|
7675 }/*function_lreal_to_tod*/ |
|
7676 break; |
|
7677 |
|
7678 /**** |
|
7679 *LREAL_TO_UDINT |
|
7680 */ |
|
7681 case function_lreal_to_udint : |
|
7682 { |
|
7683 symbol_c *last_type_symbol = NULL; |
|
7684 |
|
7685 { |
|
7686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7687 symbol_c *IN_param_value = &this->default_variable_name; |
|
7688 |
|
7689 symbol_c *IN_type_symbol = param_data_type; |
|
7690 last_type_symbol = param_data_type; |
|
7691 |
|
7692 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7693 { |
|
7694 |
|
7695 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7696 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7697 function_type_prefix = return_type_symbol; |
|
7698 break; |
|
7699 |
|
7700 } |
|
7701 |
|
7702 |
|
7703 ERROR; |
|
7704 } |
|
7705 |
|
7706 }/*function_lreal_to_udint*/ |
|
7707 break; |
|
7708 |
|
7709 /**** |
|
7710 *LREAL_TO_WORD |
|
7711 */ |
|
7712 case function_lreal_to_word : |
|
7713 { |
|
7714 symbol_c *last_type_symbol = NULL; |
|
7715 |
|
7716 { |
|
7717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7718 symbol_c *IN_param_value = &this->default_variable_name; |
|
7719 |
|
7720 symbol_c *IN_type_symbol = param_data_type; |
|
7721 last_type_symbol = param_data_type; |
|
7722 |
|
7723 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7724 { |
|
7725 |
|
7726 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7727 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7728 function_type_prefix = return_type_symbol; |
|
7729 break; |
|
7730 |
|
7731 } |
|
7732 |
|
7733 |
|
7734 ERROR; |
|
7735 } |
|
7736 |
|
7737 }/*function_lreal_to_word*/ |
|
7738 break; |
|
7739 |
|
7740 /**** |
|
7741 *LREAL_TO_STRING |
|
7742 */ |
|
7743 case function_lreal_to_string : |
|
7744 { |
|
7745 symbol_c *last_type_symbol = NULL; |
|
7746 |
|
7747 { |
|
7748 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7749 symbol_c *IN_param_value = &this->default_variable_name; |
|
7750 |
|
7751 symbol_c *IN_type_symbol = param_data_type; |
|
7752 last_type_symbol = param_data_type; |
|
7753 |
|
7754 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7755 { |
|
7756 |
|
7757 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
7758 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7759 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7760 function_type_prefix = return_type_symbol; |
|
7761 break; |
|
7762 |
|
7763 } |
|
7764 |
|
7765 |
|
7766 ERROR; |
|
7767 } |
|
7768 |
|
7769 }/*function_lreal_to_string*/ |
|
7770 break; |
|
7771 |
|
7772 /**** |
|
7773 *LREAL_TO_LWORD |
|
7774 */ |
|
7775 case function_lreal_to_lword : |
|
7776 { |
|
7777 symbol_c *last_type_symbol = NULL; |
|
7778 |
|
7779 { |
|
7780 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7781 symbol_c *IN_param_value = &this->default_variable_name; |
|
7782 |
|
7783 symbol_c *IN_type_symbol = param_data_type; |
|
7784 last_type_symbol = param_data_type; |
|
7785 |
|
7786 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7787 { |
|
7788 |
|
7789 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7790 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
7791 function_type_prefix = return_type_symbol; |
|
7792 break; |
|
7793 |
|
7794 } |
|
7795 |
|
7796 |
|
7797 ERROR; |
|
7798 } |
|
7799 |
|
7800 }/*function_lreal_to_lword*/ |
|
7801 break; |
|
7802 |
|
7803 /**** |
|
7804 *LREAL_TO_UINT |
|
7805 */ |
|
7806 case function_lreal_to_uint : |
|
7807 { |
|
7808 symbol_c *last_type_symbol = NULL; |
|
7809 |
|
7810 { |
|
7811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7812 symbol_c *IN_param_value = &this->default_variable_name; |
|
7813 |
|
7814 symbol_c *IN_type_symbol = param_data_type; |
|
7815 last_type_symbol = param_data_type; |
|
7816 |
|
7817 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7818 { |
|
7819 |
|
7820 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7821 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7822 function_type_prefix = return_type_symbol; |
|
7823 break; |
|
7824 |
|
7825 } |
|
7826 |
|
7827 |
|
7828 ERROR; |
|
7829 } |
|
7830 |
|
7831 }/*function_lreal_to_uint*/ |
|
7832 break; |
|
7833 |
|
7834 /**** |
|
7835 *LREAL_TO_BYTE |
|
7836 */ |
|
7837 case function_lreal_to_byte : |
|
7838 { |
|
7839 symbol_c *last_type_symbol = NULL; |
|
7840 |
|
7841 { |
|
7842 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7843 symbol_c *IN_param_value = &this->default_variable_name; |
|
7844 |
|
7845 symbol_c *IN_type_symbol = param_data_type; |
|
7846 last_type_symbol = param_data_type; |
|
7847 |
|
7848 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7849 { |
|
7850 |
|
7851 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7852 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7853 function_type_prefix = return_type_symbol; |
|
7854 break; |
|
7855 |
|
7856 } |
|
7857 |
|
7858 |
|
7859 ERROR; |
|
7860 } |
|
7861 |
|
7862 }/*function_lreal_to_byte*/ |
|
7863 break; |
|
7864 |
|
7865 /**** |
|
7866 *LREAL_TO_USINT |
|
7867 */ |
|
7868 case function_lreal_to_usint : |
|
7869 { |
|
7870 symbol_c *last_type_symbol = NULL; |
|
7871 |
|
7872 { |
|
7873 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7874 symbol_c *IN_param_value = &this->default_variable_name; |
|
7875 |
|
7876 symbol_c *IN_type_symbol = param_data_type; |
|
7877 last_type_symbol = param_data_type; |
|
7878 |
|
7879 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7880 { |
|
7881 |
|
7882 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7883 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7884 function_type_prefix = return_type_symbol; |
|
7885 break; |
|
7886 |
|
7887 } |
|
7888 |
|
7889 |
|
7890 ERROR; |
|
7891 } |
|
7892 |
|
7893 }/*function_lreal_to_usint*/ |
|
7894 break; |
|
7895 |
|
7896 /**** |
|
7897 *LREAL_TO_ULINT |
|
7898 */ |
|
7899 case function_lreal_to_ulint : |
|
7900 { |
|
7901 symbol_c *last_type_symbol = NULL; |
|
7902 |
|
7903 { |
|
7904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7905 symbol_c *IN_param_value = &this->default_variable_name; |
|
7906 |
|
7907 symbol_c *IN_type_symbol = param_data_type; |
|
7908 last_type_symbol = param_data_type; |
|
7909 |
|
7910 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7911 { |
|
7912 |
|
7913 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7914 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7915 function_type_prefix = return_type_symbol; |
|
7916 break; |
|
7917 |
|
7918 } |
|
7919 |
|
7920 |
|
7921 ERROR; |
|
7922 } |
|
7923 |
|
7924 }/*function_lreal_to_ulint*/ |
|
7925 break; |
|
7926 |
|
7927 /**** |
|
7928 *LREAL_TO_BOOL |
|
7929 */ |
|
7930 case function_lreal_to_bool : |
|
7931 { |
|
7932 symbol_c *last_type_symbol = NULL; |
|
7933 |
|
7934 { |
|
7935 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7936 symbol_c *IN_param_value = &this->default_variable_name; |
|
7937 |
|
7938 symbol_c *IN_type_symbol = param_data_type; |
|
7939 last_type_symbol = param_data_type; |
|
7940 |
|
7941 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7942 { |
|
7943 |
|
7944 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7945 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
7946 function_type_prefix = return_type_symbol; |
|
7947 break; |
|
7948 |
|
7949 } |
|
7950 |
|
7951 |
|
7952 ERROR; |
|
7953 } |
|
7954 |
|
7955 }/*function_lreal_to_bool*/ |
|
7956 break; |
|
7957 |
|
7958 /**** |
|
7959 *LREAL_TO_TIME |
|
7960 */ |
|
7961 case function_lreal_to_time : |
|
7962 { |
|
7963 symbol_c *last_type_symbol = NULL; |
|
7964 |
|
7965 { |
|
7966 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7967 symbol_c *IN_param_value = &this->default_variable_name; |
|
7968 |
|
7969 symbol_c *IN_type_symbol = param_data_type; |
|
7970 last_type_symbol = param_data_type; |
|
7971 |
|
7972 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
7973 { |
|
7974 |
|
7975 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
7976 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
7977 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
7978 function_type_prefix = return_type_symbol; |
|
7979 break; |
|
7980 |
|
7981 } |
|
7982 |
|
7983 |
|
7984 ERROR; |
|
7985 } |
|
7986 |
|
7987 }/*function_lreal_to_time*/ |
|
7988 break; |
|
7989 |
|
7990 /**** |
|
7991 *LREAL_TO_INT |
|
7992 */ |
|
7993 case function_lreal_to_int : |
|
7994 { |
|
7995 symbol_c *last_type_symbol = NULL; |
|
7996 |
|
7997 { |
|
7998 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7999 symbol_c *IN_param_value = &this->default_variable_name; |
|
8000 |
|
8001 symbol_c *IN_type_symbol = param_data_type; |
|
8002 last_type_symbol = param_data_type; |
|
8003 |
|
8004 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
8005 { |
|
8006 |
|
8007 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8008 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8009 function_type_prefix = return_type_symbol; |
|
8010 break; |
|
8011 |
|
8012 } |
|
8013 |
|
8014 |
|
8015 ERROR; |
|
8016 } |
|
8017 |
|
8018 }/*function_lreal_to_int*/ |
|
8019 break; |
|
8020 |
|
8021 /**** |
|
8022 *BYTE_TO_REAL |
|
8023 */ |
|
8024 case function_byte_to_real : |
|
8025 { |
|
8026 symbol_c *last_type_symbol = NULL; |
|
8027 |
|
8028 { |
|
8029 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8030 symbol_c *IN_param_value = &this->default_variable_name; |
|
8031 |
|
8032 symbol_c *IN_type_symbol = param_data_type; |
|
8033 last_type_symbol = param_data_type; |
|
8034 |
|
8035 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8036 { |
|
8037 |
|
8038 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8039 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8040 function_type_prefix = return_type_symbol; |
|
8041 break; |
|
8042 |
|
8043 } |
|
8044 |
|
8045 |
|
8046 ERROR; |
|
8047 } |
|
8048 |
|
8049 }/*function_byte_to_real*/ |
|
8050 break; |
|
8051 |
|
8052 /**** |
|
8053 *BYTE_TO_SINT |
|
8054 */ |
|
8055 case function_byte_to_sint : |
|
8056 { |
|
8057 symbol_c *last_type_symbol = NULL; |
|
8058 |
|
8059 { |
|
8060 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8061 symbol_c *IN_param_value = &this->default_variable_name; |
|
8062 |
|
8063 symbol_c *IN_type_symbol = param_data_type; |
|
8064 last_type_symbol = param_data_type; |
|
8065 |
|
8066 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8067 { |
|
8068 |
|
8069 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8070 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8071 function_type_prefix = return_type_symbol; |
|
8072 break; |
|
8073 |
|
8074 } |
|
8075 |
|
8076 |
|
8077 ERROR; |
|
8078 } |
|
8079 |
|
8080 }/*function_byte_to_sint*/ |
|
8081 break; |
|
8082 |
|
8083 /**** |
|
8084 *BYTE_TO_LINT |
|
8085 */ |
|
8086 case function_byte_to_lint : |
|
8087 { |
|
8088 symbol_c *last_type_symbol = NULL; |
|
8089 |
|
8090 { |
|
8091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8092 symbol_c *IN_param_value = &this->default_variable_name; |
|
8093 |
|
8094 symbol_c *IN_type_symbol = param_data_type; |
|
8095 last_type_symbol = param_data_type; |
|
8096 |
|
8097 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8098 { |
|
8099 |
|
8100 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8101 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8102 function_type_prefix = return_type_symbol; |
|
8103 break; |
|
8104 |
|
8105 } |
|
8106 |
|
8107 |
|
8108 ERROR; |
|
8109 } |
|
8110 |
|
8111 }/*function_byte_to_lint*/ |
|
8112 break; |
|
8113 |
|
8114 /**** |
|
8115 *BYTE_TO_DINT |
|
8116 */ |
|
8117 case function_byte_to_dint : |
|
8118 { |
|
8119 symbol_c *last_type_symbol = NULL; |
|
8120 |
|
8121 { |
|
8122 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8123 symbol_c *IN_param_value = &this->default_variable_name; |
|
8124 |
|
8125 symbol_c *IN_type_symbol = param_data_type; |
|
8126 last_type_symbol = param_data_type; |
|
8127 |
|
8128 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8129 { |
|
8130 |
|
8131 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8132 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8133 function_type_prefix = return_type_symbol; |
|
8134 break; |
|
8135 |
|
8136 } |
|
8137 |
|
8138 |
|
8139 ERROR; |
|
8140 } |
|
8141 |
|
8142 }/*function_byte_to_dint*/ |
|
8143 break; |
|
8144 |
|
8145 /**** |
|
8146 *BYTE_TO_DATE |
|
8147 */ |
|
8148 case function_byte_to_date : |
|
8149 { |
|
8150 symbol_c *last_type_symbol = NULL; |
|
8151 |
|
8152 { |
|
8153 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8154 symbol_c *IN_param_value = &this->default_variable_name; |
|
8155 |
|
8156 symbol_c *IN_type_symbol = param_data_type; |
|
8157 last_type_symbol = param_data_type; |
|
8158 |
|
8159 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8160 { |
|
8161 |
|
8162 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8163 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8164 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8165 function_type_prefix = return_type_symbol; |
|
8166 break; |
|
8167 |
|
8168 } |
|
8169 |
|
8170 |
|
8171 ERROR; |
|
8172 } |
|
8173 |
|
8174 }/*function_byte_to_date*/ |
|
8175 break; |
|
8176 |
|
8177 /**** |
|
8178 *BYTE_TO_DWORD |
|
8179 */ |
|
8180 case function_byte_to_dword : |
|
8181 { |
|
8182 symbol_c *last_type_symbol = NULL; |
|
8183 |
|
8184 { |
|
8185 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8186 symbol_c *IN_param_value = &this->default_variable_name; |
|
8187 |
|
8188 symbol_c *IN_type_symbol = param_data_type; |
|
8189 last_type_symbol = param_data_type; |
|
8190 |
|
8191 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8192 { |
|
8193 |
|
8194 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8195 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8196 function_type_prefix = return_type_symbol; |
|
8197 break; |
|
8198 |
|
8199 } |
|
8200 |
|
8201 |
|
8202 ERROR; |
|
8203 } |
|
8204 |
|
8205 }/*function_byte_to_dword*/ |
|
8206 break; |
|
8207 |
|
8208 /**** |
|
8209 *BYTE_TO_DT |
|
8210 */ |
|
8211 case function_byte_to_dt : |
|
8212 { |
|
8213 symbol_c *last_type_symbol = NULL; |
|
8214 |
|
8215 { |
|
8216 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8217 symbol_c *IN_param_value = &this->default_variable_name; |
|
8218 |
|
8219 symbol_c *IN_type_symbol = param_data_type; |
|
8220 last_type_symbol = param_data_type; |
|
8221 |
|
8222 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8223 { |
|
8224 |
|
8225 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8226 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8227 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8228 function_type_prefix = return_type_symbol; |
|
8229 break; |
|
8230 |
|
8231 } |
|
8232 |
|
8233 |
|
8234 ERROR; |
|
8235 } |
|
8236 |
|
8237 }/*function_byte_to_dt*/ |
|
8238 break; |
|
8239 |
|
8240 /**** |
|
8241 *BYTE_TO_TOD |
|
8242 */ |
|
8243 case function_byte_to_tod : |
|
8244 { |
|
8245 symbol_c *last_type_symbol = NULL; |
|
8246 |
|
8247 { |
|
8248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8249 symbol_c *IN_param_value = &this->default_variable_name; |
|
8250 |
|
8251 symbol_c *IN_type_symbol = param_data_type; |
|
8252 last_type_symbol = param_data_type; |
|
8253 |
|
8254 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8255 { |
|
8256 |
|
8257 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8258 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8259 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8260 function_type_prefix = return_type_symbol; |
|
8261 break; |
|
8262 |
|
8263 } |
|
8264 |
|
8265 |
|
8266 ERROR; |
|
8267 } |
|
8268 |
|
8269 }/*function_byte_to_tod*/ |
|
8270 break; |
|
8271 |
|
8272 /**** |
|
8273 *BYTE_TO_UDINT |
|
8274 */ |
|
8275 case function_byte_to_udint : |
|
8276 { |
|
8277 symbol_c *last_type_symbol = NULL; |
|
8278 |
|
8279 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8287 { |
|
8288 |
|
8289 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8290 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8291 function_type_prefix = return_type_symbol; |
|
8292 break; |
|
8293 |
|
8294 } |
|
8295 |
|
8296 |
|
8297 ERROR; |
|
8298 } |
|
8299 |
|
8300 }/*function_byte_to_udint*/ |
|
8301 break; |
|
8302 |
|
8303 /**** |
|
8304 *BYTE_TO_WORD |
|
8305 */ |
|
8306 case function_byte_to_word : |
|
8307 { |
|
8308 symbol_c *last_type_symbol = NULL; |
|
8309 |
|
8310 { |
|
8311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8312 symbol_c *IN_param_value = &this->default_variable_name; |
|
8313 |
|
8314 symbol_c *IN_type_symbol = param_data_type; |
|
8315 last_type_symbol = param_data_type; |
|
8316 |
|
8317 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8318 { |
|
8319 |
|
8320 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8321 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8322 function_type_prefix = return_type_symbol; |
|
8323 break; |
|
8324 |
|
8325 } |
|
8326 |
|
8327 |
|
8328 ERROR; |
|
8329 } |
|
8330 |
|
8331 }/*function_byte_to_word*/ |
|
8332 break; |
|
8333 |
|
8334 /**** |
|
8335 *BYTE_TO_STRING |
|
8336 */ |
|
8337 case function_byte_to_string : |
|
8338 { |
|
8339 symbol_c *last_type_symbol = NULL; |
|
8340 |
|
8341 { |
|
8342 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8343 symbol_c *IN_param_value = &this->default_variable_name; |
|
8344 |
|
8345 symbol_c *IN_type_symbol = param_data_type; |
|
8346 last_type_symbol = param_data_type; |
|
8347 |
|
8348 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8349 { |
|
8350 |
|
8351 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
8352 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8353 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8354 function_type_prefix = return_type_symbol; |
|
8355 break; |
|
8356 |
|
8357 } |
|
8358 |
|
8359 |
|
8360 ERROR; |
|
8361 } |
|
8362 |
|
8363 }/*function_byte_to_string*/ |
|
8364 break; |
|
8365 |
|
8366 /**** |
|
8367 *BYTE_TO_LWORD |
|
8368 */ |
|
8369 case function_byte_to_lword : |
|
8370 { |
|
8371 symbol_c *last_type_symbol = NULL; |
|
8372 |
|
8373 { |
|
8374 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8375 symbol_c *IN_param_value = &this->default_variable_name; |
|
8376 |
|
8377 symbol_c *IN_type_symbol = param_data_type; |
|
8378 last_type_symbol = param_data_type; |
|
8379 |
|
8380 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8381 { |
|
8382 |
|
8383 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8384 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8385 function_type_prefix = return_type_symbol; |
|
8386 break; |
|
8387 |
|
8388 } |
|
8389 |
|
8390 |
|
8391 ERROR; |
|
8392 } |
|
8393 |
|
8394 }/*function_byte_to_lword*/ |
|
8395 break; |
|
8396 |
|
8397 /**** |
|
8398 *BYTE_TO_UINT |
|
8399 */ |
|
8400 case function_byte_to_uint : |
|
8401 { |
|
8402 symbol_c *last_type_symbol = NULL; |
|
8403 |
|
8404 { |
|
8405 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8406 symbol_c *IN_param_value = &this->default_variable_name; |
|
8407 |
|
8408 symbol_c *IN_type_symbol = param_data_type; |
|
8409 last_type_symbol = param_data_type; |
|
8410 |
|
8411 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8412 { |
|
8413 |
|
8414 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8415 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
8416 function_type_prefix = return_type_symbol; |
|
8417 break; |
|
8418 |
|
8419 } |
|
8420 |
|
8421 |
|
8422 ERROR; |
|
8423 } |
|
8424 |
|
8425 }/*function_byte_to_uint*/ |
|
8426 break; |
|
8427 |
|
8428 /**** |
|
8429 *BYTE_TO_LREAL |
|
8430 */ |
|
8431 case function_byte_to_lreal : |
|
8432 { |
|
8433 symbol_c *last_type_symbol = NULL; |
|
8434 |
|
8435 { |
|
8436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8437 symbol_c *IN_param_value = &this->default_variable_name; |
|
8438 |
|
8439 symbol_c *IN_type_symbol = param_data_type; |
|
8440 last_type_symbol = param_data_type; |
|
8441 |
|
8442 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8443 { |
|
8444 |
|
8445 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8446 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8447 function_type_prefix = return_type_symbol; |
|
8448 break; |
|
8449 |
|
8450 } |
|
8451 |
|
8452 |
|
8453 ERROR; |
|
8454 } |
|
8455 |
|
8456 }/*function_byte_to_lreal*/ |
|
8457 break; |
|
8458 |
|
8459 /**** |
|
8460 *BYTE_TO_USINT |
|
8461 */ |
|
8462 case function_byte_to_usint : |
|
8463 { |
|
8464 symbol_c *last_type_symbol = NULL; |
|
8465 |
|
8466 { |
|
8467 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8468 symbol_c *IN_param_value = &this->default_variable_name; |
|
8469 |
|
8470 symbol_c *IN_type_symbol = param_data_type; |
|
8471 last_type_symbol = param_data_type; |
|
8472 |
|
8473 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8474 { |
|
8475 |
|
8476 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8477 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8478 function_type_prefix = return_type_symbol; |
|
8479 break; |
|
8480 |
|
8481 } |
|
8482 |
|
8483 |
|
8484 ERROR; |
|
8485 } |
|
8486 |
|
8487 }/*function_byte_to_usint*/ |
|
8488 break; |
|
8489 |
|
8490 /**** |
|
8491 *BYTE_TO_ULINT |
|
8492 */ |
|
8493 case function_byte_to_ulint : |
|
8494 { |
|
8495 symbol_c *last_type_symbol = NULL; |
|
8496 |
|
8497 { |
|
8498 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8499 symbol_c *IN_param_value = &this->default_variable_name; |
|
8500 |
|
8501 symbol_c *IN_type_symbol = param_data_type; |
|
8502 last_type_symbol = param_data_type; |
|
8503 |
|
8504 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8505 { |
|
8506 |
|
8507 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8508 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8509 function_type_prefix = return_type_symbol; |
|
8510 break; |
|
8511 |
|
8512 } |
|
8513 |
|
8514 |
|
8515 ERROR; |
|
8516 } |
|
8517 |
|
8518 }/*function_byte_to_ulint*/ |
|
8519 break; |
|
8520 |
|
8521 /**** |
|
8522 *BYTE_TO_BOOL |
|
8523 */ |
|
8524 case function_byte_to_bool : |
|
8525 { |
|
8526 symbol_c *last_type_symbol = NULL; |
|
8527 |
|
8528 { |
|
8529 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8530 symbol_c *IN_param_value = &this->default_variable_name; |
|
8531 |
|
8532 symbol_c *IN_type_symbol = param_data_type; |
|
8533 last_type_symbol = param_data_type; |
|
8534 |
|
8535 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8536 { |
|
8537 |
|
8538 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8539 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8540 function_type_prefix = return_type_symbol; |
|
8541 break; |
|
8542 |
|
8543 } |
|
8544 |
|
8545 |
|
8546 ERROR; |
|
8547 } |
|
8548 |
|
8549 }/*function_byte_to_bool*/ |
|
8550 break; |
|
8551 |
|
8552 /**** |
|
8553 *BYTE_TO_TIME |
|
8554 */ |
|
8555 case function_byte_to_time : |
|
8556 { |
|
8557 symbol_c *last_type_symbol = NULL; |
|
8558 |
|
8559 { |
|
8560 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8561 symbol_c *IN_param_value = &this->default_variable_name; |
|
8562 |
|
8563 symbol_c *IN_type_symbol = param_data_type; |
|
8564 last_type_symbol = param_data_type; |
|
8565 |
|
8566 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8567 { |
|
8568 |
|
8569 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8570 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8571 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
8572 function_type_prefix = return_type_symbol; |
|
8573 break; |
|
8574 |
|
8575 } |
|
8576 |
|
8577 |
|
8578 ERROR; |
|
8579 } |
|
8580 |
|
8581 }/*function_byte_to_time*/ |
|
8582 break; |
|
8583 |
|
8584 /**** |
|
8585 *BYTE_TO_INT |
|
8586 */ |
|
8587 case function_byte_to_int : |
|
8588 { |
|
8589 symbol_c *last_type_symbol = NULL; |
|
8590 |
|
8591 { |
|
8592 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8593 symbol_c *IN_param_value = &this->default_variable_name; |
|
8594 |
|
8595 symbol_c *IN_type_symbol = param_data_type; |
|
8596 last_type_symbol = param_data_type; |
|
8597 |
|
8598 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
8599 { |
|
8600 |
|
8601 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8602 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8603 function_type_prefix = return_type_symbol; |
|
8604 break; |
|
8605 |
|
8606 } |
|
8607 |
|
8608 |
|
8609 ERROR; |
|
8610 } |
|
8611 |
|
8612 }/*function_byte_to_int*/ |
|
8613 break; |
|
8614 |
|
8615 /**** |
|
8616 *USINT_TO_REAL |
|
8617 */ |
|
8618 case function_usint_to_real : |
|
8619 { |
|
8620 symbol_c *last_type_symbol = NULL; |
|
8621 |
|
8622 { |
|
8623 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8624 symbol_c *IN_param_value = &this->default_variable_name; |
|
8625 |
|
8626 symbol_c *IN_type_symbol = param_data_type; |
|
8627 last_type_symbol = param_data_type; |
|
8628 |
|
8629 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8630 { |
|
8631 |
|
8632 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8633 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8634 function_type_prefix = return_type_symbol; |
|
8635 break; |
|
8636 |
|
8637 } |
|
8638 |
|
8639 |
|
8640 ERROR; |
|
8641 } |
|
8642 |
|
8643 }/*function_usint_to_real*/ |
|
8644 break; |
|
8645 |
|
8646 /**** |
|
8647 *USINT_TO_SINT |
|
8648 */ |
|
8649 case function_usint_to_sint : |
|
8650 { |
|
8651 symbol_c *last_type_symbol = NULL; |
|
8652 |
|
8653 { |
|
8654 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8655 symbol_c *IN_param_value = &this->default_variable_name; |
|
8656 |
|
8657 symbol_c *IN_type_symbol = param_data_type; |
|
8658 last_type_symbol = param_data_type; |
|
8659 |
|
8660 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8661 { |
|
8662 |
|
8663 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8664 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8665 function_type_prefix = return_type_symbol; |
|
8666 break; |
|
8667 |
|
8668 } |
|
8669 |
|
8670 |
|
8671 ERROR; |
|
8672 } |
|
8673 |
|
8674 }/*function_usint_to_sint*/ |
|
8675 break; |
|
8676 |
|
8677 /**** |
|
8678 *USINT_TO_LINT |
|
8679 */ |
|
8680 case function_usint_to_lint : |
|
8681 { |
|
8682 symbol_c *last_type_symbol = NULL; |
|
8683 |
|
8684 { |
|
8685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8686 symbol_c *IN_param_value = &this->default_variable_name; |
|
8687 |
|
8688 symbol_c *IN_type_symbol = param_data_type; |
|
8689 last_type_symbol = param_data_type; |
|
8690 |
|
8691 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8692 { |
|
8693 |
|
8694 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8695 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8696 function_type_prefix = return_type_symbol; |
|
8697 break; |
|
8698 |
|
8699 } |
|
8700 |
|
8701 |
|
8702 ERROR; |
|
8703 } |
|
8704 |
|
8705 }/*function_usint_to_lint*/ |
|
8706 break; |
|
8707 |
|
8708 /**** |
|
8709 *USINT_TO_DINT |
|
8710 */ |
|
8711 case function_usint_to_dint : |
|
8712 { |
|
8713 symbol_c *last_type_symbol = NULL; |
|
8714 |
|
8715 { |
|
8716 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8717 symbol_c *IN_param_value = &this->default_variable_name; |
|
8718 |
|
8719 symbol_c *IN_type_symbol = param_data_type; |
|
8720 last_type_symbol = param_data_type; |
|
8721 |
|
8722 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8723 { |
|
8724 |
|
8725 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8726 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8727 function_type_prefix = return_type_symbol; |
|
8728 break; |
|
8729 |
|
8730 } |
|
8731 |
|
8732 |
|
8733 ERROR; |
|
8734 } |
|
8735 |
|
8736 }/*function_usint_to_dint*/ |
|
8737 break; |
|
8738 |
|
8739 /**** |
|
8740 *USINT_TO_DATE |
|
8741 */ |
|
8742 case function_usint_to_date : |
|
8743 { |
|
8744 symbol_c *last_type_symbol = NULL; |
|
8745 |
|
8746 { |
|
8747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8748 symbol_c *IN_param_value = &this->default_variable_name; |
|
8749 |
|
8750 symbol_c *IN_type_symbol = param_data_type; |
|
8751 last_type_symbol = param_data_type; |
|
8752 |
|
8753 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8754 { |
|
8755 |
|
8756 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8757 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8758 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
8759 function_type_prefix = return_type_symbol; |
|
8760 break; |
|
8761 |
|
8762 } |
|
8763 |
|
8764 |
|
8765 ERROR; |
|
8766 } |
|
8767 |
|
8768 }/*function_usint_to_date*/ |
|
8769 break; |
|
8770 |
|
8771 /**** |
|
8772 *USINT_TO_DWORD |
|
8773 */ |
|
8774 case function_usint_to_dword : |
|
8775 { |
|
8776 symbol_c *last_type_symbol = NULL; |
|
8777 |
|
8778 { |
|
8779 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8780 symbol_c *IN_param_value = &this->default_variable_name; |
|
8781 |
|
8782 symbol_c *IN_type_symbol = param_data_type; |
|
8783 last_type_symbol = param_data_type; |
|
8784 |
|
8785 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8786 { |
|
8787 |
|
8788 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8789 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8790 function_type_prefix = return_type_symbol; |
|
8791 break; |
|
8792 |
|
8793 } |
|
8794 |
|
8795 |
|
8796 ERROR; |
|
8797 } |
|
8798 |
|
8799 }/*function_usint_to_dword*/ |
|
8800 break; |
|
8801 |
|
8802 /**** |
|
8803 *USINT_TO_DT |
|
8804 */ |
|
8805 case function_usint_to_dt : |
|
8806 { |
|
8807 symbol_c *last_type_symbol = NULL; |
|
8808 |
|
8809 { |
|
8810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8811 symbol_c *IN_param_value = &this->default_variable_name; |
|
8812 |
|
8813 symbol_c *IN_type_symbol = param_data_type; |
|
8814 last_type_symbol = param_data_type; |
|
8815 |
|
8816 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8817 { |
|
8818 |
|
8819 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8820 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8821 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
8822 function_type_prefix = return_type_symbol; |
|
8823 break; |
|
8824 |
|
8825 } |
|
8826 |
|
8827 |
|
8828 ERROR; |
|
8829 } |
|
8830 |
|
8831 }/*function_usint_to_dt*/ |
|
8832 break; |
|
8833 |
|
8834 /**** |
|
8835 *USINT_TO_TOD |
|
8836 */ |
|
8837 case function_usint_to_tod : |
|
8838 { |
|
8839 symbol_c *last_type_symbol = NULL; |
|
8840 |
|
8841 { |
|
8842 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8843 symbol_c *IN_param_value = &this->default_variable_name; |
|
8844 |
|
8845 symbol_c *IN_type_symbol = param_data_type; |
|
8846 last_type_symbol = param_data_type; |
|
8847 |
|
8848 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8849 { |
|
8850 |
|
8851 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8852 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8853 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
8854 function_type_prefix = return_type_symbol; |
|
8855 break; |
|
8856 |
|
8857 } |
|
8858 |
|
8859 |
|
8860 ERROR; |
|
8861 } |
|
8862 |
|
8863 }/*function_usint_to_tod*/ |
|
8864 break; |
|
8865 |
|
8866 /**** |
|
8867 *USINT_TO_UDINT |
|
8868 */ |
|
8869 case function_usint_to_udint : |
|
8870 { |
|
8871 symbol_c *last_type_symbol = NULL; |
|
8872 |
|
8873 { |
|
8874 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8875 symbol_c *IN_param_value = &this->default_variable_name; |
|
8876 |
|
8877 symbol_c *IN_type_symbol = param_data_type; |
|
8878 last_type_symbol = param_data_type; |
|
8879 |
|
8880 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8881 { |
|
8882 |
|
8883 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8884 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8885 function_type_prefix = return_type_symbol; |
|
8886 break; |
|
8887 |
|
8888 } |
|
8889 |
|
8890 |
|
8891 ERROR; |
|
8892 } |
|
8893 |
|
8894 }/*function_usint_to_udint*/ |
|
8895 break; |
|
8896 |
|
8897 /**** |
|
8898 *USINT_TO_WORD |
|
8899 */ |
|
8900 case function_usint_to_word : |
|
8901 { |
|
8902 symbol_c *last_type_symbol = NULL; |
|
8903 |
|
8904 { |
|
8905 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8906 symbol_c *IN_param_value = &this->default_variable_name; |
|
8907 |
|
8908 symbol_c *IN_type_symbol = param_data_type; |
|
8909 last_type_symbol = param_data_type; |
|
8910 |
|
8911 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8912 { |
|
8913 |
|
8914 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8915 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8916 function_type_prefix = return_type_symbol; |
|
8917 break; |
|
8918 |
|
8919 } |
|
8920 |
|
8921 |
|
8922 ERROR; |
|
8923 } |
|
8924 |
|
8925 }/*function_usint_to_word*/ |
|
8926 break; |
|
8927 |
|
8928 /**** |
|
8929 *USINT_TO_STRING |
|
8930 */ |
|
8931 case function_usint_to_string : |
|
8932 { |
|
8933 symbol_c *last_type_symbol = NULL; |
|
8934 |
|
8935 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8943 { |
|
8944 |
|
8945 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
8946 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8947 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8948 function_type_prefix = return_type_symbol; |
|
8949 break; |
|
8950 |
|
8951 } |
|
8952 |
|
8953 |
|
8954 ERROR; |
|
8955 } |
|
8956 |
|
8957 }/*function_usint_to_string*/ |
|
8958 break; |
|
8959 |
|
8960 /**** |
|
8961 *USINT_TO_LWORD |
|
8962 */ |
|
8963 case function_usint_to_lword : |
|
8964 { |
|
8965 symbol_c *last_type_symbol = NULL; |
|
8966 |
|
8967 { |
|
8968 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8969 symbol_c *IN_param_value = &this->default_variable_name; |
|
8970 |
|
8971 symbol_c *IN_type_symbol = param_data_type; |
|
8972 last_type_symbol = param_data_type; |
|
8973 |
|
8974 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
8975 { |
|
8976 |
|
8977 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
8978 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8979 function_type_prefix = return_type_symbol; |
|
8980 break; |
|
8981 |
|
8982 } |
|
8983 |
|
8984 |
|
8985 ERROR; |
|
8986 } |
|
8987 |
|
8988 }/*function_usint_to_lword*/ |
|
8989 break; |
|
8990 |
|
8991 /**** |
|
8992 *USINT_TO_UINT |
|
8993 */ |
|
8994 case function_usint_to_uint : |
|
8995 { |
|
8996 symbol_c *last_type_symbol = NULL; |
|
8997 |
|
8998 { |
|
8999 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9000 symbol_c *IN_param_value = &this->default_variable_name; |
|
9001 |
|
9002 symbol_c *IN_type_symbol = param_data_type; |
|
9003 last_type_symbol = param_data_type; |
|
9004 |
|
9005 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9006 { |
|
9007 |
|
9008 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9009 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9010 function_type_prefix = return_type_symbol; |
|
9011 break; |
|
9012 |
|
9013 } |
|
9014 |
|
9015 |
|
9016 ERROR; |
|
9017 } |
|
9018 |
|
9019 }/*function_usint_to_uint*/ |
|
9020 break; |
|
9021 |
|
9022 /**** |
|
9023 *USINT_TO_LREAL |
|
9024 */ |
|
9025 case function_usint_to_lreal : |
|
9026 { |
|
9027 symbol_c *last_type_symbol = NULL; |
|
9028 |
|
9029 { |
|
9030 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9031 symbol_c *IN_param_value = &this->default_variable_name; |
|
9032 |
|
9033 symbol_c *IN_type_symbol = param_data_type; |
|
9034 last_type_symbol = param_data_type; |
|
9035 |
|
9036 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9037 { |
|
9038 |
|
9039 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9040 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9041 function_type_prefix = return_type_symbol; |
|
9042 break; |
|
9043 |
|
9044 } |
|
9045 |
|
9046 |
|
9047 ERROR; |
|
9048 } |
|
9049 |
|
9050 }/*function_usint_to_lreal*/ |
|
9051 break; |
|
9052 |
|
9053 /**** |
|
9054 *USINT_TO_BYTE |
|
9055 */ |
|
9056 case function_usint_to_byte : |
|
9057 { |
|
9058 symbol_c *last_type_symbol = NULL; |
|
9059 |
|
9060 { |
|
9061 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9062 symbol_c *IN_param_value = &this->default_variable_name; |
|
9063 |
|
9064 symbol_c *IN_type_symbol = param_data_type; |
|
9065 last_type_symbol = param_data_type; |
|
9066 |
|
9067 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9068 { |
|
9069 |
|
9070 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9071 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9072 function_type_prefix = return_type_symbol; |
|
9073 break; |
|
9074 |
|
9075 } |
|
9076 |
|
9077 |
|
9078 ERROR; |
|
9079 } |
|
9080 |
|
9081 }/*function_usint_to_byte*/ |
|
9082 break; |
|
9083 |
|
9084 /**** |
|
9085 *USINT_TO_ULINT |
|
9086 */ |
|
9087 case function_usint_to_ulint : |
|
9088 { |
|
9089 symbol_c *last_type_symbol = NULL; |
|
9090 |
|
9091 { |
|
9092 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9093 symbol_c *IN_param_value = &this->default_variable_name; |
|
9094 |
|
9095 symbol_c *IN_type_symbol = param_data_type; |
|
9096 last_type_symbol = param_data_type; |
|
9097 |
|
9098 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9099 { |
|
9100 |
|
9101 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9102 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9103 function_type_prefix = return_type_symbol; |
|
9104 break; |
|
9105 |
|
9106 } |
|
9107 |
|
9108 |
|
9109 ERROR; |
|
9110 } |
|
9111 |
|
9112 }/*function_usint_to_ulint*/ |
|
9113 break; |
|
9114 |
|
9115 /**** |
|
9116 *USINT_TO_BOOL |
|
9117 */ |
|
9118 case function_usint_to_bool : |
|
9119 { |
|
9120 symbol_c *last_type_symbol = NULL; |
|
9121 |
|
9122 { |
|
9123 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9124 symbol_c *IN_param_value = &this->default_variable_name; |
|
9125 |
|
9126 symbol_c *IN_type_symbol = param_data_type; |
|
9127 last_type_symbol = param_data_type; |
|
9128 |
|
9129 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9130 { |
|
9131 |
|
9132 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9133 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9134 function_type_prefix = return_type_symbol; |
|
9135 break; |
|
9136 |
|
9137 } |
|
9138 |
|
9139 |
|
9140 ERROR; |
|
9141 } |
|
9142 |
|
9143 }/*function_usint_to_bool*/ |
|
9144 break; |
|
9145 |
|
9146 /**** |
|
9147 *USINT_TO_TIME |
|
9148 */ |
|
9149 case function_usint_to_time : |
|
9150 { |
|
9151 symbol_c *last_type_symbol = NULL; |
|
9152 |
|
9153 { |
|
9154 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9155 symbol_c *IN_param_value = &this->default_variable_name; |
|
9156 |
|
9157 symbol_c *IN_type_symbol = param_data_type; |
|
9158 last_type_symbol = param_data_type; |
|
9159 |
|
9160 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9161 { |
|
9162 |
|
9163 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9164 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9165 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9166 function_type_prefix = return_type_symbol; |
|
9167 break; |
|
9168 |
|
9169 } |
|
9170 |
|
9171 |
|
9172 ERROR; |
|
9173 } |
|
9174 |
|
9175 }/*function_usint_to_time*/ |
|
9176 break; |
|
9177 |
|
9178 /**** |
|
9179 *USINT_TO_INT |
|
9180 */ |
|
9181 case function_usint_to_int : |
|
9182 { |
|
9183 symbol_c *last_type_symbol = NULL; |
|
9184 |
|
9185 { |
|
9186 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9187 symbol_c *IN_param_value = &this->default_variable_name; |
|
9188 |
|
9189 symbol_c *IN_type_symbol = param_data_type; |
|
9190 last_type_symbol = param_data_type; |
|
9191 |
|
9192 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
9193 { |
|
9194 |
|
9195 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9196 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9197 function_type_prefix = return_type_symbol; |
|
9198 break; |
|
9199 |
|
9200 } |
|
9201 |
|
9202 |
|
9203 ERROR; |
|
9204 } |
|
9205 |
|
9206 }/*function_usint_to_int*/ |
|
9207 break; |
|
9208 |
|
9209 /**** |
|
9210 *ULINT_TO_REAL |
|
9211 */ |
|
9212 case function_ulint_to_real : |
|
9213 { |
|
9214 symbol_c *last_type_symbol = NULL; |
|
9215 |
|
9216 { |
|
9217 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9218 symbol_c *IN_param_value = &this->default_variable_name; |
|
9219 |
|
9220 symbol_c *IN_type_symbol = param_data_type; |
|
9221 last_type_symbol = param_data_type; |
|
9222 |
|
9223 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9224 { |
|
9225 |
|
9226 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9227 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9228 function_type_prefix = return_type_symbol; |
|
9229 break; |
|
9230 |
|
9231 } |
|
9232 |
|
9233 |
|
9234 ERROR; |
|
9235 } |
|
9236 |
|
9237 }/*function_ulint_to_real*/ |
|
9238 break; |
|
9239 |
|
9240 /**** |
|
9241 *ULINT_TO_SINT |
|
9242 */ |
|
9243 case function_ulint_to_sint : |
|
9244 { |
|
9245 symbol_c *last_type_symbol = NULL; |
|
9246 |
|
9247 { |
|
9248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9249 symbol_c *IN_param_value = &this->default_variable_name; |
|
9250 |
|
9251 symbol_c *IN_type_symbol = param_data_type; |
|
9252 last_type_symbol = param_data_type; |
|
9253 |
|
9254 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9255 { |
|
9256 |
|
9257 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9258 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9259 function_type_prefix = return_type_symbol; |
|
9260 break; |
|
9261 |
|
9262 } |
|
9263 |
|
9264 |
|
9265 ERROR; |
|
9266 } |
|
9267 |
|
9268 }/*function_ulint_to_sint*/ |
|
9269 break; |
|
9270 |
|
9271 /**** |
|
9272 *ULINT_TO_LINT |
|
9273 */ |
|
9274 case function_ulint_to_lint : |
|
9275 { |
|
9276 symbol_c *last_type_symbol = NULL; |
|
9277 |
|
9278 { |
|
9279 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9280 symbol_c *IN_param_value = &this->default_variable_name; |
|
9281 |
|
9282 symbol_c *IN_type_symbol = param_data_type; |
|
9283 last_type_symbol = param_data_type; |
|
9284 |
|
9285 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9286 { |
|
9287 |
|
9288 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9289 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9290 function_type_prefix = return_type_symbol; |
|
9291 break; |
|
9292 |
|
9293 } |
|
9294 |
|
9295 |
|
9296 ERROR; |
|
9297 } |
|
9298 |
|
9299 }/*function_ulint_to_lint*/ |
|
9300 break; |
|
9301 |
|
9302 /**** |
|
9303 *ULINT_TO_DINT |
|
9304 */ |
|
9305 case function_ulint_to_dint : |
|
9306 { |
|
9307 symbol_c *last_type_symbol = NULL; |
|
9308 |
|
9309 { |
|
9310 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9311 symbol_c *IN_param_value = &this->default_variable_name; |
|
9312 |
|
9313 symbol_c *IN_type_symbol = param_data_type; |
|
9314 last_type_symbol = param_data_type; |
|
9315 |
|
9316 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9317 { |
|
9318 |
|
9319 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9320 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9321 function_type_prefix = return_type_symbol; |
|
9322 break; |
|
9323 |
|
9324 } |
|
9325 |
|
9326 |
|
9327 ERROR; |
|
9328 } |
|
9329 |
|
9330 }/*function_ulint_to_dint*/ |
|
9331 break; |
|
9332 |
|
9333 /**** |
|
9334 *ULINT_TO_DATE |
|
9335 */ |
|
9336 case function_ulint_to_date : |
|
9337 { |
|
9338 symbol_c *last_type_symbol = NULL; |
|
9339 |
|
9340 { |
|
9341 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9342 symbol_c *IN_param_value = &this->default_variable_name; |
|
9343 |
|
9344 symbol_c *IN_type_symbol = param_data_type; |
|
9345 last_type_symbol = param_data_type; |
|
9346 |
|
9347 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9348 { |
|
9349 |
|
9350 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9351 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9352 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9353 function_type_prefix = return_type_symbol; |
|
9354 break; |
|
9355 |
|
9356 } |
|
9357 |
|
9358 |
|
9359 ERROR; |
|
9360 } |
|
9361 |
|
9362 }/*function_ulint_to_date*/ |
|
9363 break; |
|
9364 |
|
9365 /**** |
|
9366 *ULINT_TO_DWORD |
|
9367 */ |
|
9368 case function_ulint_to_dword : |
|
9369 { |
|
9370 symbol_c *last_type_symbol = NULL; |
|
9371 |
|
9372 { |
|
9373 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9374 symbol_c *IN_param_value = &this->default_variable_name; |
|
9375 |
|
9376 symbol_c *IN_type_symbol = param_data_type; |
|
9377 last_type_symbol = param_data_type; |
|
9378 |
|
9379 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9380 { |
|
9381 |
|
9382 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9383 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
9384 function_type_prefix = return_type_symbol; |
|
9385 break; |
|
9386 |
|
9387 } |
|
9388 |
|
9389 |
|
9390 ERROR; |
|
9391 } |
|
9392 |
|
9393 }/*function_ulint_to_dword*/ |
|
9394 break; |
|
9395 |
|
9396 /**** |
|
9397 *ULINT_TO_DT |
|
9398 */ |
|
9399 case function_ulint_to_dt : |
|
9400 { |
|
9401 symbol_c *last_type_symbol = NULL; |
|
9402 |
|
9403 { |
|
9404 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9405 symbol_c *IN_param_value = &this->default_variable_name; |
|
9406 |
|
9407 symbol_c *IN_type_symbol = param_data_type; |
|
9408 last_type_symbol = param_data_type; |
|
9409 |
|
9410 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9411 { |
|
9412 |
|
9413 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9414 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9415 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9416 function_type_prefix = return_type_symbol; |
|
9417 break; |
|
9418 |
|
9419 } |
|
9420 |
|
9421 |
|
9422 ERROR; |
|
9423 } |
|
9424 |
|
9425 }/*function_ulint_to_dt*/ |
|
9426 break; |
|
9427 |
|
9428 /**** |
|
9429 *ULINT_TO_TOD |
|
9430 */ |
|
9431 case function_ulint_to_tod : |
|
9432 { |
|
9433 symbol_c *last_type_symbol = NULL; |
|
9434 |
|
9435 { |
|
9436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9437 symbol_c *IN_param_value = &this->default_variable_name; |
|
9438 |
|
9439 symbol_c *IN_type_symbol = param_data_type; |
|
9440 last_type_symbol = param_data_type; |
|
9441 |
|
9442 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9443 { |
|
9444 |
|
9445 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9446 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9447 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9448 function_type_prefix = return_type_symbol; |
|
9449 break; |
|
9450 |
|
9451 } |
|
9452 |
|
9453 |
|
9454 ERROR; |
|
9455 } |
|
9456 |
|
9457 }/*function_ulint_to_tod*/ |
|
9458 break; |
|
9459 |
|
9460 /**** |
|
9461 *ULINT_TO_UDINT |
|
9462 */ |
|
9463 case function_ulint_to_udint : |
|
9464 { |
|
9465 symbol_c *last_type_symbol = NULL; |
|
9466 |
|
9467 { |
|
9468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9469 symbol_c *IN_param_value = &this->default_variable_name; |
|
9470 |
|
9471 symbol_c *IN_type_symbol = param_data_type; |
|
9472 last_type_symbol = param_data_type; |
|
9473 |
|
9474 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9475 { |
|
9476 |
|
9477 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9478 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9479 function_type_prefix = return_type_symbol; |
|
9480 break; |
|
9481 |
|
9482 } |
|
9483 |
|
9484 |
|
9485 ERROR; |
|
9486 } |
|
9487 |
|
9488 }/*function_ulint_to_udint*/ |
|
9489 break; |
|
9490 |
|
9491 /**** |
|
9492 *ULINT_TO_WORD |
|
9493 */ |
|
9494 case function_ulint_to_word : |
|
9495 { |
|
9496 symbol_c *last_type_symbol = NULL; |
|
9497 |
|
9498 { |
|
9499 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9500 symbol_c *IN_param_value = &this->default_variable_name; |
|
9501 |
|
9502 symbol_c *IN_type_symbol = param_data_type; |
|
9503 last_type_symbol = param_data_type; |
|
9504 |
|
9505 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9506 { |
|
9507 |
|
9508 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9509 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9510 function_type_prefix = return_type_symbol; |
|
9511 break; |
|
9512 |
|
9513 } |
|
9514 |
|
9515 |
|
9516 ERROR; |
|
9517 } |
|
9518 |
|
9519 }/*function_ulint_to_word*/ |
|
9520 break; |
|
9521 |
|
9522 /**** |
|
9523 *ULINT_TO_STRING |
|
9524 */ |
|
9525 case function_ulint_to_string : |
|
9526 { |
|
9527 symbol_c *last_type_symbol = NULL; |
|
9528 |
|
9529 { |
|
9530 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9531 symbol_c *IN_param_value = &this->default_variable_name; |
|
9532 |
|
9533 symbol_c *IN_type_symbol = param_data_type; |
|
9534 last_type_symbol = param_data_type; |
|
9535 |
|
9536 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9537 { |
|
9538 |
|
9539 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
9540 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9541 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9542 function_type_prefix = return_type_symbol; |
|
9543 break; |
|
9544 |
|
9545 } |
|
9546 |
|
9547 |
|
9548 ERROR; |
|
9549 } |
|
9550 |
|
9551 }/*function_ulint_to_string*/ |
|
9552 break; |
|
9553 |
|
9554 /**** |
|
9555 *ULINT_TO_LWORD |
|
9556 */ |
|
9557 case function_ulint_to_lword : |
|
9558 { |
|
9559 symbol_c *last_type_symbol = NULL; |
|
9560 |
|
9561 { |
|
9562 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9563 symbol_c *IN_param_value = &this->default_variable_name; |
|
9564 |
|
9565 symbol_c *IN_type_symbol = param_data_type; |
|
9566 last_type_symbol = param_data_type; |
|
9567 |
|
9568 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9569 { |
|
9570 |
|
9571 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9572 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9573 function_type_prefix = return_type_symbol; |
|
9574 break; |
|
9575 |
|
9576 } |
|
9577 |
|
9578 |
|
9579 ERROR; |
|
9580 } |
|
9581 |
|
9582 }/*function_ulint_to_lword*/ |
|
9583 break; |
|
9584 |
|
9585 /**** |
|
9586 *ULINT_TO_UINT |
|
9587 */ |
|
9588 case function_ulint_to_uint : |
|
9589 { |
|
9590 symbol_c *last_type_symbol = NULL; |
|
9591 |
|
9592 { |
|
9593 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9594 symbol_c *IN_param_value = &this->default_variable_name; |
|
9595 |
|
9596 symbol_c *IN_type_symbol = param_data_type; |
|
9597 last_type_symbol = param_data_type; |
|
9598 |
|
9599 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9600 { |
|
9601 |
|
9602 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9603 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9604 function_type_prefix = return_type_symbol; |
|
9605 break; |
|
9606 |
|
9607 } |
|
9608 |
|
9609 |
|
9610 ERROR; |
|
9611 } |
|
9612 |
|
9613 }/*function_ulint_to_uint*/ |
|
9614 break; |
|
9615 |
|
9616 /**** |
|
9617 *ULINT_TO_LREAL |
|
9618 */ |
|
9619 case function_ulint_to_lreal : |
|
9620 { |
|
9621 symbol_c *last_type_symbol = NULL; |
|
9622 |
|
9623 { |
|
9624 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9625 symbol_c *IN_param_value = &this->default_variable_name; |
|
9626 |
|
9627 symbol_c *IN_type_symbol = param_data_type; |
|
9628 last_type_symbol = param_data_type; |
|
9629 |
|
9630 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9631 { |
|
9632 |
|
9633 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9634 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9635 function_type_prefix = return_type_symbol; |
|
9636 break; |
|
9637 |
|
9638 } |
|
9639 |
|
9640 |
|
9641 ERROR; |
|
9642 } |
|
9643 |
|
9644 }/*function_ulint_to_lreal*/ |
|
9645 break; |
|
9646 |
|
9647 /**** |
|
9648 *ULINT_TO_BYTE |
|
9649 */ |
|
9650 case function_ulint_to_byte : |
|
9651 { |
|
9652 symbol_c *last_type_symbol = NULL; |
|
9653 |
|
9654 { |
|
9655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9656 symbol_c *IN_param_value = &this->default_variable_name; |
|
9657 |
|
9658 symbol_c *IN_type_symbol = param_data_type; |
|
9659 last_type_symbol = param_data_type; |
|
9660 |
|
9661 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9662 { |
|
9663 |
|
9664 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9665 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9666 function_type_prefix = return_type_symbol; |
|
9667 break; |
|
9668 |
|
9669 } |
|
9670 |
|
9671 |
|
9672 ERROR; |
|
9673 } |
|
9674 |
|
9675 }/*function_ulint_to_byte*/ |
|
9676 break; |
|
9677 |
|
9678 /**** |
|
9679 *ULINT_TO_USINT |
|
9680 */ |
|
9681 case function_ulint_to_usint : |
|
9682 { |
|
9683 symbol_c *last_type_symbol = NULL; |
|
9684 |
|
9685 { |
|
9686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9687 symbol_c *IN_param_value = &this->default_variable_name; |
|
9688 |
|
9689 symbol_c *IN_type_symbol = param_data_type; |
|
9690 last_type_symbol = param_data_type; |
|
9691 |
|
9692 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9693 { |
|
9694 |
|
9695 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9696 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9697 function_type_prefix = return_type_symbol; |
|
9698 break; |
|
9699 |
|
9700 } |
|
9701 |
|
9702 |
|
9703 ERROR; |
|
9704 } |
|
9705 |
|
9706 }/*function_ulint_to_usint*/ |
|
9707 break; |
|
9708 |
|
9709 /**** |
|
9710 *ULINT_TO_BOOL |
|
9711 */ |
|
9712 case function_ulint_to_bool : |
|
9713 { |
|
9714 symbol_c *last_type_symbol = NULL; |
|
9715 |
|
9716 { |
|
9717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9718 symbol_c *IN_param_value = &this->default_variable_name; |
|
9719 |
|
9720 symbol_c *IN_type_symbol = param_data_type; |
|
9721 last_type_symbol = param_data_type; |
|
9722 |
|
9723 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9724 { |
|
9725 |
|
9726 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9727 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9728 function_type_prefix = return_type_symbol; |
|
9729 break; |
|
9730 |
|
9731 } |
|
9732 |
|
9733 |
|
9734 ERROR; |
|
9735 } |
|
9736 |
|
9737 }/*function_ulint_to_bool*/ |
|
9738 break; |
|
9739 |
|
9740 /**** |
|
9741 *ULINT_TO_TIME |
|
9742 */ |
|
9743 case function_ulint_to_time : |
|
9744 { |
|
9745 symbol_c *last_type_symbol = NULL; |
|
9746 |
|
9747 { |
|
9748 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9749 symbol_c *IN_param_value = &this->default_variable_name; |
|
9750 |
|
9751 symbol_c *IN_type_symbol = param_data_type; |
|
9752 last_type_symbol = param_data_type; |
|
9753 |
|
9754 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9755 { |
|
9756 |
|
9757 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9758 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9759 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9760 function_type_prefix = return_type_symbol; |
|
9761 break; |
|
9762 |
|
9763 } |
|
9764 |
|
9765 |
|
9766 ERROR; |
|
9767 } |
|
9768 |
|
9769 }/*function_ulint_to_time*/ |
|
9770 break; |
|
9771 |
|
9772 /**** |
|
9773 *ULINT_TO_INT |
|
9774 */ |
|
9775 case function_ulint_to_int : |
|
9776 { |
|
9777 symbol_c *last_type_symbol = NULL; |
|
9778 |
|
9779 { |
|
9780 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9781 symbol_c *IN_param_value = &this->default_variable_name; |
|
9782 |
|
9783 symbol_c *IN_type_symbol = param_data_type; |
|
9784 last_type_symbol = param_data_type; |
|
9785 |
|
9786 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
9787 { |
|
9788 |
|
9789 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9790 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9791 function_type_prefix = return_type_symbol; |
|
9792 break; |
|
9793 |
|
9794 } |
|
9795 |
|
9796 |
|
9797 ERROR; |
|
9798 } |
|
9799 |
|
9800 }/*function_ulint_to_int*/ |
|
9801 break; |
|
9802 |
|
9803 /**** |
|
9804 *BOOL_TO_REAL |
|
9805 */ |
|
9806 case function_bool_to_real : |
|
9807 { |
|
9808 symbol_c *last_type_symbol = NULL; |
|
9809 |
|
9810 { |
|
9811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9812 symbol_c *IN_param_value = &this->default_variable_name; |
|
9813 |
|
9814 symbol_c *IN_type_symbol = param_data_type; |
|
9815 last_type_symbol = param_data_type; |
|
9816 |
|
9817 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
9818 { |
|
9819 |
|
9820 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
9821 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9822 function_type_prefix = return_type_symbol; |
|
9823 break; |
|
9824 |
|
9825 } |
|
9826 |
|
9827 |
|
9828 ERROR; |
|
9829 } |
|
9830 |
|
9831 }/*function_bool_to_real*/ |
|
9832 break; |
|
9833 |
|
9834 /**** |
33 *BOOL_TO_SINT |
9835 *BOOL_TO_SINT |
34 */ |
9836 */ |
35 case function_bool_to_sint : |
9837 case function_bool_to_sint : |
36 { |
9838 { |
37 symbol_c *last_type_symbol = NULL; |
9839 symbol_c *last_type_symbol = NULL; |
76 last_type_symbol = param_data_type; |
10378 last_type_symbol = param_data_type; |
77 |
10379 |
78 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
10380 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
79 { |
10381 { |
80 |
10382 |
|
10383 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
81 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
10384 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
82 s4o.print("("); |
10385 function_type_prefix = return_type_symbol; |
83 return_type_symbol->accept(*this); |
10386 break; |
84 s4o.print(")"); |
10387 |
85 IN_param_value->accept(*this); |
10388 } |
86 return NULL; |
10389 |
87 |
|
88 } |
|
89 |
10390 |
90 ERROR; |
10391 ERROR; |
91 } |
10392 } |
92 |
10393 |
93 }/*function_bool_to_int*/ |
10394 }/*function_bool_to_int*/ |
94 break; |
10395 break; |
95 |
10396 |
96 /**** |
10397 /**** |
97 *BOOL_TO_DINT |
10398 *TIME_TO_REAL |
98 */ |
10399 */ |
99 case function_bool_to_dint : |
10400 case function_time_to_real : |
100 { |
10401 { |
101 symbol_c *last_type_symbol = NULL; |
10402 symbol_c *last_type_symbol = NULL; |
102 |
10403 |
103 { |
10404 { |
104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10405 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
105 symbol_c *IN_param_value = &this->default_variable_name; |
10406 symbol_c *IN_param_value = &this->default_variable_name; |
106 |
10407 |
107 symbol_c *IN_type_symbol = param_data_type; |
10408 symbol_c *IN_type_symbol = param_data_type; |
108 last_type_symbol = param_data_type; |
10409 last_type_symbol = param_data_type; |
109 |
10410 |
110 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
10411 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
111 { |
10412 { |
112 |
10413 |
|
10414 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
10415 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10416 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10417 function_type_prefix = return_type_symbol; |
|
10418 break; |
|
10419 |
|
10420 } |
|
10421 |
|
10422 |
|
10423 ERROR; |
|
10424 } |
|
10425 |
|
10426 }/*function_time_to_real*/ |
|
10427 break; |
|
10428 |
|
10429 /**** |
|
10430 *TIME_TO_SINT |
|
10431 */ |
|
10432 case function_time_to_sint : |
|
10433 { |
|
10434 symbol_c *last_type_symbol = NULL; |
|
10435 |
|
10436 { |
|
10437 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10438 symbol_c *IN_param_value = &this->default_variable_name; |
|
10439 |
|
10440 symbol_c *IN_type_symbol = param_data_type; |
|
10441 last_type_symbol = param_data_type; |
|
10442 |
|
10443 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10444 { |
|
10445 |
|
10446 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10447 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10448 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10449 function_type_prefix = return_type_symbol; |
|
10450 break; |
|
10451 |
|
10452 } |
|
10453 |
|
10454 |
|
10455 ERROR; |
|
10456 } |
|
10457 |
|
10458 }/*function_time_to_sint*/ |
|
10459 break; |
|
10460 |
|
10461 /**** |
|
10462 *TIME_TO_LINT |
|
10463 */ |
|
10464 case function_time_to_lint : |
|
10465 { |
|
10466 symbol_c *last_type_symbol = NULL; |
|
10467 |
|
10468 { |
|
10469 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10470 symbol_c *IN_param_value = &this->default_variable_name; |
|
10471 |
|
10472 symbol_c *IN_type_symbol = param_data_type; |
|
10473 last_type_symbol = param_data_type; |
|
10474 |
|
10475 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10476 { |
|
10477 |
|
10478 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10479 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10480 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10481 function_type_prefix = return_type_symbol; |
|
10482 break; |
|
10483 |
|
10484 } |
|
10485 |
|
10486 |
|
10487 ERROR; |
|
10488 } |
|
10489 |
|
10490 }/*function_time_to_lint*/ |
|
10491 break; |
|
10492 |
|
10493 /**** |
|
10494 *TIME_TO_DINT |
|
10495 */ |
|
10496 case function_time_to_dint : |
|
10497 { |
|
10498 symbol_c *last_type_symbol = NULL; |
|
10499 |
|
10500 { |
|
10501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10502 symbol_c *IN_param_value = &this->default_variable_name; |
|
10503 |
|
10504 symbol_c *IN_type_symbol = param_data_type; |
|
10505 last_type_symbol = param_data_type; |
|
10506 |
|
10507 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10508 { |
|
10509 |
|
10510 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10511 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
113 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
10512 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
114 s4o.print("("); |
10513 function_type_prefix = return_type_symbol; |
115 return_type_symbol->accept(*this); |
10514 break; |
116 s4o.print(")"); |
10515 |
117 IN_param_value->accept(*this); |
10516 } |
118 return NULL; |
10517 |
119 |
10518 |
120 } |
10519 ERROR; |
121 |
10520 } |
122 ERROR; |
10521 |
123 } |
10522 }/*function_time_to_dint*/ |
124 |
10523 break; |
125 }/*function_bool_to_dint*/ |
10524 |
126 break; |
10525 /**** |
127 |
10526 *TIME_TO_DWORD |
128 /**** |
10527 */ |
129 *BOOL_TO_LINT |
10528 case function_time_to_dword : |
130 */ |
10529 { |
131 case function_bool_to_lint : |
10530 symbol_c *last_type_symbol = NULL; |
132 { |
10531 |
133 symbol_c *last_type_symbol = NULL; |
10532 { |
134 |
10533 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
135 { |
10534 symbol_c *IN_param_value = &this->default_variable_name; |
136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10535 |
137 symbol_c *IN_param_value = &this->default_variable_name; |
10536 symbol_c *IN_type_symbol = param_data_type; |
138 |
10537 last_type_symbol = param_data_type; |
139 symbol_c *IN_type_symbol = param_data_type; |
10538 |
140 last_type_symbol = param_data_type; |
10539 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
141 |
10540 { |
142 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
10541 |
143 { |
10542 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
144 |
10543 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10544 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10545 function_type_prefix = return_type_symbol; |
|
10546 break; |
|
10547 |
|
10548 } |
|
10549 |
|
10550 |
|
10551 ERROR; |
|
10552 } |
|
10553 |
|
10554 }/*function_time_to_dword*/ |
|
10555 break; |
|
10556 |
|
10557 /**** |
|
10558 *TIME_TO_UDINT |
|
10559 */ |
|
10560 case function_time_to_udint : |
|
10561 { |
|
10562 symbol_c *last_type_symbol = NULL; |
|
10563 |
|
10564 { |
|
10565 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10566 symbol_c *IN_param_value = &this->default_variable_name; |
|
10567 |
|
10568 symbol_c *IN_type_symbol = param_data_type; |
|
10569 last_type_symbol = param_data_type; |
|
10570 |
|
10571 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10572 { |
|
10573 |
|
10574 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10575 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10576 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10577 function_type_prefix = return_type_symbol; |
|
10578 break; |
|
10579 |
|
10580 } |
|
10581 |
|
10582 |
|
10583 ERROR; |
|
10584 } |
|
10585 |
|
10586 }/*function_time_to_udint*/ |
|
10587 break; |
|
10588 |
|
10589 /**** |
|
10590 *TIME_TO_WORD |
|
10591 */ |
|
10592 case function_time_to_word : |
|
10593 { |
|
10594 symbol_c *last_type_symbol = NULL; |
|
10595 |
|
10596 { |
|
10597 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10598 symbol_c *IN_param_value = &this->default_variable_name; |
|
10599 |
|
10600 symbol_c *IN_type_symbol = param_data_type; |
|
10601 last_type_symbol = param_data_type; |
|
10602 |
|
10603 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10604 { |
|
10605 |
|
10606 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10607 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10608 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
10609 function_type_prefix = return_type_symbol; |
|
10610 break; |
|
10611 |
|
10612 } |
|
10613 |
|
10614 |
|
10615 ERROR; |
|
10616 } |
|
10617 |
|
10618 }/*function_time_to_word*/ |
|
10619 break; |
|
10620 |
|
10621 /**** |
|
10622 *TIME_TO_STRING |
|
10623 */ |
|
10624 case function_time_to_string : |
|
10625 { |
|
10626 symbol_c *last_type_symbol = NULL; |
|
10627 |
|
10628 { |
|
10629 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10630 symbol_c *IN_param_value = &this->default_variable_name; |
|
10631 |
|
10632 symbol_c *IN_type_symbol = param_data_type; |
|
10633 last_type_symbol = param_data_type; |
|
10634 |
|
10635 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10636 { |
|
10637 |
|
10638 function_name = (symbol_c*)(new pragma_c("__time_to_string")); |
|
10639 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10640 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
10641 function_type_prefix = return_type_symbol; |
|
10642 break; |
|
10643 |
|
10644 } |
|
10645 |
|
10646 |
|
10647 ERROR; |
|
10648 } |
|
10649 |
|
10650 }/*function_time_to_string*/ |
|
10651 break; |
|
10652 |
|
10653 /**** |
|
10654 *TIME_TO_LWORD |
|
10655 */ |
|
10656 case function_time_to_lword : |
|
10657 { |
|
10658 symbol_c *last_type_symbol = NULL; |
|
10659 |
|
10660 { |
|
10661 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10662 symbol_c *IN_param_value = &this->default_variable_name; |
|
10663 |
|
10664 symbol_c *IN_type_symbol = param_data_type; |
|
10665 last_type_symbol = param_data_type; |
|
10666 |
|
10667 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10668 { |
|
10669 |
|
10670 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10671 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10672 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10673 function_type_prefix = return_type_symbol; |
|
10674 break; |
|
10675 |
|
10676 } |
|
10677 |
|
10678 |
|
10679 ERROR; |
|
10680 } |
|
10681 |
|
10682 }/*function_time_to_lword*/ |
|
10683 break; |
|
10684 |
|
10685 /**** |
|
10686 *TIME_TO_UINT |
|
10687 */ |
|
10688 case function_time_to_uint : |
|
10689 { |
|
10690 symbol_c *last_type_symbol = NULL; |
|
10691 |
|
10692 { |
|
10693 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10694 symbol_c *IN_param_value = &this->default_variable_name; |
|
10695 |
|
10696 symbol_c *IN_type_symbol = param_data_type; |
|
10697 last_type_symbol = param_data_type; |
|
10698 |
|
10699 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10700 { |
|
10701 |
|
10702 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10703 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10704 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10705 function_type_prefix = return_type_symbol; |
|
10706 break; |
|
10707 |
|
10708 } |
|
10709 |
|
10710 |
|
10711 ERROR; |
|
10712 } |
|
10713 |
|
10714 }/*function_time_to_uint*/ |
|
10715 break; |
|
10716 |
|
10717 /**** |
|
10718 *TIME_TO_LREAL |
|
10719 */ |
|
10720 case function_time_to_lreal : |
|
10721 { |
|
10722 symbol_c *last_type_symbol = NULL; |
|
10723 |
|
10724 { |
|
10725 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10726 symbol_c *IN_param_value = &this->default_variable_name; |
|
10727 |
|
10728 symbol_c *IN_type_symbol = param_data_type; |
|
10729 last_type_symbol = param_data_type; |
|
10730 |
|
10731 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10732 { |
|
10733 |
|
10734 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
10735 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10736 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10737 function_type_prefix = return_type_symbol; |
|
10738 break; |
|
10739 |
|
10740 } |
|
10741 |
|
10742 |
|
10743 ERROR; |
|
10744 } |
|
10745 |
|
10746 }/*function_time_to_lreal*/ |
|
10747 break; |
|
10748 |
|
10749 /**** |
|
10750 *TIME_TO_BYTE |
|
10751 */ |
|
10752 case function_time_to_byte : |
|
10753 { |
|
10754 symbol_c *last_type_symbol = NULL; |
|
10755 |
|
10756 { |
|
10757 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10758 symbol_c *IN_param_value = &this->default_variable_name; |
|
10759 |
|
10760 symbol_c *IN_type_symbol = param_data_type; |
|
10761 last_type_symbol = param_data_type; |
|
10762 |
|
10763 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10764 { |
|
10765 |
|
10766 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10767 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10768 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10769 function_type_prefix = return_type_symbol; |
|
10770 break; |
|
10771 |
|
10772 } |
|
10773 |
|
10774 |
|
10775 ERROR; |
|
10776 } |
|
10777 |
|
10778 }/*function_time_to_byte*/ |
|
10779 break; |
|
10780 |
|
10781 /**** |
|
10782 *TIME_TO_USINT |
|
10783 */ |
|
10784 case function_time_to_usint : |
|
10785 { |
|
10786 symbol_c *last_type_symbol = NULL; |
|
10787 |
|
10788 { |
|
10789 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10790 symbol_c *IN_param_value = &this->default_variable_name; |
|
10791 |
|
10792 symbol_c *IN_type_symbol = param_data_type; |
|
10793 last_type_symbol = param_data_type; |
|
10794 |
|
10795 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10796 { |
|
10797 |
|
10798 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10799 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10800 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
10801 function_type_prefix = return_type_symbol; |
|
10802 break; |
|
10803 |
|
10804 } |
|
10805 |
|
10806 |
|
10807 ERROR; |
|
10808 } |
|
10809 |
|
10810 }/*function_time_to_usint*/ |
|
10811 break; |
|
10812 |
|
10813 /**** |
|
10814 *TIME_TO_ULINT |
|
10815 */ |
|
10816 case function_time_to_ulint : |
|
10817 { |
|
10818 symbol_c *last_type_symbol = NULL; |
|
10819 |
|
10820 { |
|
10821 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10822 symbol_c *IN_param_value = &this->default_variable_name; |
|
10823 |
|
10824 symbol_c *IN_type_symbol = param_data_type; |
|
10825 last_type_symbol = param_data_type; |
|
10826 |
|
10827 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10828 { |
|
10829 |
|
10830 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10831 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10832 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10833 function_type_prefix = return_type_symbol; |
|
10834 break; |
|
10835 |
|
10836 } |
|
10837 |
|
10838 |
|
10839 ERROR; |
|
10840 } |
|
10841 |
|
10842 }/*function_time_to_ulint*/ |
|
10843 break; |
|
10844 |
|
10845 /**** |
|
10846 *TIME_TO_INT |
|
10847 */ |
|
10848 case function_time_to_int : |
|
10849 { |
|
10850 symbol_c *last_type_symbol = NULL; |
|
10851 |
|
10852 { |
|
10853 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10854 symbol_c *IN_param_value = &this->default_variable_name; |
|
10855 |
|
10856 symbol_c *IN_type_symbol = param_data_type; |
|
10857 last_type_symbol = param_data_type; |
|
10858 |
|
10859 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
10860 { |
|
10861 |
|
10862 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
10863 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10864 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10865 function_type_prefix = return_type_symbol; |
|
10866 break; |
|
10867 |
|
10868 } |
|
10869 |
|
10870 |
|
10871 ERROR; |
|
10872 } |
|
10873 |
|
10874 }/*function_time_to_int*/ |
|
10875 break; |
|
10876 |
|
10877 /**** |
|
10878 *INT_TO_REAL |
|
10879 */ |
|
10880 case function_int_to_real : |
|
10881 { |
|
10882 symbol_c *last_type_symbol = NULL; |
|
10883 |
|
10884 { |
|
10885 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10886 symbol_c *IN_param_value = &this->default_variable_name; |
|
10887 |
|
10888 symbol_c *IN_type_symbol = param_data_type; |
|
10889 last_type_symbol = param_data_type; |
|
10890 |
|
10891 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
10892 { |
|
10893 |
|
10894 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10895 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10896 function_type_prefix = return_type_symbol; |
|
10897 break; |
|
10898 |
|
10899 } |
|
10900 |
|
10901 |
|
10902 ERROR; |
|
10903 } |
|
10904 |
|
10905 }/*function_int_to_real*/ |
|
10906 break; |
|
10907 |
|
10908 /**** |
|
10909 *INT_TO_SINT |
|
10910 */ |
|
10911 case function_int_to_sint : |
|
10912 { |
|
10913 symbol_c *last_type_symbol = NULL; |
|
10914 |
|
10915 { |
|
10916 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10917 symbol_c *IN_param_value = &this->default_variable_name; |
|
10918 |
|
10919 symbol_c *IN_type_symbol = param_data_type; |
|
10920 last_type_symbol = param_data_type; |
|
10921 |
|
10922 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
10923 { |
|
10924 |
|
10925 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
10926 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10927 function_type_prefix = return_type_symbol; |
|
10928 break; |
|
10929 |
|
10930 } |
|
10931 |
|
10932 |
|
10933 ERROR; |
|
10934 } |
|
10935 |
|
10936 }/*function_int_to_sint*/ |
|
10937 break; |
|
10938 |
|
10939 /**** |
|
10940 *INT_TO_LINT |
|
10941 */ |
|
10942 case function_int_to_lint : |
|
10943 { |
|
10944 symbol_c *last_type_symbol = NULL; |
|
10945 |
|
10946 { |
|
10947 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10948 symbol_c *IN_param_value = &this->default_variable_name; |
|
10949 |
|
10950 symbol_c *IN_type_symbol = param_data_type; |
|
10951 last_type_symbol = param_data_type; |
|
10952 |
|
10953 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
10954 { |
|
10955 |
|
10956 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
145 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
10957 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
146 s4o.print("("); |
10958 function_type_prefix = return_type_symbol; |
147 return_type_symbol->accept(*this); |
10959 break; |
148 s4o.print(")"); |
10960 |
149 IN_param_value->accept(*this); |
10961 } |
150 return NULL; |
10962 |
151 |
10963 |
152 } |
10964 ERROR; |
153 |
10965 } |
154 ERROR; |
10966 |
155 } |
10967 }/*function_int_to_lint*/ |
156 |
10968 break; |
157 }/*function_bool_to_lint*/ |
10969 |
158 break; |
10970 /**** |
159 |
10971 *INT_TO_DINT |
160 /**** |
10972 */ |
161 *BOOL_TO_USINT |
10973 case function_int_to_dint : |
162 */ |
10974 { |
163 case function_bool_to_usint : |
10975 symbol_c *last_type_symbol = NULL; |
164 { |
10976 |
165 symbol_c *last_type_symbol = NULL; |
10977 { |
166 |
10978 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
167 { |
10979 symbol_c *IN_param_value = &this->default_variable_name; |
168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10980 |
169 symbol_c *IN_param_value = &this->default_variable_name; |
10981 symbol_c *IN_type_symbol = param_data_type; |
170 |
10982 last_type_symbol = param_data_type; |
171 symbol_c *IN_type_symbol = param_data_type; |
10983 |
172 last_type_symbol = param_data_type; |
10984 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
173 |
10985 { |
174 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
10986 |
175 { |
10987 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
176 |
10988 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10989 function_type_prefix = return_type_symbol; |
|
10990 break; |
|
10991 |
|
10992 } |
|
10993 |
|
10994 |
|
10995 ERROR; |
|
10996 } |
|
10997 |
|
10998 }/*function_int_to_dint*/ |
|
10999 break; |
|
11000 |
|
11001 /**** |
|
11002 *INT_TO_DATE |
|
11003 */ |
|
11004 case function_int_to_date : |
|
11005 { |
|
11006 symbol_c *last_type_symbol = NULL; |
|
11007 |
|
11008 { |
|
11009 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11010 symbol_c *IN_param_value = &this->default_variable_name; |
|
11011 |
|
11012 symbol_c *IN_type_symbol = param_data_type; |
|
11013 last_type_symbol = param_data_type; |
|
11014 |
|
11015 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11016 { |
|
11017 |
|
11018 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11019 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11020 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11021 function_type_prefix = return_type_symbol; |
|
11022 break; |
|
11023 |
|
11024 } |
|
11025 |
|
11026 |
|
11027 ERROR; |
|
11028 } |
|
11029 |
|
11030 }/*function_int_to_date*/ |
|
11031 break; |
|
11032 |
|
11033 /**** |
|
11034 *INT_TO_DWORD |
|
11035 */ |
|
11036 case function_int_to_dword : |
|
11037 { |
|
11038 symbol_c *last_type_symbol = NULL; |
|
11039 |
|
11040 { |
|
11041 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11042 symbol_c *IN_param_value = &this->default_variable_name; |
|
11043 |
|
11044 symbol_c *IN_type_symbol = param_data_type; |
|
11045 last_type_symbol = param_data_type; |
|
11046 |
|
11047 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11048 { |
|
11049 |
|
11050 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11051 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11052 function_type_prefix = return_type_symbol; |
|
11053 break; |
|
11054 |
|
11055 } |
|
11056 |
|
11057 |
|
11058 ERROR; |
|
11059 } |
|
11060 |
|
11061 }/*function_int_to_dword*/ |
|
11062 break; |
|
11063 |
|
11064 /**** |
|
11065 *INT_TO_DT |
|
11066 */ |
|
11067 case function_int_to_dt : |
|
11068 { |
|
11069 symbol_c *last_type_symbol = NULL; |
|
11070 |
|
11071 { |
|
11072 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11073 symbol_c *IN_param_value = &this->default_variable_name; |
|
11074 |
|
11075 symbol_c *IN_type_symbol = param_data_type; |
|
11076 last_type_symbol = param_data_type; |
|
11077 |
|
11078 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11079 { |
|
11080 |
|
11081 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11082 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11083 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11084 function_type_prefix = return_type_symbol; |
|
11085 break; |
|
11086 |
|
11087 } |
|
11088 |
|
11089 |
|
11090 ERROR; |
|
11091 } |
|
11092 |
|
11093 }/*function_int_to_dt*/ |
|
11094 break; |
|
11095 |
|
11096 /**** |
|
11097 *INT_TO_TOD |
|
11098 */ |
|
11099 case function_int_to_tod : |
|
11100 { |
|
11101 symbol_c *last_type_symbol = NULL; |
|
11102 |
|
11103 { |
|
11104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11105 symbol_c *IN_param_value = &this->default_variable_name; |
|
11106 |
|
11107 symbol_c *IN_type_symbol = param_data_type; |
|
11108 last_type_symbol = param_data_type; |
|
11109 |
|
11110 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11111 { |
|
11112 |
|
11113 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11114 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11115 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11116 function_type_prefix = return_type_symbol; |
|
11117 break; |
|
11118 |
|
11119 } |
|
11120 |
|
11121 |
|
11122 ERROR; |
|
11123 } |
|
11124 |
|
11125 }/*function_int_to_tod*/ |
|
11126 break; |
|
11127 |
|
11128 /**** |
|
11129 *INT_TO_UDINT |
|
11130 */ |
|
11131 case function_int_to_udint : |
|
11132 { |
|
11133 symbol_c *last_type_symbol = NULL; |
|
11134 |
|
11135 { |
|
11136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11137 symbol_c *IN_param_value = &this->default_variable_name; |
|
11138 |
|
11139 symbol_c *IN_type_symbol = param_data_type; |
|
11140 last_type_symbol = param_data_type; |
|
11141 |
|
11142 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11143 { |
|
11144 |
|
11145 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11146 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11147 function_type_prefix = return_type_symbol; |
|
11148 break; |
|
11149 |
|
11150 } |
|
11151 |
|
11152 |
|
11153 ERROR; |
|
11154 } |
|
11155 |
|
11156 }/*function_int_to_udint*/ |
|
11157 break; |
|
11158 |
|
11159 /**** |
|
11160 *INT_TO_WORD |
|
11161 */ |
|
11162 case function_int_to_word : |
|
11163 { |
|
11164 symbol_c *last_type_symbol = NULL; |
|
11165 |
|
11166 { |
|
11167 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11168 symbol_c *IN_param_value = &this->default_variable_name; |
|
11169 |
|
11170 symbol_c *IN_type_symbol = param_data_type; |
|
11171 last_type_symbol = param_data_type; |
|
11172 |
|
11173 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11174 { |
|
11175 |
|
11176 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11177 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11178 function_type_prefix = return_type_symbol; |
|
11179 break; |
|
11180 |
|
11181 } |
|
11182 |
|
11183 |
|
11184 ERROR; |
|
11185 } |
|
11186 |
|
11187 }/*function_int_to_word*/ |
|
11188 break; |
|
11189 |
|
11190 /**** |
|
11191 *INT_TO_STRING |
|
11192 */ |
|
11193 case function_int_to_string : |
|
11194 { |
|
11195 symbol_c *last_type_symbol = NULL; |
|
11196 |
|
11197 { |
|
11198 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11199 symbol_c *IN_param_value = &this->default_variable_name; |
|
11200 |
|
11201 symbol_c *IN_type_symbol = param_data_type; |
|
11202 last_type_symbol = param_data_type; |
|
11203 |
|
11204 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11205 { |
|
11206 |
|
11207 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
11208 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11209 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11210 function_type_prefix = return_type_symbol; |
|
11211 break; |
|
11212 |
|
11213 } |
|
11214 |
|
11215 |
|
11216 ERROR; |
|
11217 } |
|
11218 |
|
11219 }/*function_int_to_string*/ |
|
11220 break; |
|
11221 |
|
11222 /**** |
|
11223 *INT_TO_LWORD |
|
11224 */ |
|
11225 case function_int_to_lword : |
|
11226 { |
|
11227 symbol_c *last_type_symbol = NULL; |
|
11228 |
|
11229 { |
|
11230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11231 symbol_c *IN_param_value = &this->default_variable_name; |
|
11232 |
|
11233 symbol_c *IN_type_symbol = param_data_type; |
|
11234 last_type_symbol = param_data_type; |
|
11235 |
|
11236 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11237 { |
|
11238 |
|
11239 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11240 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11241 function_type_prefix = return_type_symbol; |
|
11242 break; |
|
11243 |
|
11244 } |
|
11245 |
|
11246 |
|
11247 ERROR; |
|
11248 } |
|
11249 |
|
11250 }/*function_int_to_lword*/ |
|
11251 break; |
|
11252 |
|
11253 /**** |
|
11254 *INT_TO_UINT |
|
11255 */ |
|
11256 case function_int_to_uint : |
|
11257 { |
|
11258 symbol_c *last_type_symbol = NULL; |
|
11259 |
|
11260 { |
|
11261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11262 symbol_c *IN_param_value = &this->default_variable_name; |
|
11263 |
|
11264 symbol_c *IN_type_symbol = param_data_type; |
|
11265 last_type_symbol = param_data_type; |
|
11266 |
|
11267 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11268 { |
|
11269 |
|
11270 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11271 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11272 function_type_prefix = return_type_symbol; |
|
11273 break; |
|
11274 |
|
11275 } |
|
11276 |
|
11277 |
|
11278 ERROR; |
|
11279 } |
|
11280 |
|
11281 }/*function_int_to_uint*/ |
|
11282 break; |
|
11283 |
|
11284 /**** |
|
11285 *INT_TO_LREAL |
|
11286 */ |
|
11287 case function_int_to_lreal : |
|
11288 { |
|
11289 symbol_c *last_type_symbol = NULL; |
|
11290 |
|
11291 { |
|
11292 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11293 symbol_c *IN_param_value = &this->default_variable_name; |
|
11294 |
|
11295 symbol_c *IN_type_symbol = param_data_type; |
|
11296 last_type_symbol = param_data_type; |
|
11297 |
|
11298 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11299 { |
|
11300 |
|
11301 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11302 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11303 function_type_prefix = return_type_symbol; |
|
11304 break; |
|
11305 |
|
11306 } |
|
11307 |
|
11308 |
|
11309 ERROR; |
|
11310 } |
|
11311 |
|
11312 }/*function_int_to_lreal*/ |
|
11313 break; |
|
11314 |
|
11315 /**** |
|
11316 *INT_TO_BYTE |
|
11317 */ |
|
11318 case function_int_to_byte : |
|
11319 { |
|
11320 symbol_c *last_type_symbol = NULL; |
|
11321 |
|
11322 { |
|
11323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11324 symbol_c *IN_param_value = &this->default_variable_name; |
|
11325 |
|
11326 symbol_c *IN_type_symbol = param_data_type; |
|
11327 last_type_symbol = param_data_type; |
|
11328 |
|
11329 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11330 { |
|
11331 |
|
11332 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11333 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11334 function_type_prefix = return_type_symbol; |
|
11335 break; |
|
11336 |
|
11337 } |
|
11338 |
|
11339 |
|
11340 ERROR; |
|
11341 } |
|
11342 |
|
11343 }/*function_int_to_byte*/ |
|
11344 break; |
|
11345 |
|
11346 /**** |
|
11347 *INT_TO_USINT |
|
11348 */ |
|
11349 case function_int_to_usint : |
|
11350 { |
|
11351 symbol_c *last_type_symbol = NULL; |
|
11352 |
|
11353 { |
|
11354 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11355 symbol_c *IN_param_value = &this->default_variable_name; |
|
11356 |
|
11357 symbol_c *IN_type_symbol = param_data_type; |
|
11358 last_type_symbol = param_data_type; |
|
11359 |
|
11360 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11361 { |
|
11362 |
|
11363 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
177 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
11364 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
178 s4o.print("("); |
11365 function_type_prefix = return_type_symbol; |
179 return_type_symbol->accept(*this); |
11366 break; |
180 s4o.print(")"); |
11367 |
181 IN_param_value->accept(*this); |
11368 } |
182 return NULL; |
11369 |
183 |
11370 |
184 } |
11371 ERROR; |
185 |
11372 } |
186 ERROR; |
11373 |
187 } |
11374 }/*function_int_to_usint*/ |
188 |
11375 break; |
189 }/*function_bool_to_usint*/ |
11376 |
190 break; |
11377 /**** |
191 |
11378 *INT_TO_ULINT |
192 /**** |
11379 */ |
193 *BOOL_TO_UINT |
11380 case function_int_to_ulint : |
194 */ |
11381 { |
195 case function_bool_to_uint : |
11382 symbol_c *last_type_symbol = NULL; |
196 { |
11383 |
197 symbol_c *last_type_symbol = NULL; |
11384 { |
198 |
11385 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
199 { |
11386 symbol_c *IN_param_value = &this->default_variable_name; |
200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11387 |
201 symbol_c *IN_param_value = &this->default_variable_name; |
11388 symbol_c *IN_type_symbol = param_data_type; |
202 |
11389 last_type_symbol = param_data_type; |
203 symbol_c *IN_type_symbol = param_data_type; |
11390 |
204 last_type_symbol = param_data_type; |
11391 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
205 |
11392 { |
206 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11393 |
207 { |
11394 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
208 |
11395 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11396 function_type_prefix = return_type_symbol; |
|
11397 break; |
|
11398 |
|
11399 } |
|
11400 |
|
11401 |
|
11402 ERROR; |
|
11403 } |
|
11404 |
|
11405 }/*function_int_to_ulint*/ |
|
11406 break; |
|
11407 |
|
11408 /**** |
|
11409 *INT_TO_BOOL |
|
11410 */ |
|
11411 case function_int_to_bool : |
|
11412 { |
|
11413 symbol_c *last_type_symbol = NULL; |
|
11414 |
|
11415 { |
|
11416 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11417 symbol_c *IN_param_value = &this->default_variable_name; |
|
11418 |
|
11419 symbol_c *IN_type_symbol = param_data_type; |
|
11420 last_type_symbol = param_data_type; |
|
11421 |
|
11422 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11423 { |
|
11424 |
|
11425 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11426 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11427 function_type_prefix = return_type_symbol; |
|
11428 break; |
|
11429 |
|
11430 } |
|
11431 |
|
11432 |
|
11433 ERROR; |
|
11434 } |
|
11435 |
|
11436 }/*function_int_to_bool*/ |
|
11437 break; |
|
11438 |
|
11439 /**** |
|
11440 *INT_TO_TIME |
|
11441 */ |
|
11442 case function_int_to_time : |
|
11443 { |
|
11444 symbol_c *last_type_symbol = NULL; |
|
11445 |
|
11446 { |
|
11447 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11448 symbol_c *IN_param_value = &this->default_variable_name; |
|
11449 |
|
11450 symbol_c *IN_type_symbol = param_data_type; |
|
11451 last_type_symbol = param_data_type; |
|
11452 |
|
11453 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
11454 { |
|
11455 |
|
11456 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11457 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11458 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
11459 function_type_prefix = return_type_symbol; |
|
11460 break; |
|
11461 |
|
11462 } |
|
11463 |
|
11464 |
|
11465 ERROR; |
|
11466 } |
|
11467 |
|
11468 }/*function_int_to_time*/ |
|
11469 break; |
|
11470 |
|
11471 /**** |
|
11472 *TRUNC |
|
11473 */ |
|
11474 case function_trunc : |
|
11475 { |
|
11476 symbol_c *last_type_symbol = NULL; |
|
11477 |
|
11478 { |
|
11479 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11480 symbol_c *IN_param_value = &this->default_variable_name; |
|
11481 |
|
11482 symbol_c *IN_type_symbol = param_data_type; |
|
11483 last_type_symbol = param_data_type; |
|
11484 |
|
11485 if(search_expression_type->is_real_type(IN_type_symbol)) |
|
11486 { |
|
11487 |
|
11488 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11489 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
|
11490 function_type_prefix = (symbol_c*)(new pragma_c("int")); |
|
11491 break; |
|
11492 |
|
11493 } |
|
11494 |
|
11495 |
|
11496 ERROR; |
|
11497 } |
|
11498 |
|
11499 }/*function_trunc*/ |
|
11500 break; |
|
11501 |
|
11502 /**** |
|
11503 *BCD_TO_UDINT |
|
11504 */ |
|
11505 case function_bcd_to_udint : |
|
11506 { |
|
11507 symbol_c *last_type_symbol = NULL; |
|
11508 |
|
11509 { |
|
11510 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11511 symbol_c *IN_param_value = &this->default_variable_name; |
|
11512 |
|
11513 symbol_c *IN_type_symbol = param_data_type; |
|
11514 last_type_symbol = param_data_type; |
|
11515 |
|
11516 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11517 { |
|
11518 |
|
11519 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
11520 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11521 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11522 function_type_prefix = return_type_symbol; |
|
11523 break; |
|
11524 |
|
11525 } |
|
11526 |
|
11527 |
|
11528 ERROR; |
|
11529 } |
|
11530 |
|
11531 }/*function_bcd_to_udint*/ |
|
11532 break; |
|
11533 |
|
11534 /**** |
|
11535 *BCD_TO_UINT |
|
11536 */ |
|
11537 case function_bcd_to_uint : |
|
11538 { |
|
11539 symbol_c *last_type_symbol = NULL; |
|
11540 |
|
11541 { |
|
11542 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11543 symbol_c *IN_param_value = &this->default_variable_name; |
|
11544 |
|
11545 symbol_c *IN_type_symbol = param_data_type; |
|
11546 last_type_symbol = param_data_type; |
|
11547 |
|
11548 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
11549 { |
|
11550 |
|
11551 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
11552 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
209 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11553 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
210 s4o.print("("); |
11554 function_type_prefix = return_type_symbol; |
211 return_type_symbol->accept(*this); |
11555 break; |
212 s4o.print(")"); |
11556 |
213 IN_param_value->accept(*this); |
11557 } |
214 return NULL; |
11558 |
215 |
11559 |
216 } |
11560 ERROR; |
217 |
11561 } |
218 ERROR; |
11562 |
219 } |
11563 }/*function_bcd_to_uint*/ |
220 |
11564 break; |
221 }/*function_bool_to_uint*/ |
11565 |
222 break; |
11566 /**** |
223 |
11567 *BCD_TO_ULINT |
224 /**** |
11568 */ |
225 *BOOL_TO_UDINT |
11569 case function_bcd_to_ulint : |
226 */ |
11570 { |
227 case function_bool_to_udint : |
11571 symbol_c *last_type_symbol = NULL; |
228 { |
11572 |
229 symbol_c *last_type_symbol = NULL; |
11573 { |
230 |
11574 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
231 { |
11575 symbol_c *IN_param_value = &this->default_variable_name; |
232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11576 |
233 symbol_c *IN_param_value = &this->default_variable_name; |
11577 symbol_c *IN_type_symbol = param_data_type; |
234 |
11578 last_type_symbol = param_data_type; |
235 symbol_c *IN_type_symbol = param_data_type; |
11579 |
236 last_type_symbol = param_data_type; |
11580 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
237 |
11581 { |
238 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11582 |
239 { |
11583 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
240 |
11584 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
241 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
242 s4o.print("("); |
|
243 return_type_symbol->accept(*this); |
|
244 s4o.print(")"); |
|
245 IN_param_value->accept(*this); |
|
246 return NULL; |
|
247 |
|
248 } |
|
249 |
|
250 ERROR; |
|
251 } |
|
252 |
|
253 }/*function_bool_to_udint*/ |
|
254 break; |
|
255 |
|
256 /**** |
|
257 *BOOL_TO_ULINT |
|
258 */ |
|
259 case function_bool_to_ulint : |
|
260 { |
|
261 symbol_c *last_type_symbol = NULL; |
|
262 |
|
263 { |
|
264 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
265 symbol_c *IN_param_value = &this->default_variable_name; |
|
266 |
|
267 symbol_c *IN_type_symbol = param_data_type; |
|
268 last_type_symbol = param_data_type; |
|
269 |
|
270 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
271 { |
|
272 |
|
273 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11585 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
274 s4o.print("("); |
11586 function_type_prefix = return_type_symbol; |
275 return_type_symbol->accept(*this); |
11587 break; |
276 s4o.print(")"); |
11588 |
277 IN_param_value->accept(*this); |
11589 } |
278 return NULL; |
11590 |
279 |
11591 |
280 } |
11592 ERROR; |
281 |
11593 } |
282 ERROR; |
11594 |
283 } |
11595 }/*function_bcd_to_ulint*/ |
284 |
11596 break; |
285 }/*function_bool_to_ulint*/ |
11597 |
286 break; |
11598 /**** |
287 |
11599 *BCD_TO_USINT |
288 /**** |
11600 */ |
289 *BOOL_TO_REAL |
11601 case function_bcd_to_usint : |
290 */ |
11602 { |
291 case function_bool_to_real : |
11603 symbol_c *last_type_symbol = NULL; |
292 { |
11604 |
293 symbol_c *last_type_symbol = NULL; |
11605 { |
294 |
11606 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
295 { |
11607 symbol_c *IN_param_value = &this->default_variable_name; |
296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11608 |
297 symbol_c *IN_param_value = &this->default_variable_name; |
11609 symbol_c *IN_type_symbol = param_data_type; |
298 |
11610 last_type_symbol = param_data_type; |
299 symbol_c *IN_type_symbol = param_data_type; |
11611 |
300 last_type_symbol = param_data_type; |
11612 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
301 |
11613 { |
302 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11614 |
303 { |
11615 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
304 |
11616 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
305 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
11617 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
306 s4o.print("("); |
11618 function_type_prefix = return_type_symbol; |
307 return_type_symbol->accept(*this); |
11619 break; |
308 s4o.print(")"); |
11620 |
309 IN_param_value->accept(*this); |
11621 } |
310 return NULL; |
11622 |
311 |
11623 |
312 } |
11624 ERROR; |
313 |
11625 } |
314 ERROR; |
11626 |
315 } |
11627 }/*function_bcd_to_usint*/ |
316 |
11628 break; |
317 }/*function_bool_to_real*/ |
11629 |
318 break; |
11630 /**** |
319 |
11631 *UDINT_TO_BCD |
320 /**** |
11632 */ |
321 *BOOL_TO_LREAL |
11633 case function_udint_to_bcd : |
322 */ |
11634 { |
323 case function_bool_to_lreal : |
11635 symbol_c *last_type_symbol = NULL; |
324 { |
11636 |
325 symbol_c *last_type_symbol = NULL; |
11637 { |
326 |
11638 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
327 { |
11639 symbol_c *IN_param_value = &this->default_variable_name; |
328 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11640 |
329 symbol_c *IN_param_value = &this->default_variable_name; |
11641 symbol_c *IN_type_symbol = param_data_type; |
330 |
11642 last_type_symbol = param_data_type; |
331 symbol_c *IN_type_symbol = param_data_type; |
11643 |
332 last_type_symbol = param_data_type; |
11644 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
333 |
11645 { |
334 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11646 |
335 { |
11647 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
336 |
11648 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
337 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
11649 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
338 s4o.print("("); |
11650 function_type_prefix = return_type_symbol; |
339 return_type_symbol->accept(*this); |
11651 break; |
340 s4o.print(")"); |
11652 |
341 IN_param_value->accept(*this); |
11653 } |
342 return NULL; |
11654 |
343 |
11655 |
344 } |
11656 ERROR; |
345 |
11657 } |
346 ERROR; |
11658 |
347 } |
11659 }/*function_udint_to_bcd*/ |
348 |
11660 break; |
349 }/*function_bool_to_lreal*/ |
11661 |
350 break; |
11662 /**** |
351 |
11663 *UINT_TO_BCD |
352 /**** |
11664 */ |
353 *BOOL_TO_TIME |
11665 case function_uint_to_bcd : |
354 */ |
11666 { |
355 case function_bool_to_time : |
11667 symbol_c *last_type_symbol = NULL; |
356 { |
11668 |
357 symbol_c *last_type_symbol = NULL; |
11669 { |
358 |
11670 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
359 { |
11671 symbol_c *IN_param_value = &this->default_variable_name; |
360 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11672 |
361 symbol_c *IN_param_value = &this->default_variable_name; |
11673 symbol_c *IN_type_symbol = param_data_type; |
362 |
11674 last_type_symbol = param_data_type; |
363 symbol_c *IN_type_symbol = param_data_type; |
11675 |
364 last_type_symbol = param_data_type; |
11676 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
365 |
11677 { |
366 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11678 |
367 { |
11679 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
368 |
11680 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
369 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
11681 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
370 s4o.print("("); |
11682 function_type_prefix = return_type_symbol; |
371 return_type_symbol->accept(*this); |
11683 break; |
372 s4o.print(")__int_to_time("); |
11684 |
373 IN_param_value->accept(*this); |
11685 } |
374 s4o.print(")"); |
11686 |
375 return NULL; |
11687 |
376 |
11688 ERROR; |
377 } |
11689 } |
378 |
11690 |
379 ERROR; |
11691 }/*function_uint_to_bcd*/ |
380 } |
11692 break; |
381 |
11693 |
382 }/*function_bool_to_time*/ |
11694 /**** |
383 break; |
11695 *USINT_TO_BCD |
384 |
11696 */ |
385 /**** |
11697 case function_usint_to_bcd : |
386 *BOOL_TO_DATE |
11698 { |
387 */ |
11699 symbol_c *last_type_symbol = NULL; |
388 case function_bool_to_date : |
11700 |
389 { |
11701 { |
390 symbol_c *last_type_symbol = NULL; |
11702 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
391 |
11703 symbol_c *IN_param_value = &this->default_variable_name; |
392 { |
11704 |
393 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11705 symbol_c *IN_type_symbol = param_data_type; |
394 symbol_c *IN_param_value = &this->default_variable_name; |
11706 last_type_symbol = param_data_type; |
395 |
11707 |
396 symbol_c *IN_type_symbol = param_data_type; |
11708 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
397 last_type_symbol = param_data_type; |
11709 { |
398 |
11710 |
399 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11711 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
400 { |
11712 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
401 |
11713 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
|
11714 function_type_prefix = return_type_symbol; |
|
11715 break; |
|
11716 |
|
11717 } |
|
11718 |
|
11719 |
|
11720 ERROR; |
|
11721 } |
|
11722 |
|
11723 }/*function_usint_to_bcd*/ |
|
11724 break; |
|
11725 |
|
11726 /**** |
|
11727 *ULINT_TO_BCD |
|
11728 */ |
|
11729 case function_ulint_to_bcd : |
|
11730 { |
|
11731 symbol_c *last_type_symbol = NULL; |
|
11732 |
|
11733 { |
|
11734 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11735 symbol_c *IN_param_value = &this->default_variable_name; |
|
11736 |
|
11737 symbol_c *IN_type_symbol = param_data_type; |
|
11738 last_type_symbol = param_data_type; |
|
11739 |
|
11740 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
11741 { |
|
11742 |
|
11743 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
|
11744 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11745 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
|
11746 function_type_prefix = return_type_symbol; |
|
11747 break; |
|
11748 |
|
11749 } |
|
11750 |
|
11751 |
|
11752 ERROR; |
|
11753 } |
|
11754 |
|
11755 }/*function_ulint_to_bcd*/ |
|
11756 break; |
|
11757 |
|
11758 /**** |
|
11759 *DATE_AND_TIME_TO_TIME_OF_DAY |
|
11760 */ |
|
11761 case function_date_and_time_to_time_of_day : |
|
11762 { |
|
11763 symbol_c *last_type_symbol = NULL; |
|
11764 |
|
11765 { |
|
11766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11767 symbol_c *IN_param_value = &this->default_variable_name; |
|
11768 |
|
11769 symbol_c *IN_type_symbol = param_data_type; |
|
11770 last_type_symbol = param_data_type; |
|
11771 |
|
11772 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
11773 { |
|
11774 |
|
11775 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day")); |
|
11776 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
11777 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11778 break; |
|
11779 |
|
11780 } |
|
11781 |
|
11782 |
|
11783 ERROR; |
|
11784 } |
|
11785 |
|
11786 }/*function_date_and_time_to_time_of_day*/ |
|
11787 break; |
|
11788 |
|
11789 /**** |
|
11790 *DATE_AND_TIME_TO_DATE |
|
11791 */ |
|
11792 case function_date_and_time_to_date : |
|
11793 { |
|
11794 symbol_c *last_type_symbol = NULL; |
|
11795 |
|
11796 { |
|
11797 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11798 symbol_c *IN_param_value = &this->default_variable_name; |
|
11799 |
|
11800 symbol_c *IN_type_symbol = param_data_type; |
|
11801 last_type_symbol = param_data_type; |
|
11802 |
|
11803 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
11804 { |
|
11805 |
|
11806 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date")); |
|
11807 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
402 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
11808 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
403 s4o.print("("); |
11809 break; |
404 return_type_symbol->accept(*this); |
11810 |
405 s4o.print(")__int_to_time("); |
11811 } |
406 IN_param_value->accept(*this); |
11812 |
407 s4o.print(")"); |
11813 |
408 return NULL; |
11814 ERROR; |
409 |
11815 } |
410 } |
11816 |
411 |
11817 }/*function_date_and_time_to_date*/ |
412 ERROR; |
11818 break; |
413 } |
11819 |
414 |
11820 /**** |
415 }/*function_bool_to_date*/ |
11821 *ABS |
416 break; |
11822 */ |
417 |
11823 case function_abs : |
418 /**** |
11824 { |
419 *BOOL_TO_TOD |
11825 symbol_c *last_type_symbol = NULL; |
420 */ |
11826 |
421 case function_bool_to_tod : |
11827 { |
422 { |
11828 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
423 symbol_c *last_type_symbol = NULL; |
11829 symbol_c *IN_param_value = &this->default_variable_name; |
424 |
11830 |
425 { |
11831 symbol_c *IN_type_symbol = param_data_type; |
426 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11832 last_type_symbol = param_data_type; |
427 symbol_c *IN_param_value = &this->default_variable_name; |
11833 |
428 |
11834 if(search_expression_type->is_num_type(IN_type_symbol)) |
429 symbol_c *IN_type_symbol = param_data_type; |
11835 { |
430 last_type_symbol = param_data_type; |
11836 |
431 |
11837 function_name = (symbol_c*)(new pragma_c("__abs_")); |
432 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11838 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
433 { |
11839 symbol_c * return_type_symbol = IN_type_symbol; |
434 |
11840 function_type_suffix = IN_type_symbol; |
435 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
11841 break; |
436 s4o.print("("); |
11842 |
437 return_type_symbol->accept(*this); |
11843 } |
438 s4o.print(")__int_to_time("); |
11844 |
439 IN_param_value->accept(*this); |
11845 |
440 s4o.print(")"); |
11846 ERROR; |
441 return NULL; |
11847 } |
442 |
11848 |
443 } |
11849 }/*function_abs*/ |
444 |
11850 break; |
445 ERROR; |
11851 |
446 } |
11852 /**** |
447 |
11853 *SQRT |
448 }/*function_bool_to_tod*/ |
11854 */ |
449 break; |
11855 case function_sqrt : |
450 |
|
451 /**** |
|
452 *BOOL_TO_DT |
|
453 */ |
|
454 case function_bool_to_dt : |
|
455 { |
|
456 symbol_c *last_type_symbol = NULL; |
|
457 |
|
458 { |
|
459 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
460 symbol_c *IN_param_value = &this->default_variable_name; |
|
461 |
|
462 symbol_c *IN_type_symbol = param_data_type; |
|
463 last_type_symbol = param_data_type; |
|
464 |
|
465 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
466 { |
|
467 |
|
468 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
469 s4o.print("("); |
|
470 return_type_symbol->accept(*this); |
|
471 s4o.print(")__int_to_time("); |
|
472 IN_param_value->accept(*this); |
|
473 s4o.print(")"); |
|
474 return NULL; |
|
475 |
|
476 } |
|
477 |
|
478 ERROR; |
|
479 } |
|
480 |
|
481 }/*function_bool_to_dt*/ |
|
482 break; |
|
483 |
|
484 /**** |
|
485 *BOOL_TO_STRING |
|
486 */ |
|
487 case function_bool_to_string : |
|
488 { |
|
489 symbol_c *last_type_symbol = NULL; |
|
490 |
|
491 { |
|
492 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
493 symbol_c *IN_param_value = &this->default_variable_name; |
|
494 |
|
495 symbol_c *IN_type_symbol = param_data_type; |
|
496 last_type_symbol = param_data_type; |
|
497 |
|
498 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
499 { |
|
500 |
|
501 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
502 s4o.print("("); |
|
503 return_type_symbol->accept(*this); |
|
504 s4o.print(")__bool_to_string("); |
|
505 IN_param_value->accept(*this); |
|
506 s4o.print(")"); |
|
507 return NULL; |
|
508 |
|
509 } |
|
510 |
|
511 ERROR; |
|
512 } |
|
513 |
|
514 }/*function_bool_to_string*/ |
|
515 break; |
|
516 |
|
517 /**** |
|
518 *BOOL_TO_BYTE |
|
519 */ |
|
520 case function_bool_to_byte : |
|
521 { |
|
522 symbol_c *last_type_symbol = NULL; |
|
523 |
|
524 { |
|
525 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
526 symbol_c *IN_param_value = &this->default_variable_name; |
|
527 |
|
528 symbol_c *IN_type_symbol = param_data_type; |
|
529 last_type_symbol = param_data_type; |
|
530 |
|
531 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
532 { |
|
533 |
|
534 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
535 s4o.print("("); |
|
536 return_type_symbol->accept(*this); |
|
537 s4o.print(")"); |
|
538 IN_param_value->accept(*this); |
|
539 return NULL; |
|
540 |
|
541 } |
|
542 |
|
543 ERROR; |
|
544 } |
|
545 |
|
546 }/*function_bool_to_byte*/ |
|
547 break; |
|
548 |
|
549 /**** |
|
550 *BOOL_TO_WORD |
|
551 */ |
|
552 case function_bool_to_word : |
|
553 { |
|
554 symbol_c *last_type_symbol = NULL; |
|
555 |
|
556 { |
|
557 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
558 symbol_c *IN_param_value = &this->default_variable_name; |
|
559 |
|
560 symbol_c *IN_type_symbol = param_data_type; |
|
561 last_type_symbol = param_data_type; |
|
562 |
|
563 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
564 { |
|
565 |
|
566 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
567 s4o.print("("); |
|
568 return_type_symbol->accept(*this); |
|
569 s4o.print(")"); |
|
570 IN_param_value->accept(*this); |
|
571 return NULL; |
|
572 |
|
573 } |
|
574 |
|
575 ERROR; |
|
576 } |
|
577 |
|
578 }/*function_bool_to_word*/ |
|
579 break; |
|
580 |
|
581 /**** |
|
582 *BOOL_TO_DWORD |
|
583 */ |
|
584 case function_bool_to_dword : |
|
585 { |
|
586 symbol_c *last_type_symbol = NULL; |
|
587 |
|
588 { |
|
589 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
590 symbol_c *IN_param_value = &this->default_variable_name; |
|
591 |
|
592 symbol_c *IN_type_symbol = param_data_type; |
|
593 last_type_symbol = param_data_type; |
|
594 |
|
595 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
596 { |
|
597 |
|
598 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
599 s4o.print("("); |
|
600 return_type_symbol->accept(*this); |
|
601 s4o.print(")"); |
|
602 IN_param_value->accept(*this); |
|
603 return NULL; |
|
604 |
|
605 } |
|
606 |
|
607 ERROR; |
|
608 } |
|
609 |
|
610 }/*function_bool_to_dword*/ |
|
611 break; |
|
612 |
|
613 /**** |
|
614 *BOOL_TO_LWORD |
|
615 */ |
|
616 case function_bool_to_lword : |
|
617 { |
|
618 symbol_c *last_type_symbol = NULL; |
|
619 |
|
620 { |
|
621 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
622 symbol_c *IN_param_value = &this->default_variable_name; |
|
623 |
|
624 symbol_c *IN_type_symbol = param_data_type; |
|
625 last_type_symbol = param_data_type; |
|
626 |
|
627 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
628 { |
|
629 |
|
630 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
631 s4o.print("("); |
|
632 return_type_symbol->accept(*this); |
|
633 s4o.print(")"); |
|
634 IN_param_value->accept(*this); |
|
635 return NULL; |
|
636 |
|
637 } |
|
638 |
|
639 ERROR; |
|
640 } |
|
641 |
|
642 }/*function_bool_to_lword*/ |
|
643 break; |
|
644 |
|
645 /**** |
|
646 *SINT_TO_BOOL |
|
647 */ |
|
648 case function_sint_to_bool : |
|
649 { |
|
650 symbol_c *last_type_symbol = NULL; |
|
651 |
|
652 { |
|
653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
654 symbol_c *IN_param_value = &this->default_variable_name; |
|
655 |
|
656 symbol_c *IN_type_symbol = param_data_type; |
|
657 last_type_symbol = param_data_type; |
|
658 |
|
659 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
660 { |
|
661 |
|
662 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
663 s4o.print("("); |
|
664 return_type_symbol->accept(*this); |
|
665 s4o.print(")"); |
|
666 IN_param_value->accept(*this); |
|
667 return NULL; |
|
668 |
|
669 } |
|
670 |
|
671 ERROR; |
|
672 } |
|
673 |
|
674 }/*function_sint_to_bool*/ |
|
675 break; |
|
676 |
|
677 /**** |
|
678 *SINT_TO_INT |
|
679 */ |
|
680 case function_sint_to_int : |
|
681 { |
|
682 symbol_c *last_type_symbol = NULL; |
|
683 |
|
684 { |
|
685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
686 symbol_c *IN_param_value = &this->default_variable_name; |
|
687 |
|
688 symbol_c *IN_type_symbol = param_data_type; |
|
689 last_type_symbol = param_data_type; |
|
690 |
|
691 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
692 { |
|
693 |
|
694 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
695 s4o.print("("); |
|
696 return_type_symbol->accept(*this); |
|
697 s4o.print(")"); |
|
698 IN_param_value->accept(*this); |
|
699 return NULL; |
|
700 |
|
701 } |
|
702 |
|
703 ERROR; |
|
704 } |
|
705 |
|
706 }/*function_sint_to_int*/ |
|
707 break; |
|
708 |
|
709 /**** |
|
710 *SINT_TO_DINT |
|
711 */ |
|
712 case function_sint_to_dint : |
|
713 { |
|
714 symbol_c *last_type_symbol = NULL; |
|
715 |
|
716 { |
|
717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
718 symbol_c *IN_param_value = &this->default_variable_name; |
|
719 |
|
720 symbol_c *IN_type_symbol = param_data_type; |
|
721 last_type_symbol = param_data_type; |
|
722 |
|
723 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
724 { |
|
725 |
|
726 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
727 s4o.print("("); |
|
728 return_type_symbol->accept(*this); |
|
729 s4o.print(")"); |
|
730 IN_param_value->accept(*this); |
|
731 return NULL; |
|
732 |
|
733 } |
|
734 |
|
735 ERROR; |
|
736 } |
|
737 |
|
738 }/*function_sint_to_dint*/ |
|
739 break; |
|
740 |
|
741 /**** |
|
742 *SINT_TO_LINT |
|
743 */ |
|
744 case function_sint_to_lint : |
|
745 { |
|
746 symbol_c *last_type_symbol = NULL; |
|
747 |
|
748 { |
|
749 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
750 symbol_c *IN_param_value = &this->default_variable_name; |
|
751 |
|
752 symbol_c *IN_type_symbol = param_data_type; |
|
753 last_type_symbol = param_data_type; |
|
754 |
|
755 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
756 { |
|
757 |
|
758 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
759 s4o.print("("); |
|
760 return_type_symbol->accept(*this); |
|
761 s4o.print(")"); |
|
762 IN_param_value->accept(*this); |
|
763 return NULL; |
|
764 |
|
765 } |
|
766 |
|
767 ERROR; |
|
768 } |
|
769 |
|
770 }/*function_sint_to_lint*/ |
|
771 break; |
|
772 |
|
773 /**** |
|
774 *SINT_TO_USINT |
|
775 */ |
|
776 case function_sint_to_usint : |
|
777 { |
|
778 symbol_c *last_type_symbol = NULL; |
|
779 |
|
780 { |
|
781 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
782 symbol_c *IN_param_value = &this->default_variable_name; |
|
783 |
|
784 symbol_c *IN_type_symbol = param_data_type; |
|
785 last_type_symbol = param_data_type; |
|
786 |
|
787 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
788 { |
|
789 |
|
790 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
791 s4o.print("("); |
|
792 return_type_symbol->accept(*this); |
|
793 s4o.print(")"); |
|
794 IN_param_value->accept(*this); |
|
795 return NULL; |
|
796 |
|
797 } |
|
798 |
|
799 ERROR; |
|
800 } |
|
801 |
|
802 }/*function_sint_to_usint*/ |
|
803 break; |
|
804 |
|
805 /**** |
|
806 *SINT_TO_UINT |
|
807 */ |
|
808 case function_sint_to_uint : |
|
809 { |
|
810 symbol_c *last_type_symbol = NULL; |
|
811 |
|
812 { |
|
813 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
814 symbol_c *IN_param_value = &this->default_variable_name; |
|
815 |
|
816 symbol_c *IN_type_symbol = param_data_type; |
|
817 last_type_symbol = param_data_type; |
|
818 |
|
819 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
820 { |
|
821 |
|
822 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
823 s4o.print("("); |
|
824 return_type_symbol->accept(*this); |
|
825 s4o.print(")"); |
|
826 IN_param_value->accept(*this); |
|
827 return NULL; |
|
828 |
|
829 } |
|
830 |
|
831 ERROR; |
|
832 } |
|
833 |
|
834 }/*function_sint_to_uint*/ |
|
835 break; |
|
836 |
|
837 /**** |
|
838 *SINT_TO_UDINT |
|
839 */ |
|
840 case function_sint_to_udint : |
|
841 { |
|
842 symbol_c *last_type_symbol = NULL; |
|
843 |
|
844 { |
|
845 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
846 symbol_c *IN_param_value = &this->default_variable_name; |
|
847 |
|
848 symbol_c *IN_type_symbol = param_data_type; |
|
849 last_type_symbol = param_data_type; |
|
850 |
|
851 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
852 { |
|
853 |
|
854 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
855 s4o.print("("); |
|
856 return_type_symbol->accept(*this); |
|
857 s4o.print(")"); |
|
858 IN_param_value->accept(*this); |
|
859 return NULL; |
|
860 |
|
861 } |
|
862 |
|
863 ERROR; |
|
864 } |
|
865 |
|
866 }/*function_sint_to_udint*/ |
|
867 break; |
|
868 |
|
869 /**** |
|
870 *SINT_TO_ULINT |
|
871 */ |
|
872 case function_sint_to_ulint : |
|
873 { |
|
874 symbol_c *last_type_symbol = NULL; |
|
875 |
|
876 { |
|
877 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
878 symbol_c *IN_param_value = &this->default_variable_name; |
|
879 |
|
880 symbol_c *IN_type_symbol = param_data_type; |
|
881 last_type_symbol = param_data_type; |
|
882 |
|
883 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
884 { |
|
885 |
|
886 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
887 s4o.print("("); |
|
888 return_type_symbol->accept(*this); |
|
889 s4o.print(")"); |
|
890 IN_param_value->accept(*this); |
|
891 return NULL; |
|
892 |
|
893 } |
|
894 |
|
895 ERROR; |
|
896 } |
|
897 |
|
898 }/*function_sint_to_ulint*/ |
|
899 break; |
|
900 |
|
901 /**** |
|
902 *SINT_TO_REAL |
|
903 */ |
|
904 case function_sint_to_real : |
|
905 { |
|
906 symbol_c *last_type_symbol = NULL; |
|
907 |
|
908 { |
|
909 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
910 symbol_c *IN_param_value = &this->default_variable_name; |
|
911 |
|
912 symbol_c *IN_type_symbol = param_data_type; |
|
913 last_type_symbol = param_data_type; |
|
914 |
|
915 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
916 { |
|
917 |
|
918 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
919 s4o.print("("); |
|
920 return_type_symbol->accept(*this); |
|
921 s4o.print(")"); |
|
922 IN_param_value->accept(*this); |
|
923 return NULL; |
|
924 |
|
925 } |
|
926 |
|
927 ERROR; |
|
928 } |
|
929 |
|
930 }/*function_sint_to_real*/ |
|
931 break; |
|
932 |
|
933 /**** |
|
934 *SINT_TO_LREAL |
|
935 */ |
|
936 case function_sint_to_lreal : |
|
937 { |
|
938 symbol_c *last_type_symbol = NULL; |
|
939 |
|
940 { |
|
941 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
942 symbol_c *IN_param_value = &this->default_variable_name; |
|
943 |
|
944 symbol_c *IN_type_symbol = param_data_type; |
|
945 last_type_symbol = param_data_type; |
|
946 |
|
947 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
948 { |
|
949 |
|
950 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
951 s4o.print("("); |
|
952 return_type_symbol->accept(*this); |
|
953 s4o.print(")"); |
|
954 IN_param_value->accept(*this); |
|
955 return NULL; |
|
956 |
|
957 } |
|
958 |
|
959 ERROR; |
|
960 } |
|
961 |
|
962 }/*function_sint_to_lreal*/ |
|
963 break; |
|
964 |
|
965 /**** |
|
966 *SINT_TO_TIME |
|
967 */ |
|
968 case function_sint_to_time : |
|
969 { |
|
970 symbol_c *last_type_symbol = NULL; |
|
971 |
|
972 { |
|
973 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
974 symbol_c *IN_param_value = &this->default_variable_name; |
|
975 |
|
976 symbol_c *IN_type_symbol = param_data_type; |
|
977 last_type_symbol = param_data_type; |
|
978 |
|
979 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
980 { |
|
981 |
|
982 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
983 s4o.print("("); |
|
984 return_type_symbol->accept(*this); |
|
985 s4o.print(")__int_to_time("); |
|
986 IN_param_value->accept(*this); |
|
987 s4o.print(")"); |
|
988 return NULL; |
|
989 |
|
990 } |
|
991 |
|
992 ERROR; |
|
993 } |
|
994 |
|
995 }/*function_sint_to_time*/ |
|
996 break; |
|
997 |
|
998 /**** |
|
999 *SINT_TO_DATE |
|
1000 */ |
|
1001 case function_sint_to_date : |
|
1002 { |
|
1003 symbol_c *last_type_symbol = NULL; |
|
1004 |
|
1005 { |
|
1006 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1007 symbol_c *IN_param_value = &this->default_variable_name; |
|
1008 |
|
1009 symbol_c *IN_type_symbol = param_data_type; |
|
1010 last_type_symbol = param_data_type; |
|
1011 |
|
1012 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1013 { |
|
1014 |
|
1015 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1016 s4o.print("("); |
|
1017 return_type_symbol->accept(*this); |
|
1018 s4o.print(")__int_to_time("); |
|
1019 IN_param_value->accept(*this); |
|
1020 s4o.print(")"); |
|
1021 return NULL; |
|
1022 |
|
1023 } |
|
1024 |
|
1025 ERROR; |
|
1026 } |
|
1027 |
|
1028 }/*function_sint_to_date*/ |
|
1029 break; |
|
1030 |
|
1031 /**** |
|
1032 *SINT_TO_TOD |
|
1033 */ |
|
1034 case function_sint_to_tod : |
|
1035 { |
|
1036 symbol_c *last_type_symbol = NULL; |
|
1037 |
|
1038 { |
|
1039 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1040 symbol_c *IN_param_value = &this->default_variable_name; |
|
1041 |
|
1042 symbol_c *IN_type_symbol = param_data_type; |
|
1043 last_type_symbol = param_data_type; |
|
1044 |
|
1045 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1046 { |
|
1047 |
|
1048 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1049 s4o.print("("); |
|
1050 return_type_symbol->accept(*this); |
|
1051 s4o.print(")__int_to_time("); |
|
1052 IN_param_value->accept(*this); |
|
1053 s4o.print(")"); |
|
1054 return NULL; |
|
1055 |
|
1056 } |
|
1057 |
|
1058 ERROR; |
|
1059 } |
|
1060 |
|
1061 }/*function_sint_to_tod*/ |
|
1062 break; |
|
1063 |
|
1064 /**** |
|
1065 *SINT_TO_DT |
|
1066 */ |
|
1067 case function_sint_to_dt : |
|
1068 { |
|
1069 symbol_c *last_type_symbol = NULL; |
|
1070 |
|
1071 { |
|
1072 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1073 symbol_c *IN_param_value = &this->default_variable_name; |
|
1074 |
|
1075 symbol_c *IN_type_symbol = param_data_type; |
|
1076 last_type_symbol = param_data_type; |
|
1077 |
|
1078 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1079 { |
|
1080 |
|
1081 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1082 s4o.print("("); |
|
1083 return_type_symbol->accept(*this); |
|
1084 s4o.print(")__int_to_time("); |
|
1085 IN_param_value->accept(*this); |
|
1086 s4o.print(")"); |
|
1087 return NULL; |
|
1088 |
|
1089 } |
|
1090 |
|
1091 ERROR; |
|
1092 } |
|
1093 |
|
1094 }/*function_sint_to_dt*/ |
|
1095 break; |
|
1096 |
|
1097 /**** |
|
1098 *SINT_TO_STRING |
|
1099 */ |
|
1100 case function_sint_to_string : |
|
1101 { |
|
1102 symbol_c *last_type_symbol = NULL; |
|
1103 |
|
1104 { |
|
1105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1106 symbol_c *IN_param_value = &this->default_variable_name; |
|
1107 |
|
1108 symbol_c *IN_type_symbol = param_data_type; |
|
1109 last_type_symbol = param_data_type; |
|
1110 |
|
1111 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1112 { |
|
1113 |
|
1114 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1115 s4o.print("("); |
|
1116 return_type_symbol->accept(*this); |
|
1117 s4o.print(")__sint_to_string("); |
|
1118 IN_param_value->accept(*this); |
|
1119 s4o.print(")"); |
|
1120 return NULL; |
|
1121 |
|
1122 } |
|
1123 |
|
1124 ERROR; |
|
1125 } |
|
1126 |
|
1127 }/*function_sint_to_string*/ |
|
1128 break; |
|
1129 |
|
1130 /**** |
|
1131 *SINT_TO_BYTE |
|
1132 */ |
|
1133 case function_sint_to_byte : |
|
1134 { |
|
1135 symbol_c *last_type_symbol = NULL; |
|
1136 |
|
1137 { |
|
1138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1139 symbol_c *IN_param_value = &this->default_variable_name; |
|
1140 |
|
1141 symbol_c *IN_type_symbol = param_data_type; |
|
1142 last_type_symbol = param_data_type; |
|
1143 |
|
1144 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1145 { |
|
1146 |
|
1147 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1148 s4o.print("("); |
|
1149 return_type_symbol->accept(*this); |
|
1150 s4o.print(")"); |
|
1151 IN_param_value->accept(*this); |
|
1152 return NULL; |
|
1153 |
|
1154 } |
|
1155 |
|
1156 ERROR; |
|
1157 } |
|
1158 |
|
1159 }/*function_sint_to_byte*/ |
|
1160 break; |
|
1161 |
|
1162 /**** |
|
1163 *SINT_TO_WORD |
|
1164 */ |
|
1165 case function_sint_to_word : |
|
1166 { |
|
1167 symbol_c *last_type_symbol = NULL; |
|
1168 |
|
1169 { |
|
1170 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1171 symbol_c *IN_param_value = &this->default_variable_name; |
|
1172 |
|
1173 symbol_c *IN_type_symbol = param_data_type; |
|
1174 last_type_symbol = param_data_type; |
|
1175 |
|
1176 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1177 { |
|
1178 |
|
1179 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1180 s4o.print("("); |
|
1181 return_type_symbol->accept(*this); |
|
1182 s4o.print(")"); |
|
1183 IN_param_value->accept(*this); |
|
1184 return NULL; |
|
1185 |
|
1186 } |
|
1187 |
|
1188 ERROR; |
|
1189 } |
|
1190 |
|
1191 }/*function_sint_to_word*/ |
|
1192 break; |
|
1193 |
|
1194 /**** |
|
1195 *SINT_TO_DWORD |
|
1196 */ |
|
1197 case function_sint_to_dword : |
|
1198 { |
|
1199 symbol_c *last_type_symbol = NULL; |
|
1200 |
|
1201 { |
|
1202 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1203 symbol_c *IN_param_value = &this->default_variable_name; |
|
1204 |
|
1205 symbol_c *IN_type_symbol = param_data_type; |
|
1206 last_type_symbol = param_data_type; |
|
1207 |
|
1208 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1209 { |
|
1210 |
|
1211 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1212 s4o.print("("); |
|
1213 return_type_symbol->accept(*this); |
|
1214 s4o.print(")"); |
|
1215 IN_param_value->accept(*this); |
|
1216 return NULL; |
|
1217 |
|
1218 } |
|
1219 |
|
1220 ERROR; |
|
1221 } |
|
1222 |
|
1223 }/*function_sint_to_dword*/ |
|
1224 break; |
|
1225 |
|
1226 /**** |
|
1227 *SINT_TO_LWORD |
|
1228 */ |
|
1229 case function_sint_to_lword : |
|
1230 { |
|
1231 symbol_c *last_type_symbol = NULL; |
|
1232 |
|
1233 { |
|
1234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1235 symbol_c *IN_param_value = &this->default_variable_name; |
|
1236 |
|
1237 symbol_c *IN_type_symbol = param_data_type; |
|
1238 last_type_symbol = param_data_type; |
|
1239 |
|
1240 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1241 { |
|
1242 |
|
1243 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1244 s4o.print("("); |
|
1245 return_type_symbol->accept(*this); |
|
1246 s4o.print(")"); |
|
1247 IN_param_value->accept(*this); |
|
1248 return NULL; |
|
1249 |
|
1250 } |
|
1251 |
|
1252 ERROR; |
|
1253 } |
|
1254 |
|
1255 }/*function_sint_to_lword*/ |
|
1256 break; |
|
1257 |
|
1258 /**** |
|
1259 *INT_TO_BOOL |
|
1260 */ |
|
1261 case function_int_to_bool : |
|
1262 { |
|
1263 symbol_c *last_type_symbol = NULL; |
|
1264 |
|
1265 { |
|
1266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1267 symbol_c *IN_param_value = &this->default_variable_name; |
|
1268 |
|
1269 symbol_c *IN_type_symbol = param_data_type; |
|
1270 last_type_symbol = param_data_type; |
|
1271 |
|
1272 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1273 { |
|
1274 |
|
1275 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1276 s4o.print("("); |
|
1277 return_type_symbol->accept(*this); |
|
1278 s4o.print(")"); |
|
1279 IN_param_value->accept(*this); |
|
1280 return NULL; |
|
1281 |
|
1282 } |
|
1283 |
|
1284 ERROR; |
|
1285 } |
|
1286 |
|
1287 }/*function_int_to_bool*/ |
|
1288 break; |
|
1289 |
|
1290 /**** |
|
1291 *INT_TO_SINT |
|
1292 */ |
|
1293 case function_int_to_sint : |
|
1294 { |
|
1295 symbol_c *last_type_symbol = NULL; |
|
1296 |
|
1297 { |
|
1298 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1299 symbol_c *IN_param_value = &this->default_variable_name; |
|
1300 |
|
1301 symbol_c *IN_type_symbol = param_data_type; |
|
1302 last_type_symbol = param_data_type; |
|
1303 |
|
1304 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1305 { |
|
1306 |
|
1307 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1308 s4o.print("("); |
|
1309 return_type_symbol->accept(*this); |
|
1310 s4o.print(")"); |
|
1311 IN_param_value->accept(*this); |
|
1312 return NULL; |
|
1313 |
|
1314 } |
|
1315 |
|
1316 ERROR; |
|
1317 } |
|
1318 |
|
1319 }/*function_int_to_sint*/ |
|
1320 break; |
|
1321 |
|
1322 /**** |
|
1323 *INT_TO_DINT |
|
1324 */ |
|
1325 case function_int_to_dint : |
|
1326 { |
|
1327 symbol_c *last_type_symbol = NULL; |
|
1328 |
|
1329 { |
|
1330 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1331 symbol_c *IN_param_value = &this->default_variable_name; |
|
1332 |
|
1333 symbol_c *IN_type_symbol = param_data_type; |
|
1334 last_type_symbol = param_data_type; |
|
1335 |
|
1336 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1337 { |
|
1338 |
|
1339 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
1340 s4o.print("("); |
|
1341 return_type_symbol->accept(*this); |
|
1342 s4o.print(")"); |
|
1343 IN_param_value->accept(*this); |
|
1344 return NULL; |
|
1345 |
|
1346 } |
|
1347 |
|
1348 ERROR; |
|
1349 } |
|
1350 |
|
1351 }/*function_int_to_dint*/ |
|
1352 break; |
|
1353 |
|
1354 /**** |
|
1355 *INT_TO_LINT |
|
1356 */ |
|
1357 case function_int_to_lint : |
|
1358 { |
|
1359 symbol_c *last_type_symbol = NULL; |
|
1360 |
|
1361 { |
|
1362 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1363 symbol_c *IN_param_value = &this->default_variable_name; |
|
1364 |
|
1365 symbol_c *IN_type_symbol = param_data_type; |
|
1366 last_type_symbol = param_data_type; |
|
1367 |
|
1368 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1369 { |
|
1370 |
|
1371 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
1372 s4o.print("("); |
|
1373 return_type_symbol->accept(*this); |
|
1374 s4o.print(")"); |
|
1375 IN_param_value->accept(*this); |
|
1376 return NULL; |
|
1377 |
|
1378 } |
|
1379 |
|
1380 ERROR; |
|
1381 } |
|
1382 |
|
1383 }/*function_int_to_lint*/ |
|
1384 break; |
|
1385 |
|
1386 /**** |
|
1387 *INT_TO_USINT |
|
1388 */ |
|
1389 case function_int_to_usint : |
|
1390 { |
|
1391 symbol_c *last_type_symbol = NULL; |
|
1392 |
|
1393 { |
|
1394 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1395 symbol_c *IN_param_value = &this->default_variable_name; |
|
1396 |
|
1397 symbol_c *IN_type_symbol = param_data_type; |
|
1398 last_type_symbol = param_data_type; |
|
1399 |
|
1400 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1401 { |
|
1402 |
|
1403 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
1404 s4o.print("("); |
|
1405 return_type_symbol->accept(*this); |
|
1406 s4o.print(")"); |
|
1407 IN_param_value->accept(*this); |
|
1408 return NULL; |
|
1409 |
|
1410 } |
|
1411 |
|
1412 ERROR; |
|
1413 } |
|
1414 |
|
1415 }/*function_int_to_usint*/ |
|
1416 break; |
|
1417 |
|
1418 /**** |
|
1419 *INT_TO_UINT |
|
1420 */ |
|
1421 case function_int_to_uint : |
|
1422 { |
|
1423 symbol_c *last_type_symbol = NULL; |
|
1424 |
|
1425 { |
|
1426 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1427 symbol_c *IN_param_value = &this->default_variable_name; |
|
1428 |
|
1429 symbol_c *IN_type_symbol = param_data_type; |
|
1430 last_type_symbol = param_data_type; |
|
1431 |
|
1432 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1433 { |
|
1434 |
|
1435 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
1436 s4o.print("("); |
|
1437 return_type_symbol->accept(*this); |
|
1438 s4o.print(")"); |
|
1439 IN_param_value->accept(*this); |
|
1440 return NULL; |
|
1441 |
|
1442 } |
|
1443 |
|
1444 ERROR; |
|
1445 } |
|
1446 |
|
1447 }/*function_int_to_uint*/ |
|
1448 break; |
|
1449 |
|
1450 /**** |
|
1451 *INT_TO_UDINT |
|
1452 */ |
|
1453 case function_int_to_udint : |
|
1454 { |
|
1455 symbol_c *last_type_symbol = NULL; |
|
1456 |
|
1457 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1465 { |
|
1466 |
|
1467 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
1468 s4o.print("("); |
|
1469 return_type_symbol->accept(*this); |
|
1470 s4o.print(")"); |
|
1471 IN_param_value->accept(*this); |
|
1472 return NULL; |
|
1473 |
|
1474 } |
|
1475 |
|
1476 ERROR; |
|
1477 } |
|
1478 |
|
1479 }/*function_int_to_udint*/ |
|
1480 break; |
|
1481 |
|
1482 /**** |
|
1483 *INT_TO_ULINT |
|
1484 */ |
|
1485 case function_int_to_ulint : |
|
1486 { |
|
1487 symbol_c *last_type_symbol = NULL; |
|
1488 |
|
1489 { |
|
1490 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1491 symbol_c *IN_param_value = &this->default_variable_name; |
|
1492 |
|
1493 symbol_c *IN_type_symbol = param_data_type; |
|
1494 last_type_symbol = param_data_type; |
|
1495 |
|
1496 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1497 { |
|
1498 |
|
1499 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
1500 s4o.print("("); |
|
1501 return_type_symbol->accept(*this); |
|
1502 s4o.print(")"); |
|
1503 IN_param_value->accept(*this); |
|
1504 return NULL; |
|
1505 |
|
1506 } |
|
1507 |
|
1508 ERROR; |
|
1509 } |
|
1510 |
|
1511 }/*function_int_to_ulint*/ |
|
1512 break; |
|
1513 |
|
1514 /**** |
|
1515 *INT_TO_REAL |
|
1516 */ |
|
1517 case function_int_to_real : |
|
1518 { |
|
1519 symbol_c *last_type_symbol = NULL; |
|
1520 |
|
1521 { |
|
1522 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1523 symbol_c *IN_param_value = &this->default_variable_name; |
|
1524 |
|
1525 symbol_c *IN_type_symbol = param_data_type; |
|
1526 last_type_symbol = param_data_type; |
|
1527 |
|
1528 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1529 { |
|
1530 |
|
1531 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
1532 s4o.print("("); |
|
1533 return_type_symbol->accept(*this); |
|
1534 s4o.print(")"); |
|
1535 IN_param_value->accept(*this); |
|
1536 return NULL; |
|
1537 |
|
1538 } |
|
1539 |
|
1540 ERROR; |
|
1541 } |
|
1542 |
|
1543 }/*function_int_to_real*/ |
|
1544 break; |
|
1545 |
|
1546 /**** |
|
1547 *INT_TO_LREAL |
|
1548 */ |
|
1549 case function_int_to_lreal : |
|
1550 { |
|
1551 symbol_c *last_type_symbol = NULL; |
|
1552 |
|
1553 { |
|
1554 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1555 symbol_c *IN_param_value = &this->default_variable_name; |
|
1556 |
|
1557 symbol_c *IN_type_symbol = param_data_type; |
|
1558 last_type_symbol = param_data_type; |
|
1559 |
|
1560 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1561 { |
|
1562 |
|
1563 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
1564 s4o.print("("); |
|
1565 return_type_symbol->accept(*this); |
|
1566 s4o.print(")"); |
|
1567 IN_param_value->accept(*this); |
|
1568 return NULL; |
|
1569 |
|
1570 } |
|
1571 |
|
1572 ERROR; |
|
1573 } |
|
1574 |
|
1575 }/*function_int_to_lreal*/ |
|
1576 break; |
|
1577 |
|
1578 /**** |
|
1579 *INT_TO_TIME |
|
1580 */ |
|
1581 case function_int_to_time : |
|
1582 { |
|
1583 symbol_c *last_type_symbol = NULL; |
|
1584 |
|
1585 { |
|
1586 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1587 symbol_c *IN_param_value = &this->default_variable_name; |
|
1588 |
|
1589 symbol_c *IN_type_symbol = param_data_type; |
|
1590 last_type_symbol = param_data_type; |
|
1591 |
|
1592 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1593 { |
|
1594 |
|
1595 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
1596 s4o.print("("); |
|
1597 return_type_symbol->accept(*this); |
|
1598 s4o.print(")__int_to_time("); |
|
1599 IN_param_value->accept(*this); |
|
1600 s4o.print(")"); |
|
1601 return NULL; |
|
1602 |
|
1603 } |
|
1604 |
|
1605 ERROR; |
|
1606 } |
|
1607 |
|
1608 }/*function_int_to_time*/ |
|
1609 break; |
|
1610 |
|
1611 /**** |
|
1612 *INT_TO_DATE |
|
1613 */ |
|
1614 case function_int_to_date : |
|
1615 { |
|
1616 symbol_c *last_type_symbol = NULL; |
|
1617 |
|
1618 { |
|
1619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1620 symbol_c *IN_param_value = &this->default_variable_name; |
|
1621 |
|
1622 symbol_c *IN_type_symbol = param_data_type; |
|
1623 last_type_symbol = param_data_type; |
|
1624 |
|
1625 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1626 { |
|
1627 |
|
1628 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
1629 s4o.print("("); |
|
1630 return_type_symbol->accept(*this); |
|
1631 s4o.print(")__int_to_time("); |
|
1632 IN_param_value->accept(*this); |
|
1633 s4o.print(")"); |
|
1634 return NULL; |
|
1635 |
|
1636 } |
|
1637 |
|
1638 ERROR; |
|
1639 } |
|
1640 |
|
1641 }/*function_int_to_date*/ |
|
1642 break; |
|
1643 |
|
1644 /**** |
|
1645 *INT_TO_TOD |
|
1646 */ |
|
1647 case function_int_to_tod : |
|
1648 { |
|
1649 symbol_c *last_type_symbol = NULL; |
|
1650 |
|
1651 { |
|
1652 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1653 symbol_c *IN_param_value = &this->default_variable_name; |
|
1654 |
|
1655 symbol_c *IN_type_symbol = param_data_type; |
|
1656 last_type_symbol = param_data_type; |
|
1657 |
|
1658 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1659 { |
|
1660 |
|
1661 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
1662 s4o.print("("); |
|
1663 return_type_symbol->accept(*this); |
|
1664 s4o.print(")__int_to_time("); |
|
1665 IN_param_value->accept(*this); |
|
1666 s4o.print(")"); |
|
1667 return NULL; |
|
1668 |
|
1669 } |
|
1670 |
|
1671 ERROR; |
|
1672 } |
|
1673 |
|
1674 }/*function_int_to_tod*/ |
|
1675 break; |
|
1676 |
|
1677 /**** |
|
1678 *INT_TO_DT |
|
1679 */ |
|
1680 case function_int_to_dt : |
|
1681 { |
|
1682 symbol_c *last_type_symbol = NULL; |
|
1683 |
|
1684 { |
|
1685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1686 symbol_c *IN_param_value = &this->default_variable_name; |
|
1687 |
|
1688 symbol_c *IN_type_symbol = param_data_type; |
|
1689 last_type_symbol = param_data_type; |
|
1690 |
|
1691 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1692 { |
|
1693 |
|
1694 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
1695 s4o.print("("); |
|
1696 return_type_symbol->accept(*this); |
|
1697 s4o.print(")__int_to_time("); |
|
1698 IN_param_value->accept(*this); |
|
1699 s4o.print(")"); |
|
1700 return NULL; |
|
1701 |
|
1702 } |
|
1703 |
|
1704 ERROR; |
|
1705 } |
|
1706 |
|
1707 }/*function_int_to_dt*/ |
|
1708 break; |
|
1709 |
|
1710 /**** |
|
1711 *INT_TO_STRING |
|
1712 */ |
|
1713 case function_int_to_string : |
|
1714 { |
|
1715 symbol_c *last_type_symbol = NULL; |
|
1716 |
|
1717 { |
|
1718 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1719 symbol_c *IN_param_value = &this->default_variable_name; |
|
1720 |
|
1721 symbol_c *IN_type_symbol = param_data_type; |
|
1722 last_type_symbol = param_data_type; |
|
1723 |
|
1724 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1725 { |
|
1726 |
|
1727 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
1728 s4o.print("("); |
|
1729 return_type_symbol->accept(*this); |
|
1730 s4o.print(")__sint_to_string("); |
|
1731 IN_param_value->accept(*this); |
|
1732 s4o.print(")"); |
|
1733 return NULL; |
|
1734 |
|
1735 } |
|
1736 |
|
1737 ERROR; |
|
1738 } |
|
1739 |
|
1740 }/*function_int_to_string*/ |
|
1741 break; |
|
1742 |
|
1743 /**** |
|
1744 *INT_TO_BYTE |
|
1745 */ |
|
1746 case function_int_to_byte : |
|
1747 { |
|
1748 symbol_c *last_type_symbol = NULL; |
|
1749 |
|
1750 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1758 { |
|
1759 |
|
1760 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
1761 s4o.print("("); |
|
1762 return_type_symbol->accept(*this); |
|
1763 s4o.print(")"); |
|
1764 IN_param_value->accept(*this); |
|
1765 return NULL; |
|
1766 |
|
1767 } |
|
1768 |
|
1769 ERROR; |
|
1770 } |
|
1771 |
|
1772 }/*function_int_to_byte*/ |
|
1773 break; |
|
1774 |
|
1775 /**** |
|
1776 *INT_TO_WORD |
|
1777 */ |
|
1778 case function_int_to_word : |
|
1779 { |
|
1780 symbol_c *last_type_symbol = NULL; |
|
1781 |
|
1782 { |
|
1783 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1784 symbol_c *IN_param_value = &this->default_variable_name; |
|
1785 |
|
1786 symbol_c *IN_type_symbol = param_data_type; |
|
1787 last_type_symbol = param_data_type; |
|
1788 |
|
1789 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1790 { |
|
1791 |
|
1792 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
1793 s4o.print("("); |
|
1794 return_type_symbol->accept(*this); |
|
1795 s4o.print(")"); |
|
1796 IN_param_value->accept(*this); |
|
1797 return NULL; |
|
1798 |
|
1799 } |
|
1800 |
|
1801 ERROR; |
|
1802 } |
|
1803 |
|
1804 }/*function_int_to_word*/ |
|
1805 break; |
|
1806 |
|
1807 /**** |
|
1808 *INT_TO_DWORD |
|
1809 */ |
|
1810 case function_int_to_dword : |
|
1811 { |
|
1812 symbol_c *last_type_symbol = NULL; |
|
1813 |
|
1814 { |
|
1815 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1816 symbol_c *IN_param_value = &this->default_variable_name; |
|
1817 |
|
1818 symbol_c *IN_type_symbol = param_data_type; |
|
1819 last_type_symbol = param_data_type; |
|
1820 |
|
1821 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1822 { |
|
1823 |
|
1824 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
1825 s4o.print("("); |
|
1826 return_type_symbol->accept(*this); |
|
1827 s4o.print(")"); |
|
1828 IN_param_value->accept(*this); |
|
1829 return NULL; |
|
1830 |
|
1831 } |
|
1832 |
|
1833 ERROR; |
|
1834 } |
|
1835 |
|
1836 }/*function_int_to_dword*/ |
|
1837 break; |
|
1838 |
|
1839 /**** |
|
1840 *INT_TO_LWORD |
|
1841 */ |
|
1842 case function_int_to_lword : |
|
1843 { |
|
1844 symbol_c *last_type_symbol = NULL; |
|
1845 |
|
1846 { |
|
1847 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1848 symbol_c *IN_param_value = &this->default_variable_name; |
|
1849 |
|
1850 symbol_c *IN_type_symbol = param_data_type; |
|
1851 last_type_symbol = param_data_type; |
|
1852 |
|
1853 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
1854 { |
|
1855 |
|
1856 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
1857 s4o.print("("); |
|
1858 return_type_symbol->accept(*this); |
|
1859 s4o.print(")"); |
|
1860 IN_param_value->accept(*this); |
|
1861 return NULL; |
|
1862 |
|
1863 } |
|
1864 |
|
1865 ERROR; |
|
1866 } |
|
1867 |
|
1868 }/*function_int_to_lword*/ |
|
1869 break; |
|
1870 |
|
1871 /**** |
|
1872 *DINT_TO_BOOL |
|
1873 */ |
|
1874 case function_dint_to_bool : |
|
1875 { |
|
1876 symbol_c *last_type_symbol = NULL; |
|
1877 |
|
1878 { |
|
1879 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1880 symbol_c *IN_param_value = &this->default_variable_name; |
|
1881 |
|
1882 symbol_c *IN_type_symbol = param_data_type; |
|
1883 last_type_symbol = param_data_type; |
|
1884 |
|
1885 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1886 { |
|
1887 |
|
1888 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
1889 s4o.print("("); |
|
1890 return_type_symbol->accept(*this); |
|
1891 s4o.print(")"); |
|
1892 IN_param_value->accept(*this); |
|
1893 return NULL; |
|
1894 |
|
1895 } |
|
1896 |
|
1897 ERROR; |
|
1898 } |
|
1899 |
|
1900 }/*function_dint_to_bool*/ |
|
1901 break; |
|
1902 |
|
1903 /**** |
|
1904 *DINT_TO_SINT |
|
1905 */ |
|
1906 case function_dint_to_sint : |
|
1907 { |
|
1908 symbol_c *last_type_symbol = NULL; |
|
1909 |
|
1910 { |
|
1911 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1912 symbol_c *IN_param_value = &this->default_variable_name; |
|
1913 |
|
1914 symbol_c *IN_type_symbol = param_data_type; |
|
1915 last_type_symbol = param_data_type; |
|
1916 |
|
1917 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1918 { |
|
1919 |
|
1920 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
1921 s4o.print("("); |
|
1922 return_type_symbol->accept(*this); |
|
1923 s4o.print(")"); |
|
1924 IN_param_value->accept(*this); |
|
1925 return NULL; |
|
1926 |
|
1927 } |
|
1928 |
|
1929 ERROR; |
|
1930 } |
|
1931 |
|
1932 }/*function_dint_to_sint*/ |
|
1933 break; |
|
1934 |
|
1935 /**** |
|
1936 *DINT_TO_INT |
|
1937 */ |
|
1938 case function_dint_to_int : |
|
1939 { |
|
1940 symbol_c *last_type_symbol = NULL; |
|
1941 |
|
1942 { |
|
1943 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1944 symbol_c *IN_param_value = &this->default_variable_name; |
|
1945 |
|
1946 symbol_c *IN_type_symbol = param_data_type; |
|
1947 last_type_symbol = param_data_type; |
|
1948 |
|
1949 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1950 { |
|
1951 |
|
1952 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
1953 s4o.print("("); |
|
1954 return_type_symbol->accept(*this); |
|
1955 s4o.print(")"); |
|
1956 IN_param_value->accept(*this); |
|
1957 return NULL; |
|
1958 |
|
1959 } |
|
1960 |
|
1961 ERROR; |
|
1962 } |
|
1963 |
|
1964 }/*function_dint_to_int*/ |
|
1965 break; |
|
1966 |
|
1967 /**** |
|
1968 *DINT_TO_LINT |
|
1969 */ |
|
1970 case function_dint_to_lint : |
|
1971 { |
|
1972 symbol_c *last_type_symbol = NULL; |
|
1973 |
|
1974 { |
|
1975 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
1976 symbol_c *IN_param_value = &this->default_variable_name; |
|
1977 |
|
1978 symbol_c *IN_type_symbol = param_data_type; |
|
1979 last_type_symbol = param_data_type; |
|
1980 |
|
1981 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
1982 { |
|
1983 |
|
1984 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
1985 s4o.print("("); |
|
1986 return_type_symbol->accept(*this); |
|
1987 s4o.print(")"); |
|
1988 IN_param_value->accept(*this); |
|
1989 return NULL; |
|
1990 |
|
1991 } |
|
1992 |
|
1993 ERROR; |
|
1994 } |
|
1995 |
|
1996 }/*function_dint_to_lint*/ |
|
1997 break; |
|
1998 |
|
1999 /**** |
|
2000 *DINT_TO_USINT |
|
2001 */ |
|
2002 case function_dint_to_usint : |
|
2003 { |
|
2004 symbol_c *last_type_symbol = NULL; |
|
2005 |
|
2006 { |
|
2007 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2008 symbol_c *IN_param_value = &this->default_variable_name; |
|
2009 |
|
2010 symbol_c *IN_type_symbol = param_data_type; |
|
2011 last_type_symbol = param_data_type; |
|
2012 |
|
2013 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2014 { |
|
2015 |
|
2016 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2017 s4o.print("("); |
|
2018 return_type_symbol->accept(*this); |
|
2019 s4o.print(")"); |
|
2020 IN_param_value->accept(*this); |
|
2021 return NULL; |
|
2022 |
|
2023 } |
|
2024 |
|
2025 ERROR; |
|
2026 } |
|
2027 |
|
2028 }/*function_dint_to_usint*/ |
|
2029 break; |
|
2030 |
|
2031 /**** |
|
2032 *DINT_TO_UINT |
|
2033 */ |
|
2034 case function_dint_to_uint : |
|
2035 { |
|
2036 symbol_c *last_type_symbol = NULL; |
|
2037 |
|
2038 { |
|
2039 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2040 symbol_c *IN_param_value = &this->default_variable_name; |
|
2041 |
|
2042 symbol_c *IN_type_symbol = param_data_type; |
|
2043 last_type_symbol = param_data_type; |
|
2044 |
|
2045 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2046 { |
|
2047 |
|
2048 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2049 s4o.print("("); |
|
2050 return_type_symbol->accept(*this); |
|
2051 s4o.print(")"); |
|
2052 IN_param_value->accept(*this); |
|
2053 return NULL; |
|
2054 |
|
2055 } |
|
2056 |
|
2057 ERROR; |
|
2058 } |
|
2059 |
|
2060 }/*function_dint_to_uint*/ |
|
2061 break; |
|
2062 |
|
2063 /**** |
|
2064 *DINT_TO_UDINT |
|
2065 */ |
|
2066 case function_dint_to_udint : |
|
2067 { |
|
2068 symbol_c *last_type_symbol = NULL; |
|
2069 |
|
2070 { |
|
2071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2072 symbol_c *IN_param_value = &this->default_variable_name; |
|
2073 |
|
2074 symbol_c *IN_type_symbol = param_data_type; |
|
2075 last_type_symbol = param_data_type; |
|
2076 |
|
2077 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2078 { |
|
2079 |
|
2080 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2081 s4o.print("("); |
|
2082 return_type_symbol->accept(*this); |
|
2083 s4o.print(")"); |
|
2084 IN_param_value->accept(*this); |
|
2085 return NULL; |
|
2086 |
|
2087 } |
|
2088 |
|
2089 ERROR; |
|
2090 } |
|
2091 |
|
2092 }/*function_dint_to_udint*/ |
|
2093 break; |
|
2094 |
|
2095 /**** |
|
2096 *DINT_TO_ULINT |
|
2097 */ |
|
2098 case function_dint_to_ulint : |
|
2099 { |
|
2100 symbol_c *last_type_symbol = NULL; |
|
2101 |
|
2102 { |
|
2103 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2104 symbol_c *IN_param_value = &this->default_variable_name; |
|
2105 |
|
2106 symbol_c *IN_type_symbol = param_data_type; |
|
2107 last_type_symbol = param_data_type; |
|
2108 |
|
2109 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2110 { |
|
2111 |
|
2112 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2113 s4o.print("("); |
|
2114 return_type_symbol->accept(*this); |
|
2115 s4o.print(")"); |
|
2116 IN_param_value->accept(*this); |
|
2117 return NULL; |
|
2118 |
|
2119 } |
|
2120 |
|
2121 ERROR; |
|
2122 } |
|
2123 |
|
2124 }/*function_dint_to_ulint*/ |
|
2125 break; |
|
2126 |
|
2127 /**** |
|
2128 *DINT_TO_REAL |
|
2129 */ |
|
2130 case function_dint_to_real : |
|
2131 { |
|
2132 symbol_c *last_type_symbol = NULL; |
|
2133 |
|
2134 { |
|
2135 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2136 symbol_c *IN_param_value = &this->default_variable_name; |
|
2137 |
|
2138 symbol_c *IN_type_symbol = param_data_type; |
|
2139 last_type_symbol = param_data_type; |
|
2140 |
|
2141 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2142 { |
|
2143 |
|
2144 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2145 s4o.print("("); |
|
2146 return_type_symbol->accept(*this); |
|
2147 s4o.print(")"); |
|
2148 IN_param_value->accept(*this); |
|
2149 return NULL; |
|
2150 |
|
2151 } |
|
2152 |
|
2153 ERROR; |
|
2154 } |
|
2155 |
|
2156 }/*function_dint_to_real*/ |
|
2157 break; |
|
2158 |
|
2159 /**** |
|
2160 *DINT_TO_LREAL |
|
2161 */ |
|
2162 case function_dint_to_lreal : |
|
2163 { |
|
2164 symbol_c *last_type_symbol = NULL; |
|
2165 |
|
2166 { |
|
2167 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2168 symbol_c *IN_param_value = &this->default_variable_name; |
|
2169 |
|
2170 symbol_c *IN_type_symbol = param_data_type; |
|
2171 last_type_symbol = param_data_type; |
|
2172 |
|
2173 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2174 { |
|
2175 |
|
2176 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2177 s4o.print("("); |
|
2178 return_type_symbol->accept(*this); |
|
2179 s4o.print(")"); |
|
2180 IN_param_value->accept(*this); |
|
2181 return NULL; |
|
2182 |
|
2183 } |
|
2184 |
|
2185 ERROR; |
|
2186 } |
|
2187 |
|
2188 }/*function_dint_to_lreal*/ |
|
2189 break; |
|
2190 |
|
2191 /**** |
|
2192 *DINT_TO_TIME |
|
2193 */ |
|
2194 case function_dint_to_time : |
|
2195 { |
|
2196 symbol_c *last_type_symbol = NULL; |
|
2197 |
|
2198 { |
|
2199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2200 symbol_c *IN_param_value = &this->default_variable_name; |
|
2201 |
|
2202 symbol_c *IN_type_symbol = param_data_type; |
|
2203 last_type_symbol = param_data_type; |
|
2204 |
|
2205 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2206 { |
|
2207 |
|
2208 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2209 s4o.print("("); |
|
2210 return_type_symbol->accept(*this); |
|
2211 s4o.print(")__int_to_time("); |
|
2212 IN_param_value->accept(*this); |
|
2213 s4o.print(")"); |
|
2214 return NULL; |
|
2215 |
|
2216 } |
|
2217 |
|
2218 ERROR; |
|
2219 } |
|
2220 |
|
2221 }/*function_dint_to_time*/ |
|
2222 break; |
|
2223 |
|
2224 /**** |
|
2225 *DINT_TO_DATE |
|
2226 */ |
|
2227 case function_dint_to_date : |
|
2228 { |
|
2229 symbol_c *last_type_symbol = NULL; |
|
2230 |
|
2231 { |
|
2232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2233 symbol_c *IN_param_value = &this->default_variable_name; |
|
2234 |
|
2235 symbol_c *IN_type_symbol = param_data_type; |
|
2236 last_type_symbol = param_data_type; |
|
2237 |
|
2238 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2239 { |
|
2240 |
|
2241 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
2242 s4o.print("("); |
|
2243 return_type_symbol->accept(*this); |
|
2244 s4o.print(")__int_to_time("); |
|
2245 IN_param_value->accept(*this); |
|
2246 s4o.print(")"); |
|
2247 return NULL; |
|
2248 |
|
2249 } |
|
2250 |
|
2251 ERROR; |
|
2252 } |
|
2253 |
|
2254 }/*function_dint_to_date*/ |
|
2255 break; |
|
2256 |
|
2257 /**** |
|
2258 *DINT_TO_TOD |
|
2259 */ |
|
2260 case function_dint_to_tod : |
|
2261 { |
|
2262 symbol_c *last_type_symbol = NULL; |
|
2263 |
|
2264 { |
|
2265 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2266 symbol_c *IN_param_value = &this->default_variable_name; |
|
2267 |
|
2268 symbol_c *IN_type_symbol = param_data_type; |
|
2269 last_type_symbol = param_data_type; |
|
2270 |
|
2271 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2272 { |
|
2273 |
|
2274 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2275 s4o.print("("); |
|
2276 return_type_symbol->accept(*this); |
|
2277 s4o.print(")__int_to_time("); |
|
2278 IN_param_value->accept(*this); |
|
2279 s4o.print(")"); |
|
2280 return NULL; |
|
2281 |
|
2282 } |
|
2283 |
|
2284 ERROR; |
|
2285 } |
|
2286 |
|
2287 }/*function_dint_to_tod*/ |
|
2288 break; |
|
2289 |
|
2290 /**** |
|
2291 *DINT_TO_DT |
|
2292 */ |
|
2293 case function_dint_to_dt : |
|
2294 { |
|
2295 symbol_c *last_type_symbol = NULL; |
|
2296 |
|
2297 { |
|
2298 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2299 symbol_c *IN_param_value = &this->default_variable_name; |
|
2300 |
|
2301 symbol_c *IN_type_symbol = param_data_type; |
|
2302 last_type_symbol = param_data_type; |
|
2303 |
|
2304 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2305 { |
|
2306 |
|
2307 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
2308 s4o.print("("); |
|
2309 return_type_symbol->accept(*this); |
|
2310 s4o.print(")__int_to_time("); |
|
2311 IN_param_value->accept(*this); |
|
2312 s4o.print(")"); |
|
2313 return NULL; |
|
2314 |
|
2315 } |
|
2316 |
|
2317 ERROR; |
|
2318 } |
|
2319 |
|
2320 }/*function_dint_to_dt*/ |
|
2321 break; |
|
2322 |
|
2323 /**** |
|
2324 *DINT_TO_STRING |
|
2325 */ |
|
2326 case function_dint_to_string : |
|
2327 { |
|
2328 symbol_c *last_type_symbol = NULL; |
|
2329 |
|
2330 { |
|
2331 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2332 symbol_c *IN_param_value = &this->default_variable_name; |
|
2333 |
|
2334 symbol_c *IN_type_symbol = param_data_type; |
|
2335 last_type_symbol = param_data_type; |
|
2336 |
|
2337 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2338 { |
|
2339 |
|
2340 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2341 s4o.print("("); |
|
2342 return_type_symbol->accept(*this); |
|
2343 s4o.print(")__sint_to_string("); |
|
2344 IN_param_value->accept(*this); |
|
2345 s4o.print(")"); |
|
2346 return NULL; |
|
2347 |
|
2348 } |
|
2349 |
|
2350 ERROR; |
|
2351 } |
|
2352 |
|
2353 }/*function_dint_to_string*/ |
|
2354 break; |
|
2355 |
|
2356 /**** |
|
2357 *DINT_TO_BYTE |
|
2358 */ |
|
2359 case function_dint_to_byte : |
|
2360 { |
|
2361 symbol_c *last_type_symbol = NULL; |
|
2362 |
|
2363 { |
|
2364 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2365 symbol_c *IN_param_value = &this->default_variable_name; |
|
2366 |
|
2367 symbol_c *IN_type_symbol = param_data_type; |
|
2368 last_type_symbol = param_data_type; |
|
2369 |
|
2370 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2371 { |
|
2372 |
|
2373 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2374 s4o.print("("); |
|
2375 return_type_symbol->accept(*this); |
|
2376 s4o.print(")"); |
|
2377 IN_param_value->accept(*this); |
|
2378 return NULL; |
|
2379 |
|
2380 } |
|
2381 |
|
2382 ERROR; |
|
2383 } |
|
2384 |
|
2385 }/*function_dint_to_byte*/ |
|
2386 break; |
|
2387 |
|
2388 /**** |
|
2389 *DINT_TO_WORD |
|
2390 */ |
|
2391 case function_dint_to_word : |
|
2392 { |
|
2393 symbol_c *last_type_symbol = NULL; |
|
2394 |
|
2395 { |
|
2396 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2397 symbol_c *IN_param_value = &this->default_variable_name; |
|
2398 |
|
2399 symbol_c *IN_type_symbol = param_data_type; |
|
2400 last_type_symbol = param_data_type; |
|
2401 |
|
2402 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2403 { |
|
2404 |
|
2405 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
2406 s4o.print("("); |
|
2407 return_type_symbol->accept(*this); |
|
2408 s4o.print(")"); |
|
2409 IN_param_value->accept(*this); |
|
2410 return NULL; |
|
2411 |
|
2412 } |
|
2413 |
|
2414 ERROR; |
|
2415 } |
|
2416 |
|
2417 }/*function_dint_to_word*/ |
|
2418 break; |
|
2419 |
|
2420 /**** |
|
2421 *DINT_TO_DWORD |
|
2422 */ |
|
2423 case function_dint_to_dword : |
|
2424 { |
|
2425 symbol_c *last_type_symbol = NULL; |
|
2426 |
|
2427 { |
|
2428 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2429 symbol_c *IN_param_value = &this->default_variable_name; |
|
2430 |
|
2431 symbol_c *IN_type_symbol = param_data_type; |
|
2432 last_type_symbol = param_data_type; |
|
2433 |
|
2434 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2435 { |
|
2436 |
|
2437 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
2438 s4o.print("("); |
|
2439 return_type_symbol->accept(*this); |
|
2440 s4o.print(")"); |
|
2441 IN_param_value->accept(*this); |
|
2442 return NULL; |
|
2443 |
|
2444 } |
|
2445 |
|
2446 ERROR; |
|
2447 } |
|
2448 |
|
2449 }/*function_dint_to_dword*/ |
|
2450 break; |
|
2451 |
|
2452 /**** |
|
2453 *DINT_TO_LWORD |
|
2454 */ |
|
2455 case function_dint_to_lword : |
|
2456 { |
|
2457 symbol_c *last_type_symbol = NULL; |
|
2458 |
|
2459 { |
|
2460 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2461 symbol_c *IN_param_value = &this->default_variable_name; |
|
2462 |
|
2463 symbol_c *IN_type_symbol = param_data_type; |
|
2464 last_type_symbol = param_data_type; |
|
2465 |
|
2466 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2467 { |
|
2468 |
|
2469 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
2470 s4o.print("("); |
|
2471 return_type_symbol->accept(*this); |
|
2472 s4o.print(")"); |
|
2473 IN_param_value->accept(*this); |
|
2474 return NULL; |
|
2475 |
|
2476 } |
|
2477 |
|
2478 ERROR; |
|
2479 } |
|
2480 |
|
2481 }/*function_dint_to_lword*/ |
|
2482 break; |
|
2483 |
|
2484 /**** |
|
2485 *LINT_TO_BOOL |
|
2486 */ |
|
2487 case function_lint_to_bool : |
|
2488 { |
|
2489 symbol_c *last_type_symbol = NULL; |
|
2490 |
|
2491 { |
|
2492 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2493 symbol_c *IN_param_value = &this->default_variable_name; |
|
2494 |
|
2495 symbol_c *IN_type_symbol = param_data_type; |
|
2496 last_type_symbol = param_data_type; |
|
2497 |
|
2498 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2499 { |
|
2500 |
|
2501 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
2502 s4o.print("("); |
|
2503 return_type_symbol->accept(*this); |
|
2504 s4o.print(")"); |
|
2505 IN_param_value->accept(*this); |
|
2506 return NULL; |
|
2507 |
|
2508 } |
|
2509 |
|
2510 ERROR; |
|
2511 } |
|
2512 |
|
2513 }/*function_lint_to_bool*/ |
|
2514 break; |
|
2515 |
|
2516 /**** |
|
2517 *LINT_TO_SINT |
|
2518 */ |
|
2519 case function_lint_to_sint : |
|
2520 { |
|
2521 symbol_c *last_type_symbol = NULL; |
|
2522 |
|
2523 { |
|
2524 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2525 symbol_c *IN_param_value = &this->default_variable_name; |
|
2526 |
|
2527 symbol_c *IN_type_symbol = param_data_type; |
|
2528 last_type_symbol = param_data_type; |
|
2529 |
|
2530 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2531 { |
|
2532 |
|
2533 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
2534 s4o.print("("); |
|
2535 return_type_symbol->accept(*this); |
|
2536 s4o.print(")"); |
|
2537 IN_param_value->accept(*this); |
|
2538 return NULL; |
|
2539 |
|
2540 } |
|
2541 |
|
2542 ERROR; |
|
2543 } |
|
2544 |
|
2545 }/*function_lint_to_sint*/ |
|
2546 break; |
|
2547 |
|
2548 /**** |
|
2549 *LINT_TO_INT |
|
2550 */ |
|
2551 case function_lint_to_int : |
|
2552 { |
|
2553 symbol_c *last_type_symbol = NULL; |
|
2554 |
|
2555 { |
|
2556 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2557 symbol_c *IN_param_value = &this->default_variable_name; |
|
2558 |
|
2559 symbol_c *IN_type_symbol = param_data_type; |
|
2560 last_type_symbol = param_data_type; |
|
2561 |
|
2562 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2563 { |
|
2564 |
|
2565 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
2566 s4o.print("("); |
|
2567 return_type_symbol->accept(*this); |
|
2568 s4o.print(")"); |
|
2569 IN_param_value->accept(*this); |
|
2570 return NULL; |
|
2571 |
|
2572 } |
|
2573 |
|
2574 ERROR; |
|
2575 } |
|
2576 |
|
2577 }/*function_lint_to_int*/ |
|
2578 break; |
|
2579 |
|
2580 /**** |
|
2581 *LINT_TO_DINT |
|
2582 */ |
|
2583 case function_lint_to_dint : |
|
2584 { |
|
2585 symbol_c *last_type_symbol = NULL; |
|
2586 |
|
2587 { |
|
2588 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2589 symbol_c *IN_param_value = &this->default_variable_name; |
|
2590 |
|
2591 symbol_c *IN_type_symbol = param_data_type; |
|
2592 last_type_symbol = param_data_type; |
|
2593 |
|
2594 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2595 { |
|
2596 |
|
2597 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
2598 s4o.print("("); |
|
2599 return_type_symbol->accept(*this); |
|
2600 s4o.print(")"); |
|
2601 IN_param_value->accept(*this); |
|
2602 return NULL; |
|
2603 |
|
2604 } |
|
2605 |
|
2606 ERROR; |
|
2607 } |
|
2608 |
|
2609 }/*function_lint_to_dint*/ |
|
2610 break; |
|
2611 |
|
2612 /**** |
|
2613 *LINT_TO_USINT |
|
2614 */ |
|
2615 case function_lint_to_usint : |
|
2616 { |
|
2617 symbol_c *last_type_symbol = NULL; |
|
2618 |
|
2619 { |
|
2620 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2621 symbol_c *IN_param_value = &this->default_variable_name; |
|
2622 |
|
2623 symbol_c *IN_type_symbol = param_data_type; |
|
2624 last_type_symbol = param_data_type; |
|
2625 |
|
2626 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2627 { |
|
2628 |
|
2629 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
2630 s4o.print("("); |
|
2631 return_type_symbol->accept(*this); |
|
2632 s4o.print(")"); |
|
2633 IN_param_value->accept(*this); |
|
2634 return NULL; |
|
2635 |
|
2636 } |
|
2637 |
|
2638 ERROR; |
|
2639 } |
|
2640 |
|
2641 }/*function_lint_to_usint*/ |
|
2642 break; |
|
2643 |
|
2644 /**** |
|
2645 *LINT_TO_UINT |
|
2646 */ |
|
2647 case function_lint_to_uint : |
|
2648 { |
|
2649 symbol_c *last_type_symbol = NULL; |
|
2650 |
|
2651 { |
|
2652 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2653 symbol_c *IN_param_value = &this->default_variable_name; |
|
2654 |
|
2655 symbol_c *IN_type_symbol = param_data_type; |
|
2656 last_type_symbol = param_data_type; |
|
2657 |
|
2658 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2659 { |
|
2660 |
|
2661 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
2662 s4o.print("("); |
|
2663 return_type_symbol->accept(*this); |
|
2664 s4o.print(")"); |
|
2665 IN_param_value->accept(*this); |
|
2666 return NULL; |
|
2667 |
|
2668 } |
|
2669 |
|
2670 ERROR; |
|
2671 } |
|
2672 |
|
2673 }/*function_lint_to_uint*/ |
|
2674 break; |
|
2675 |
|
2676 /**** |
|
2677 *LINT_TO_UDINT |
|
2678 */ |
|
2679 case function_lint_to_udint : |
|
2680 { |
|
2681 symbol_c *last_type_symbol = NULL; |
|
2682 |
|
2683 { |
|
2684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2685 symbol_c *IN_param_value = &this->default_variable_name; |
|
2686 |
|
2687 symbol_c *IN_type_symbol = param_data_type; |
|
2688 last_type_symbol = param_data_type; |
|
2689 |
|
2690 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2691 { |
|
2692 |
|
2693 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
2694 s4o.print("("); |
|
2695 return_type_symbol->accept(*this); |
|
2696 s4o.print(")"); |
|
2697 IN_param_value->accept(*this); |
|
2698 return NULL; |
|
2699 |
|
2700 } |
|
2701 |
|
2702 ERROR; |
|
2703 } |
|
2704 |
|
2705 }/*function_lint_to_udint*/ |
|
2706 break; |
|
2707 |
|
2708 /**** |
|
2709 *LINT_TO_ULINT |
|
2710 */ |
|
2711 case function_lint_to_ulint : |
|
2712 { |
|
2713 symbol_c *last_type_symbol = NULL; |
|
2714 |
|
2715 { |
|
2716 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2717 symbol_c *IN_param_value = &this->default_variable_name; |
|
2718 |
|
2719 symbol_c *IN_type_symbol = param_data_type; |
|
2720 last_type_symbol = param_data_type; |
|
2721 |
|
2722 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2723 { |
|
2724 |
|
2725 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
2726 s4o.print("("); |
|
2727 return_type_symbol->accept(*this); |
|
2728 s4o.print(")"); |
|
2729 IN_param_value->accept(*this); |
|
2730 return NULL; |
|
2731 |
|
2732 } |
|
2733 |
|
2734 ERROR; |
|
2735 } |
|
2736 |
|
2737 }/*function_lint_to_ulint*/ |
|
2738 break; |
|
2739 |
|
2740 /**** |
|
2741 *LINT_TO_REAL |
|
2742 */ |
|
2743 case function_lint_to_real : |
|
2744 { |
|
2745 symbol_c *last_type_symbol = NULL; |
|
2746 |
|
2747 { |
|
2748 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2749 symbol_c *IN_param_value = &this->default_variable_name; |
|
2750 |
|
2751 symbol_c *IN_type_symbol = param_data_type; |
|
2752 last_type_symbol = param_data_type; |
|
2753 |
|
2754 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2755 { |
|
2756 |
|
2757 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
2758 s4o.print("("); |
|
2759 return_type_symbol->accept(*this); |
|
2760 s4o.print(")"); |
|
2761 IN_param_value->accept(*this); |
|
2762 return NULL; |
|
2763 |
|
2764 } |
|
2765 |
|
2766 ERROR; |
|
2767 } |
|
2768 |
|
2769 }/*function_lint_to_real*/ |
|
2770 break; |
|
2771 |
|
2772 /**** |
|
2773 *LINT_TO_LREAL |
|
2774 */ |
|
2775 case function_lint_to_lreal : |
|
2776 { |
|
2777 symbol_c *last_type_symbol = NULL; |
|
2778 |
|
2779 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2787 { |
|
2788 |
|
2789 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
2790 s4o.print("("); |
|
2791 return_type_symbol->accept(*this); |
|
2792 s4o.print(")"); |
|
2793 IN_param_value->accept(*this); |
|
2794 return NULL; |
|
2795 |
|
2796 } |
|
2797 |
|
2798 ERROR; |
|
2799 } |
|
2800 |
|
2801 }/*function_lint_to_lreal*/ |
|
2802 break; |
|
2803 |
|
2804 /**** |
|
2805 *LINT_TO_TIME |
|
2806 */ |
|
2807 case function_lint_to_time : |
|
2808 { |
|
2809 symbol_c *last_type_symbol = NULL; |
|
2810 |
|
2811 { |
|
2812 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2813 symbol_c *IN_param_value = &this->default_variable_name; |
|
2814 |
|
2815 symbol_c *IN_type_symbol = param_data_type; |
|
2816 last_type_symbol = param_data_type; |
|
2817 |
|
2818 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2819 { |
|
2820 |
|
2821 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
2822 s4o.print("("); |
|
2823 return_type_symbol->accept(*this); |
|
2824 s4o.print(")__int_to_time("); |
|
2825 IN_param_value->accept(*this); |
|
2826 s4o.print(")"); |
|
2827 return NULL; |
|
2828 |
|
2829 } |
|
2830 |
|
2831 ERROR; |
|
2832 } |
|
2833 |
|
2834 }/*function_lint_to_time*/ |
|
2835 break; |
|
2836 |
|
2837 /**** |
|
2838 *LINT_TO_DATE |
|
2839 */ |
|
2840 case function_lint_to_date : |
|
2841 { |
|
2842 symbol_c *last_type_symbol = NULL; |
|
2843 |
|
2844 { |
|
2845 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2846 symbol_c *IN_param_value = &this->default_variable_name; |
|
2847 |
|
2848 symbol_c *IN_type_symbol = param_data_type; |
|
2849 last_type_symbol = param_data_type; |
|
2850 |
|
2851 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2852 { |
|
2853 |
|
2854 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
2855 s4o.print("("); |
|
2856 return_type_symbol->accept(*this); |
|
2857 s4o.print(")__int_to_time("); |
|
2858 IN_param_value->accept(*this); |
|
2859 s4o.print(")"); |
|
2860 return NULL; |
|
2861 |
|
2862 } |
|
2863 |
|
2864 ERROR; |
|
2865 } |
|
2866 |
|
2867 }/*function_lint_to_date*/ |
|
2868 break; |
|
2869 |
|
2870 /**** |
|
2871 *LINT_TO_TOD |
|
2872 */ |
|
2873 case function_lint_to_tod : |
|
2874 { |
|
2875 symbol_c *last_type_symbol = NULL; |
|
2876 |
|
2877 { |
|
2878 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2879 symbol_c *IN_param_value = &this->default_variable_name; |
|
2880 |
|
2881 symbol_c *IN_type_symbol = param_data_type; |
|
2882 last_type_symbol = param_data_type; |
|
2883 |
|
2884 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2885 { |
|
2886 |
|
2887 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
2888 s4o.print("("); |
|
2889 return_type_symbol->accept(*this); |
|
2890 s4o.print(")__int_to_time("); |
|
2891 IN_param_value->accept(*this); |
|
2892 s4o.print(")"); |
|
2893 return NULL; |
|
2894 |
|
2895 } |
|
2896 |
|
2897 ERROR; |
|
2898 } |
|
2899 |
|
2900 }/*function_lint_to_tod*/ |
|
2901 break; |
|
2902 |
|
2903 /**** |
|
2904 *LINT_TO_DT |
|
2905 */ |
|
2906 case function_lint_to_dt : |
|
2907 { |
|
2908 symbol_c *last_type_symbol = NULL; |
|
2909 |
|
2910 { |
|
2911 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2912 symbol_c *IN_param_value = &this->default_variable_name; |
|
2913 |
|
2914 symbol_c *IN_type_symbol = param_data_type; |
|
2915 last_type_symbol = param_data_type; |
|
2916 |
|
2917 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2918 { |
|
2919 |
|
2920 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
2921 s4o.print("("); |
|
2922 return_type_symbol->accept(*this); |
|
2923 s4o.print(")__int_to_time("); |
|
2924 IN_param_value->accept(*this); |
|
2925 s4o.print(")"); |
|
2926 return NULL; |
|
2927 |
|
2928 } |
|
2929 |
|
2930 ERROR; |
|
2931 } |
|
2932 |
|
2933 }/*function_lint_to_dt*/ |
|
2934 break; |
|
2935 |
|
2936 /**** |
|
2937 *LINT_TO_STRING |
|
2938 */ |
|
2939 case function_lint_to_string : |
|
2940 { |
|
2941 symbol_c *last_type_symbol = NULL; |
|
2942 |
|
2943 { |
|
2944 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2945 symbol_c *IN_param_value = &this->default_variable_name; |
|
2946 |
|
2947 symbol_c *IN_type_symbol = param_data_type; |
|
2948 last_type_symbol = param_data_type; |
|
2949 |
|
2950 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2951 { |
|
2952 |
|
2953 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
2954 s4o.print("("); |
|
2955 return_type_symbol->accept(*this); |
|
2956 s4o.print(")__sint_to_string("); |
|
2957 IN_param_value->accept(*this); |
|
2958 s4o.print(")"); |
|
2959 return NULL; |
|
2960 |
|
2961 } |
|
2962 |
|
2963 ERROR; |
|
2964 } |
|
2965 |
|
2966 }/*function_lint_to_string*/ |
|
2967 break; |
|
2968 |
|
2969 /**** |
|
2970 *LINT_TO_BYTE |
|
2971 */ |
|
2972 case function_lint_to_byte : |
|
2973 { |
|
2974 symbol_c *last_type_symbol = NULL; |
|
2975 |
|
2976 { |
|
2977 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
2978 symbol_c *IN_param_value = &this->default_variable_name; |
|
2979 |
|
2980 symbol_c *IN_type_symbol = param_data_type; |
|
2981 last_type_symbol = param_data_type; |
|
2982 |
|
2983 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2984 { |
|
2985 |
|
2986 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
2987 s4o.print("("); |
|
2988 return_type_symbol->accept(*this); |
|
2989 s4o.print(")"); |
|
2990 IN_param_value->accept(*this); |
|
2991 return NULL; |
|
2992 |
|
2993 } |
|
2994 |
|
2995 ERROR; |
|
2996 } |
|
2997 |
|
2998 }/*function_lint_to_byte*/ |
|
2999 break; |
|
3000 |
|
3001 /**** |
|
3002 *LINT_TO_WORD |
|
3003 */ |
|
3004 case function_lint_to_word : |
|
3005 { |
|
3006 symbol_c *last_type_symbol = NULL; |
|
3007 |
|
3008 { |
|
3009 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3010 symbol_c *IN_param_value = &this->default_variable_name; |
|
3011 |
|
3012 symbol_c *IN_type_symbol = param_data_type; |
|
3013 last_type_symbol = param_data_type; |
|
3014 |
|
3015 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
3016 { |
|
3017 |
|
3018 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3019 s4o.print("("); |
|
3020 return_type_symbol->accept(*this); |
|
3021 s4o.print(")"); |
|
3022 IN_param_value->accept(*this); |
|
3023 return NULL; |
|
3024 |
|
3025 } |
|
3026 |
|
3027 ERROR; |
|
3028 } |
|
3029 |
|
3030 }/*function_lint_to_word*/ |
|
3031 break; |
|
3032 |
|
3033 /**** |
|
3034 *LINT_TO_DWORD |
|
3035 */ |
|
3036 case function_lint_to_dword : |
|
3037 { |
|
3038 symbol_c *last_type_symbol = NULL; |
|
3039 |
|
3040 { |
|
3041 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3042 symbol_c *IN_param_value = &this->default_variable_name; |
|
3043 |
|
3044 symbol_c *IN_type_symbol = param_data_type; |
|
3045 last_type_symbol = param_data_type; |
|
3046 |
|
3047 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
3048 { |
|
3049 |
|
3050 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
3051 s4o.print("("); |
|
3052 return_type_symbol->accept(*this); |
|
3053 s4o.print(")"); |
|
3054 IN_param_value->accept(*this); |
|
3055 return NULL; |
|
3056 |
|
3057 } |
|
3058 |
|
3059 ERROR; |
|
3060 } |
|
3061 |
|
3062 }/*function_lint_to_dword*/ |
|
3063 break; |
|
3064 |
|
3065 /**** |
|
3066 *LINT_TO_LWORD |
|
3067 */ |
|
3068 case function_lint_to_lword : |
|
3069 { |
|
3070 symbol_c *last_type_symbol = NULL; |
|
3071 |
|
3072 { |
|
3073 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3074 symbol_c *IN_param_value = &this->default_variable_name; |
|
3075 |
|
3076 symbol_c *IN_type_symbol = param_data_type; |
|
3077 last_type_symbol = param_data_type; |
|
3078 |
|
3079 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
3080 { |
|
3081 |
|
3082 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3083 s4o.print("("); |
|
3084 return_type_symbol->accept(*this); |
|
3085 s4o.print(")"); |
|
3086 IN_param_value->accept(*this); |
|
3087 return NULL; |
|
3088 |
|
3089 } |
|
3090 |
|
3091 ERROR; |
|
3092 } |
|
3093 |
|
3094 }/*function_lint_to_lword*/ |
|
3095 break; |
|
3096 |
|
3097 /**** |
|
3098 *USINT_TO_BOOL |
|
3099 */ |
|
3100 case function_usint_to_bool : |
|
3101 { |
|
3102 symbol_c *last_type_symbol = NULL; |
|
3103 |
|
3104 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3112 { |
|
3113 |
|
3114 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3115 s4o.print("("); |
|
3116 return_type_symbol->accept(*this); |
|
3117 s4o.print(")"); |
|
3118 IN_param_value->accept(*this); |
|
3119 return NULL; |
|
3120 |
|
3121 } |
|
3122 |
|
3123 ERROR; |
|
3124 } |
|
3125 |
|
3126 }/*function_usint_to_bool*/ |
|
3127 break; |
|
3128 |
|
3129 /**** |
|
3130 *USINT_TO_SINT |
|
3131 */ |
|
3132 case function_usint_to_sint : |
|
3133 { |
|
3134 symbol_c *last_type_symbol = NULL; |
|
3135 |
|
3136 { |
|
3137 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3138 symbol_c *IN_param_value = &this->default_variable_name; |
|
3139 |
|
3140 symbol_c *IN_type_symbol = param_data_type; |
|
3141 last_type_symbol = param_data_type; |
|
3142 |
|
3143 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3144 { |
|
3145 |
|
3146 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3147 s4o.print("("); |
|
3148 return_type_symbol->accept(*this); |
|
3149 s4o.print(")"); |
|
3150 IN_param_value->accept(*this); |
|
3151 return NULL; |
|
3152 |
|
3153 } |
|
3154 |
|
3155 ERROR; |
|
3156 } |
|
3157 |
|
3158 }/*function_usint_to_sint*/ |
|
3159 break; |
|
3160 |
|
3161 /**** |
|
3162 *USINT_TO_INT |
|
3163 */ |
|
3164 case function_usint_to_int : |
|
3165 { |
|
3166 symbol_c *last_type_symbol = NULL; |
|
3167 |
|
3168 { |
|
3169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3170 symbol_c *IN_param_value = &this->default_variable_name; |
|
3171 |
|
3172 symbol_c *IN_type_symbol = param_data_type; |
|
3173 last_type_symbol = param_data_type; |
|
3174 |
|
3175 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3176 { |
|
3177 |
|
3178 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3179 s4o.print("("); |
|
3180 return_type_symbol->accept(*this); |
|
3181 s4o.print(")"); |
|
3182 IN_param_value->accept(*this); |
|
3183 return NULL; |
|
3184 |
|
3185 } |
|
3186 |
|
3187 ERROR; |
|
3188 } |
|
3189 |
|
3190 }/*function_usint_to_int*/ |
|
3191 break; |
|
3192 |
|
3193 /**** |
|
3194 *USINT_TO_DINT |
|
3195 */ |
|
3196 case function_usint_to_dint : |
|
3197 { |
|
3198 symbol_c *last_type_symbol = NULL; |
|
3199 |
|
3200 { |
|
3201 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3202 symbol_c *IN_param_value = &this->default_variable_name; |
|
3203 |
|
3204 symbol_c *IN_type_symbol = param_data_type; |
|
3205 last_type_symbol = param_data_type; |
|
3206 |
|
3207 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3208 { |
|
3209 |
|
3210 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3211 s4o.print("("); |
|
3212 return_type_symbol->accept(*this); |
|
3213 s4o.print(")"); |
|
3214 IN_param_value->accept(*this); |
|
3215 return NULL; |
|
3216 |
|
3217 } |
|
3218 |
|
3219 ERROR; |
|
3220 } |
|
3221 |
|
3222 }/*function_usint_to_dint*/ |
|
3223 break; |
|
3224 |
|
3225 /**** |
|
3226 *USINT_TO_LINT |
|
3227 */ |
|
3228 case function_usint_to_lint : |
|
3229 { |
|
3230 symbol_c *last_type_symbol = NULL; |
|
3231 |
|
3232 { |
|
3233 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3234 symbol_c *IN_param_value = &this->default_variable_name; |
|
3235 |
|
3236 symbol_c *IN_type_symbol = param_data_type; |
|
3237 last_type_symbol = param_data_type; |
|
3238 |
|
3239 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3240 { |
|
3241 |
|
3242 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
3243 s4o.print("("); |
|
3244 return_type_symbol->accept(*this); |
|
3245 s4o.print(")"); |
|
3246 IN_param_value->accept(*this); |
|
3247 return NULL; |
|
3248 |
|
3249 } |
|
3250 |
|
3251 ERROR; |
|
3252 } |
|
3253 |
|
3254 }/*function_usint_to_lint*/ |
|
3255 break; |
|
3256 |
|
3257 /**** |
|
3258 *USINT_TO_UINT |
|
3259 */ |
|
3260 case function_usint_to_uint : |
|
3261 { |
|
3262 symbol_c *last_type_symbol = NULL; |
|
3263 |
|
3264 { |
|
3265 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3266 symbol_c *IN_param_value = &this->default_variable_name; |
|
3267 |
|
3268 symbol_c *IN_type_symbol = param_data_type; |
|
3269 last_type_symbol = param_data_type; |
|
3270 |
|
3271 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3272 { |
|
3273 |
|
3274 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
3275 s4o.print("("); |
|
3276 return_type_symbol->accept(*this); |
|
3277 s4o.print(")"); |
|
3278 IN_param_value->accept(*this); |
|
3279 return NULL; |
|
3280 |
|
3281 } |
|
3282 |
|
3283 ERROR; |
|
3284 } |
|
3285 |
|
3286 }/*function_usint_to_uint*/ |
|
3287 break; |
|
3288 |
|
3289 /**** |
|
3290 *USINT_TO_UDINT |
|
3291 */ |
|
3292 case function_usint_to_udint : |
|
3293 { |
|
3294 symbol_c *last_type_symbol = NULL; |
|
3295 |
|
3296 { |
|
3297 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3298 symbol_c *IN_param_value = &this->default_variable_name; |
|
3299 |
|
3300 symbol_c *IN_type_symbol = param_data_type; |
|
3301 last_type_symbol = param_data_type; |
|
3302 |
|
3303 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3304 { |
|
3305 |
|
3306 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3307 s4o.print("("); |
|
3308 return_type_symbol->accept(*this); |
|
3309 s4o.print(")"); |
|
3310 IN_param_value->accept(*this); |
|
3311 return NULL; |
|
3312 |
|
3313 } |
|
3314 |
|
3315 ERROR; |
|
3316 } |
|
3317 |
|
3318 }/*function_usint_to_udint*/ |
|
3319 break; |
|
3320 |
|
3321 /**** |
|
3322 *USINT_TO_ULINT |
|
3323 */ |
|
3324 case function_usint_to_ulint : |
|
3325 { |
|
3326 symbol_c *last_type_symbol = NULL; |
|
3327 |
|
3328 { |
|
3329 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3330 symbol_c *IN_param_value = &this->default_variable_name; |
|
3331 |
|
3332 symbol_c *IN_type_symbol = param_data_type; |
|
3333 last_type_symbol = param_data_type; |
|
3334 |
|
3335 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3336 { |
|
3337 |
|
3338 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3339 s4o.print("("); |
|
3340 return_type_symbol->accept(*this); |
|
3341 s4o.print(")"); |
|
3342 IN_param_value->accept(*this); |
|
3343 return NULL; |
|
3344 |
|
3345 } |
|
3346 |
|
3347 ERROR; |
|
3348 } |
|
3349 |
|
3350 }/*function_usint_to_ulint*/ |
|
3351 break; |
|
3352 |
|
3353 /**** |
|
3354 *USINT_TO_REAL |
|
3355 */ |
|
3356 case function_usint_to_real : |
|
3357 { |
|
3358 symbol_c *last_type_symbol = NULL; |
|
3359 |
|
3360 { |
|
3361 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3362 symbol_c *IN_param_value = &this->default_variable_name; |
|
3363 |
|
3364 symbol_c *IN_type_symbol = param_data_type; |
|
3365 last_type_symbol = param_data_type; |
|
3366 |
|
3367 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3368 { |
|
3369 |
|
3370 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3371 s4o.print("("); |
|
3372 return_type_symbol->accept(*this); |
|
3373 s4o.print(")"); |
|
3374 IN_param_value->accept(*this); |
|
3375 return NULL; |
|
3376 |
|
3377 } |
|
3378 |
|
3379 ERROR; |
|
3380 } |
|
3381 |
|
3382 }/*function_usint_to_real*/ |
|
3383 break; |
|
3384 |
|
3385 /**** |
|
3386 *USINT_TO_LREAL |
|
3387 */ |
|
3388 case function_usint_to_lreal : |
|
3389 { |
|
3390 symbol_c *last_type_symbol = NULL; |
|
3391 |
|
3392 { |
|
3393 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3394 symbol_c *IN_param_value = &this->default_variable_name; |
|
3395 |
|
3396 symbol_c *IN_type_symbol = param_data_type; |
|
3397 last_type_symbol = param_data_type; |
|
3398 |
|
3399 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3400 { |
|
3401 |
|
3402 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
3403 s4o.print("("); |
|
3404 return_type_symbol->accept(*this); |
|
3405 s4o.print(")"); |
|
3406 IN_param_value->accept(*this); |
|
3407 return NULL; |
|
3408 |
|
3409 } |
|
3410 |
|
3411 ERROR; |
|
3412 } |
|
3413 |
|
3414 }/*function_usint_to_lreal*/ |
|
3415 break; |
|
3416 |
|
3417 /**** |
|
3418 *USINT_TO_TIME |
|
3419 */ |
|
3420 case function_usint_to_time : |
|
3421 { |
|
3422 symbol_c *last_type_symbol = NULL; |
|
3423 |
|
3424 { |
|
3425 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3426 symbol_c *IN_param_value = &this->default_variable_name; |
|
3427 |
|
3428 symbol_c *IN_type_symbol = param_data_type; |
|
3429 last_type_symbol = param_data_type; |
|
3430 |
|
3431 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3432 { |
|
3433 |
|
3434 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
3435 s4o.print("("); |
|
3436 return_type_symbol->accept(*this); |
|
3437 s4o.print(")__int_to_time("); |
|
3438 IN_param_value->accept(*this); |
|
3439 s4o.print(")"); |
|
3440 return NULL; |
|
3441 |
|
3442 } |
|
3443 |
|
3444 ERROR; |
|
3445 } |
|
3446 |
|
3447 }/*function_usint_to_time*/ |
|
3448 break; |
|
3449 |
|
3450 /**** |
|
3451 *USINT_TO_DATE |
|
3452 */ |
|
3453 case function_usint_to_date : |
|
3454 { |
|
3455 symbol_c *last_type_symbol = NULL; |
|
3456 |
|
3457 { |
|
3458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3459 symbol_c *IN_param_value = &this->default_variable_name; |
|
3460 |
|
3461 symbol_c *IN_type_symbol = param_data_type; |
|
3462 last_type_symbol = param_data_type; |
|
3463 |
|
3464 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3465 { |
|
3466 |
|
3467 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
3468 s4o.print("("); |
|
3469 return_type_symbol->accept(*this); |
|
3470 s4o.print(")__int_to_time("); |
|
3471 IN_param_value->accept(*this); |
|
3472 s4o.print(")"); |
|
3473 return NULL; |
|
3474 |
|
3475 } |
|
3476 |
|
3477 ERROR; |
|
3478 } |
|
3479 |
|
3480 }/*function_usint_to_date*/ |
|
3481 break; |
|
3482 |
|
3483 /**** |
|
3484 *USINT_TO_TOD |
|
3485 */ |
|
3486 case function_usint_to_tod : |
|
3487 { |
|
3488 symbol_c *last_type_symbol = NULL; |
|
3489 |
|
3490 { |
|
3491 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3492 symbol_c *IN_param_value = &this->default_variable_name; |
|
3493 |
|
3494 symbol_c *IN_type_symbol = param_data_type; |
|
3495 last_type_symbol = param_data_type; |
|
3496 |
|
3497 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3498 { |
|
3499 |
|
3500 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
3501 s4o.print("("); |
|
3502 return_type_symbol->accept(*this); |
|
3503 s4o.print(")__int_to_time("); |
|
3504 IN_param_value->accept(*this); |
|
3505 s4o.print(")"); |
|
3506 return NULL; |
|
3507 |
|
3508 } |
|
3509 |
|
3510 ERROR; |
|
3511 } |
|
3512 |
|
3513 }/*function_usint_to_tod*/ |
|
3514 break; |
|
3515 |
|
3516 /**** |
|
3517 *USINT_TO_DT |
|
3518 */ |
|
3519 case function_usint_to_dt : |
|
3520 { |
|
3521 symbol_c *last_type_symbol = NULL; |
|
3522 |
|
3523 { |
|
3524 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3525 symbol_c *IN_param_value = &this->default_variable_name; |
|
3526 |
|
3527 symbol_c *IN_type_symbol = param_data_type; |
|
3528 last_type_symbol = param_data_type; |
|
3529 |
|
3530 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3531 { |
|
3532 |
|
3533 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
3534 s4o.print("("); |
|
3535 return_type_symbol->accept(*this); |
|
3536 s4o.print(")__int_to_time("); |
|
3537 IN_param_value->accept(*this); |
|
3538 s4o.print(")"); |
|
3539 return NULL; |
|
3540 |
|
3541 } |
|
3542 |
|
3543 ERROR; |
|
3544 } |
|
3545 |
|
3546 }/*function_usint_to_dt*/ |
|
3547 break; |
|
3548 |
|
3549 /**** |
|
3550 *USINT_TO_STRING |
|
3551 */ |
|
3552 case function_usint_to_string : |
|
3553 { |
|
3554 symbol_c *last_type_symbol = NULL; |
|
3555 |
|
3556 { |
|
3557 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3558 symbol_c *IN_param_value = &this->default_variable_name; |
|
3559 |
|
3560 symbol_c *IN_type_symbol = param_data_type; |
|
3561 last_type_symbol = param_data_type; |
|
3562 |
|
3563 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3564 { |
|
3565 |
|
3566 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
3567 s4o.print("("); |
|
3568 return_type_symbol->accept(*this); |
|
3569 s4o.print(")__uint_to_string("); |
|
3570 IN_param_value->accept(*this); |
|
3571 s4o.print(")"); |
|
3572 return NULL; |
|
3573 |
|
3574 } |
|
3575 |
|
3576 ERROR; |
|
3577 } |
|
3578 |
|
3579 }/*function_usint_to_string*/ |
|
3580 break; |
|
3581 |
|
3582 /**** |
|
3583 *USINT_TO_BYTE |
|
3584 */ |
|
3585 case function_usint_to_byte : |
|
3586 { |
|
3587 symbol_c *last_type_symbol = NULL; |
|
3588 |
|
3589 { |
|
3590 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3591 symbol_c *IN_param_value = &this->default_variable_name; |
|
3592 |
|
3593 symbol_c *IN_type_symbol = param_data_type; |
|
3594 last_type_symbol = param_data_type; |
|
3595 |
|
3596 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3597 { |
|
3598 |
|
3599 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
3600 s4o.print("("); |
|
3601 return_type_symbol->accept(*this); |
|
3602 s4o.print(")"); |
|
3603 IN_param_value->accept(*this); |
|
3604 return NULL; |
|
3605 |
|
3606 } |
|
3607 |
|
3608 ERROR; |
|
3609 } |
|
3610 |
|
3611 }/*function_usint_to_byte*/ |
|
3612 break; |
|
3613 |
|
3614 /**** |
|
3615 *USINT_TO_WORD |
|
3616 */ |
|
3617 case function_usint_to_word : |
|
3618 { |
|
3619 symbol_c *last_type_symbol = NULL; |
|
3620 |
|
3621 { |
|
3622 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3623 symbol_c *IN_param_value = &this->default_variable_name; |
|
3624 |
|
3625 symbol_c *IN_type_symbol = param_data_type; |
|
3626 last_type_symbol = param_data_type; |
|
3627 |
|
3628 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3629 { |
|
3630 |
|
3631 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
3632 s4o.print("("); |
|
3633 return_type_symbol->accept(*this); |
|
3634 s4o.print(")"); |
|
3635 IN_param_value->accept(*this); |
|
3636 return NULL; |
|
3637 |
|
3638 } |
|
3639 |
|
3640 ERROR; |
|
3641 } |
|
3642 |
|
3643 }/*function_usint_to_word*/ |
|
3644 break; |
|
3645 |
|
3646 /**** |
|
3647 *USINT_TO_DWORD |
|
3648 */ |
|
3649 case function_usint_to_dword : |
|
3650 { |
|
3651 symbol_c *last_type_symbol = NULL; |
|
3652 |
|
3653 { |
|
3654 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3655 symbol_c *IN_param_value = &this->default_variable_name; |
|
3656 |
|
3657 symbol_c *IN_type_symbol = param_data_type; |
|
3658 last_type_symbol = param_data_type; |
|
3659 |
|
3660 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3661 { |
|
3662 |
|
3663 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
3664 s4o.print("("); |
|
3665 return_type_symbol->accept(*this); |
|
3666 s4o.print(")"); |
|
3667 IN_param_value->accept(*this); |
|
3668 return NULL; |
|
3669 |
|
3670 } |
|
3671 |
|
3672 ERROR; |
|
3673 } |
|
3674 |
|
3675 }/*function_usint_to_dword*/ |
|
3676 break; |
|
3677 |
|
3678 /**** |
|
3679 *USINT_TO_LWORD |
|
3680 */ |
|
3681 case function_usint_to_lword : |
|
3682 { |
|
3683 symbol_c *last_type_symbol = NULL; |
|
3684 |
|
3685 { |
|
3686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3687 symbol_c *IN_param_value = &this->default_variable_name; |
|
3688 |
|
3689 symbol_c *IN_type_symbol = param_data_type; |
|
3690 last_type_symbol = param_data_type; |
|
3691 |
|
3692 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
3693 { |
|
3694 |
|
3695 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
3696 s4o.print("("); |
|
3697 return_type_symbol->accept(*this); |
|
3698 s4o.print(")"); |
|
3699 IN_param_value->accept(*this); |
|
3700 return NULL; |
|
3701 |
|
3702 } |
|
3703 |
|
3704 ERROR; |
|
3705 } |
|
3706 |
|
3707 }/*function_usint_to_lword*/ |
|
3708 break; |
|
3709 |
|
3710 /**** |
|
3711 *UINT_TO_BOOL |
|
3712 */ |
|
3713 case function_uint_to_bool : |
|
3714 { |
|
3715 symbol_c *last_type_symbol = NULL; |
|
3716 |
|
3717 { |
|
3718 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3719 symbol_c *IN_param_value = &this->default_variable_name; |
|
3720 |
|
3721 symbol_c *IN_type_symbol = param_data_type; |
|
3722 last_type_symbol = param_data_type; |
|
3723 |
|
3724 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3725 { |
|
3726 |
|
3727 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
3728 s4o.print("("); |
|
3729 return_type_symbol->accept(*this); |
|
3730 s4o.print(")"); |
|
3731 IN_param_value->accept(*this); |
|
3732 return NULL; |
|
3733 |
|
3734 } |
|
3735 |
|
3736 ERROR; |
|
3737 } |
|
3738 |
|
3739 }/*function_uint_to_bool*/ |
|
3740 break; |
|
3741 |
|
3742 /**** |
|
3743 *UINT_TO_SINT |
|
3744 */ |
|
3745 case function_uint_to_sint : |
|
3746 { |
|
3747 symbol_c *last_type_symbol = NULL; |
|
3748 |
|
3749 { |
|
3750 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3751 symbol_c *IN_param_value = &this->default_variable_name; |
|
3752 |
|
3753 symbol_c *IN_type_symbol = param_data_type; |
|
3754 last_type_symbol = param_data_type; |
|
3755 |
|
3756 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3757 { |
|
3758 |
|
3759 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
3760 s4o.print("("); |
|
3761 return_type_symbol->accept(*this); |
|
3762 s4o.print(")"); |
|
3763 IN_param_value->accept(*this); |
|
3764 return NULL; |
|
3765 |
|
3766 } |
|
3767 |
|
3768 ERROR; |
|
3769 } |
|
3770 |
|
3771 }/*function_uint_to_sint*/ |
|
3772 break; |
|
3773 |
|
3774 /**** |
|
3775 *UINT_TO_INT |
|
3776 */ |
|
3777 case function_uint_to_int : |
|
3778 { |
|
3779 symbol_c *last_type_symbol = NULL; |
|
3780 |
|
3781 { |
|
3782 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3783 symbol_c *IN_param_value = &this->default_variable_name; |
|
3784 |
|
3785 symbol_c *IN_type_symbol = param_data_type; |
|
3786 last_type_symbol = param_data_type; |
|
3787 |
|
3788 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3789 { |
|
3790 |
|
3791 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
3792 s4o.print("("); |
|
3793 return_type_symbol->accept(*this); |
|
3794 s4o.print(")"); |
|
3795 IN_param_value->accept(*this); |
|
3796 return NULL; |
|
3797 |
|
3798 } |
|
3799 |
|
3800 ERROR; |
|
3801 } |
|
3802 |
|
3803 }/*function_uint_to_int*/ |
|
3804 break; |
|
3805 |
|
3806 /**** |
|
3807 *UINT_TO_DINT |
|
3808 */ |
|
3809 case function_uint_to_dint : |
|
3810 { |
|
3811 symbol_c *last_type_symbol = NULL; |
|
3812 |
|
3813 { |
|
3814 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3815 symbol_c *IN_param_value = &this->default_variable_name; |
|
3816 |
|
3817 symbol_c *IN_type_symbol = param_data_type; |
|
3818 last_type_symbol = param_data_type; |
|
3819 |
|
3820 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3821 { |
|
3822 |
|
3823 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
3824 s4o.print("("); |
|
3825 return_type_symbol->accept(*this); |
|
3826 s4o.print(")"); |
|
3827 IN_param_value->accept(*this); |
|
3828 return NULL; |
|
3829 |
|
3830 } |
|
3831 |
|
3832 ERROR; |
|
3833 } |
|
3834 |
|
3835 }/*function_uint_to_dint*/ |
|
3836 break; |
|
3837 |
|
3838 /**** |
|
3839 *UINT_TO_LINT |
|
3840 */ |
|
3841 case function_uint_to_lint : |
|
3842 { |
|
3843 symbol_c *last_type_symbol = NULL; |
|
3844 |
|
3845 { |
|
3846 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3847 symbol_c *IN_param_value = &this->default_variable_name; |
|
3848 |
|
3849 symbol_c *IN_type_symbol = param_data_type; |
|
3850 last_type_symbol = param_data_type; |
|
3851 |
|
3852 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3853 { |
|
3854 |
|
3855 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
3856 s4o.print("("); |
|
3857 return_type_symbol->accept(*this); |
|
3858 s4o.print(")"); |
|
3859 IN_param_value->accept(*this); |
|
3860 return NULL; |
|
3861 |
|
3862 } |
|
3863 |
|
3864 ERROR; |
|
3865 } |
|
3866 |
|
3867 }/*function_uint_to_lint*/ |
|
3868 break; |
|
3869 |
|
3870 /**** |
|
3871 *UINT_TO_USINT |
|
3872 */ |
|
3873 case function_uint_to_usint : |
|
3874 { |
|
3875 symbol_c *last_type_symbol = NULL; |
|
3876 |
|
3877 { |
|
3878 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3879 symbol_c *IN_param_value = &this->default_variable_name; |
|
3880 |
|
3881 symbol_c *IN_type_symbol = param_data_type; |
|
3882 last_type_symbol = param_data_type; |
|
3883 |
|
3884 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3885 { |
|
3886 |
|
3887 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
3888 s4o.print("("); |
|
3889 return_type_symbol->accept(*this); |
|
3890 s4o.print(")"); |
|
3891 IN_param_value->accept(*this); |
|
3892 return NULL; |
|
3893 |
|
3894 } |
|
3895 |
|
3896 ERROR; |
|
3897 } |
|
3898 |
|
3899 }/*function_uint_to_usint*/ |
|
3900 break; |
|
3901 |
|
3902 /**** |
|
3903 *UINT_TO_UDINT |
|
3904 */ |
|
3905 case function_uint_to_udint : |
|
3906 { |
|
3907 symbol_c *last_type_symbol = NULL; |
|
3908 |
|
3909 { |
|
3910 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3911 symbol_c *IN_param_value = &this->default_variable_name; |
|
3912 |
|
3913 symbol_c *IN_type_symbol = param_data_type; |
|
3914 last_type_symbol = param_data_type; |
|
3915 |
|
3916 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3917 { |
|
3918 |
|
3919 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
3920 s4o.print("("); |
|
3921 return_type_symbol->accept(*this); |
|
3922 s4o.print(")"); |
|
3923 IN_param_value->accept(*this); |
|
3924 return NULL; |
|
3925 |
|
3926 } |
|
3927 |
|
3928 ERROR; |
|
3929 } |
|
3930 |
|
3931 }/*function_uint_to_udint*/ |
|
3932 break; |
|
3933 |
|
3934 /**** |
|
3935 *UINT_TO_ULINT |
|
3936 */ |
|
3937 case function_uint_to_ulint : |
|
3938 { |
|
3939 symbol_c *last_type_symbol = NULL; |
|
3940 |
|
3941 { |
|
3942 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3943 symbol_c *IN_param_value = &this->default_variable_name; |
|
3944 |
|
3945 symbol_c *IN_type_symbol = param_data_type; |
|
3946 last_type_symbol = param_data_type; |
|
3947 |
|
3948 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3949 { |
|
3950 |
|
3951 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
3952 s4o.print("("); |
|
3953 return_type_symbol->accept(*this); |
|
3954 s4o.print(")"); |
|
3955 IN_param_value->accept(*this); |
|
3956 return NULL; |
|
3957 |
|
3958 } |
|
3959 |
|
3960 ERROR; |
|
3961 } |
|
3962 |
|
3963 }/*function_uint_to_ulint*/ |
|
3964 break; |
|
3965 |
|
3966 /**** |
|
3967 *UINT_TO_REAL |
|
3968 */ |
|
3969 case function_uint_to_real : |
|
3970 { |
|
3971 symbol_c *last_type_symbol = NULL; |
|
3972 |
|
3973 { |
|
3974 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
3975 symbol_c *IN_param_value = &this->default_variable_name; |
|
3976 |
|
3977 symbol_c *IN_type_symbol = param_data_type; |
|
3978 last_type_symbol = param_data_type; |
|
3979 |
|
3980 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
3981 { |
|
3982 |
|
3983 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
3984 s4o.print("("); |
|
3985 return_type_symbol->accept(*this); |
|
3986 s4o.print(")"); |
|
3987 IN_param_value->accept(*this); |
|
3988 return NULL; |
|
3989 |
|
3990 } |
|
3991 |
|
3992 ERROR; |
|
3993 } |
|
3994 |
|
3995 }/*function_uint_to_real*/ |
|
3996 break; |
|
3997 |
|
3998 /**** |
|
3999 *UINT_TO_LREAL |
|
4000 */ |
|
4001 case function_uint_to_lreal : |
|
4002 { |
|
4003 symbol_c *last_type_symbol = NULL; |
|
4004 |
|
4005 { |
|
4006 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4007 symbol_c *IN_param_value = &this->default_variable_name; |
|
4008 |
|
4009 symbol_c *IN_type_symbol = param_data_type; |
|
4010 last_type_symbol = param_data_type; |
|
4011 |
|
4012 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4013 { |
|
4014 |
|
4015 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4016 s4o.print("("); |
|
4017 return_type_symbol->accept(*this); |
|
4018 s4o.print(")"); |
|
4019 IN_param_value->accept(*this); |
|
4020 return NULL; |
|
4021 |
|
4022 } |
|
4023 |
|
4024 ERROR; |
|
4025 } |
|
4026 |
|
4027 }/*function_uint_to_lreal*/ |
|
4028 break; |
|
4029 |
|
4030 /**** |
|
4031 *UINT_TO_TIME |
|
4032 */ |
|
4033 case function_uint_to_time : |
|
4034 { |
|
4035 symbol_c *last_type_symbol = NULL; |
|
4036 |
|
4037 { |
|
4038 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4039 symbol_c *IN_param_value = &this->default_variable_name; |
|
4040 |
|
4041 symbol_c *IN_type_symbol = param_data_type; |
|
4042 last_type_symbol = param_data_type; |
|
4043 |
|
4044 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4045 { |
|
4046 |
|
4047 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
4048 s4o.print("("); |
|
4049 return_type_symbol->accept(*this); |
|
4050 s4o.print(")__int_to_time("); |
|
4051 IN_param_value->accept(*this); |
|
4052 s4o.print(")"); |
|
4053 return NULL; |
|
4054 |
|
4055 } |
|
4056 |
|
4057 ERROR; |
|
4058 } |
|
4059 |
|
4060 }/*function_uint_to_time*/ |
|
4061 break; |
|
4062 |
|
4063 /**** |
|
4064 *UINT_TO_DATE |
|
4065 */ |
|
4066 case function_uint_to_date : |
|
4067 { |
|
4068 symbol_c *last_type_symbol = NULL; |
|
4069 |
|
4070 { |
|
4071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4072 symbol_c *IN_param_value = &this->default_variable_name; |
|
4073 |
|
4074 symbol_c *IN_type_symbol = param_data_type; |
|
4075 last_type_symbol = param_data_type; |
|
4076 |
|
4077 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4078 { |
|
4079 |
|
4080 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
4081 s4o.print("("); |
|
4082 return_type_symbol->accept(*this); |
|
4083 s4o.print(")__int_to_time("); |
|
4084 IN_param_value->accept(*this); |
|
4085 s4o.print(")"); |
|
4086 return NULL; |
|
4087 |
|
4088 } |
|
4089 |
|
4090 ERROR; |
|
4091 } |
|
4092 |
|
4093 }/*function_uint_to_date*/ |
|
4094 break; |
|
4095 |
|
4096 /**** |
|
4097 *UINT_TO_TOD |
|
4098 */ |
|
4099 case function_uint_to_tod : |
|
4100 { |
|
4101 symbol_c *last_type_symbol = NULL; |
|
4102 |
|
4103 { |
|
4104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4105 symbol_c *IN_param_value = &this->default_variable_name; |
|
4106 |
|
4107 symbol_c *IN_type_symbol = param_data_type; |
|
4108 last_type_symbol = param_data_type; |
|
4109 |
|
4110 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4111 { |
|
4112 |
|
4113 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
4114 s4o.print("("); |
|
4115 return_type_symbol->accept(*this); |
|
4116 s4o.print(")__int_to_time("); |
|
4117 IN_param_value->accept(*this); |
|
4118 s4o.print(")"); |
|
4119 return NULL; |
|
4120 |
|
4121 } |
|
4122 |
|
4123 ERROR; |
|
4124 } |
|
4125 |
|
4126 }/*function_uint_to_tod*/ |
|
4127 break; |
|
4128 |
|
4129 /**** |
|
4130 *UINT_TO_DT |
|
4131 */ |
|
4132 case function_uint_to_dt : |
|
4133 { |
|
4134 symbol_c *last_type_symbol = NULL; |
|
4135 |
|
4136 { |
|
4137 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4138 symbol_c *IN_param_value = &this->default_variable_name; |
|
4139 |
|
4140 symbol_c *IN_type_symbol = param_data_type; |
|
4141 last_type_symbol = param_data_type; |
|
4142 |
|
4143 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4144 { |
|
4145 |
|
4146 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
4147 s4o.print("("); |
|
4148 return_type_symbol->accept(*this); |
|
4149 s4o.print(")__int_to_time("); |
|
4150 IN_param_value->accept(*this); |
|
4151 s4o.print(")"); |
|
4152 return NULL; |
|
4153 |
|
4154 } |
|
4155 |
|
4156 ERROR; |
|
4157 } |
|
4158 |
|
4159 }/*function_uint_to_dt*/ |
|
4160 break; |
|
4161 |
|
4162 /**** |
|
4163 *UINT_TO_STRING |
|
4164 */ |
|
4165 case function_uint_to_string : |
|
4166 { |
|
4167 symbol_c *last_type_symbol = NULL; |
|
4168 |
|
4169 { |
|
4170 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4171 symbol_c *IN_param_value = &this->default_variable_name; |
|
4172 |
|
4173 symbol_c *IN_type_symbol = param_data_type; |
|
4174 last_type_symbol = param_data_type; |
|
4175 |
|
4176 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4177 { |
|
4178 |
|
4179 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4180 s4o.print("("); |
|
4181 return_type_symbol->accept(*this); |
|
4182 s4o.print(")__uint_to_string("); |
|
4183 IN_param_value->accept(*this); |
|
4184 s4o.print(")"); |
|
4185 return NULL; |
|
4186 |
|
4187 } |
|
4188 |
|
4189 ERROR; |
|
4190 } |
|
4191 |
|
4192 }/*function_uint_to_string*/ |
|
4193 break; |
|
4194 |
|
4195 /**** |
|
4196 *UINT_TO_BYTE |
|
4197 */ |
|
4198 case function_uint_to_byte : |
|
4199 { |
|
4200 symbol_c *last_type_symbol = NULL; |
|
4201 |
|
4202 { |
|
4203 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4204 symbol_c *IN_param_value = &this->default_variable_name; |
|
4205 |
|
4206 symbol_c *IN_type_symbol = param_data_type; |
|
4207 last_type_symbol = param_data_type; |
|
4208 |
|
4209 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4210 { |
|
4211 |
|
4212 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4213 s4o.print("("); |
|
4214 return_type_symbol->accept(*this); |
|
4215 s4o.print(")"); |
|
4216 IN_param_value->accept(*this); |
|
4217 return NULL; |
|
4218 |
|
4219 } |
|
4220 |
|
4221 ERROR; |
|
4222 } |
|
4223 |
|
4224 }/*function_uint_to_byte*/ |
|
4225 break; |
|
4226 |
|
4227 /**** |
|
4228 *UINT_TO_WORD |
|
4229 */ |
|
4230 case function_uint_to_word : |
|
4231 { |
|
4232 symbol_c *last_type_symbol = NULL; |
|
4233 |
|
4234 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4242 { |
|
4243 |
|
4244 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4245 s4o.print("("); |
|
4246 return_type_symbol->accept(*this); |
|
4247 s4o.print(")"); |
|
4248 IN_param_value->accept(*this); |
|
4249 return NULL; |
|
4250 |
|
4251 } |
|
4252 |
|
4253 ERROR; |
|
4254 } |
|
4255 |
|
4256 }/*function_uint_to_word*/ |
|
4257 break; |
|
4258 |
|
4259 /**** |
|
4260 *UINT_TO_DWORD |
|
4261 */ |
|
4262 case function_uint_to_dword : |
|
4263 { |
|
4264 symbol_c *last_type_symbol = NULL; |
|
4265 |
|
4266 { |
|
4267 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4268 symbol_c *IN_param_value = &this->default_variable_name; |
|
4269 |
|
4270 symbol_c *IN_type_symbol = param_data_type; |
|
4271 last_type_symbol = param_data_type; |
|
4272 |
|
4273 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4274 { |
|
4275 |
|
4276 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4277 s4o.print("("); |
|
4278 return_type_symbol->accept(*this); |
|
4279 s4o.print(")"); |
|
4280 IN_param_value->accept(*this); |
|
4281 return NULL; |
|
4282 |
|
4283 } |
|
4284 |
|
4285 ERROR; |
|
4286 } |
|
4287 |
|
4288 }/*function_uint_to_dword*/ |
|
4289 break; |
|
4290 |
|
4291 /**** |
|
4292 *UINT_TO_LWORD |
|
4293 */ |
|
4294 case function_uint_to_lword : |
|
4295 { |
|
4296 symbol_c *last_type_symbol = NULL; |
|
4297 |
|
4298 { |
|
4299 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4300 symbol_c *IN_param_value = &this->default_variable_name; |
|
4301 |
|
4302 symbol_c *IN_type_symbol = param_data_type; |
|
4303 last_type_symbol = param_data_type; |
|
4304 |
|
4305 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
4306 { |
|
4307 |
|
4308 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4309 s4o.print("("); |
|
4310 return_type_symbol->accept(*this); |
|
4311 s4o.print(")"); |
|
4312 IN_param_value->accept(*this); |
|
4313 return NULL; |
|
4314 |
|
4315 } |
|
4316 |
|
4317 ERROR; |
|
4318 } |
|
4319 |
|
4320 }/*function_uint_to_lword*/ |
|
4321 break; |
|
4322 |
|
4323 /**** |
|
4324 *UDINT_TO_BOOL |
|
4325 */ |
|
4326 case function_udint_to_bool : |
|
4327 { |
|
4328 symbol_c *last_type_symbol = NULL; |
|
4329 |
|
4330 { |
|
4331 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4332 symbol_c *IN_param_value = &this->default_variable_name; |
|
4333 |
|
4334 symbol_c *IN_type_symbol = param_data_type; |
|
4335 last_type_symbol = param_data_type; |
|
4336 |
|
4337 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4338 { |
|
4339 |
|
4340 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
4341 s4o.print("("); |
|
4342 return_type_symbol->accept(*this); |
|
4343 s4o.print(")"); |
|
4344 IN_param_value->accept(*this); |
|
4345 return NULL; |
|
4346 |
|
4347 } |
|
4348 |
|
4349 ERROR; |
|
4350 } |
|
4351 |
|
4352 }/*function_udint_to_bool*/ |
|
4353 break; |
|
4354 |
|
4355 /**** |
|
4356 *UDINT_TO_SINT |
|
4357 */ |
|
4358 case function_udint_to_sint : |
|
4359 { |
|
4360 symbol_c *last_type_symbol = NULL; |
|
4361 |
|
4362 { |
|
4363 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4364 symbol_c *IN_param_value = &this->default_variable_name; |
|
4365 |
|
4366 symbol_c *IN_type_symbol = param_data_type; |
|
4367 last_type_symbol = param_data_type; |
|
4368 |
|
4369 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4370 { |
|
4371 |
|
4372 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4373 s4o.print("("); |
|
4374 return_type_symbol->accept(*this); |
|
4375 s4o.print(")"); |
|
4376 IN_param_value->accept(*this); |
|
4377 return NULL; |
|
4378 |
|
4379 } |
|
4380 |
|
4381 ERROR; |
|
4382 } |
|
4383 |
|
4384 }/*function_udint_to_sint*/ |
|
4385 break; |
|
4386 |
|
4387 /**** |
|
4388 *UDINT_TO_INT |
|
4389 */ |
|
4390 case function_udint_to_int : |
|
4391 { |
|
4392 symbol_c *last_type_symbol = NULL; |
|
4393 |
|
4394 { |
|
4395 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4396 symbol_c *IN_param_value = &this->default_variable_name; |
|
4397 |
|
4398 symbol_c *IN_type_symbol = param_data_type; |
|
4399 last_type_symbol = param_data_type; |
|
4400 |
|
4401 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4402 { |
|
4403 |
|
4404 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
4405 s4o.print("("); |
|
4406 return_type_symbol->accept(*this); |
|
4407 s4o.print(")"); |
|
4408 IN_param_value->accept(*this); |
|
4409 return NULL; |
|
4410 |
|
4411 } |
|
4412 |
|
4413 ERROR; |
|
4414 } |
|
4415 |
|
4416 }/*function_udint_to_int*/ |
|
4417 break; |
|
4418 |
|
4419 /**** |
|
4420 *UDINT_TO_DINT |
|
4421 */ |
|
4422 case function_udint_to_dint : |
|
4423 { |
|
4424 symbol_c *last_type_symbol = NULL; |
|
4425 |
|
4426 { |
|
4427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4428 symbol_c *IN_param_value = &this->default_variable_name; |
|
4429 |
|
4430 symbol_c *IN_type_symbol = param_data_type; |
|
4431 last_type_symbol = param_data_type; |
|
4432 |
|
4433 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4434 { |
|
4435 |
|
4436 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
4437 s4o.print("("); |
|
4438 return_type_symbol->accept(*this); |
|
4439 s4o.print(")"); |
|
4440 IN_param_value->accept(*this); |
|
4441 return NULL; |
|
4442 |
|
4443 } |
|
4444 |
|
4445 ERROR; |
|
4446 } |
|
4447 |
|
4448 }/*function_udint_to_dint*/ |
|
4449 break; |
|
4450 |
|
4451 /**** |
|
4452 *UDINT_TO_LINT |
|
4453 */ |
|
4454 case function_udint_to_lint : |
|
4455 { |
|
4456 symbol_c *last_type_symbol = NULL; |
|
4457 |
|
4458 { |
|
4459 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4460 symbol_c *IN_param_value = &this->default_variable_name; |
|
4461 |
|
4462 symbol_c *IN_type_symbol = param_data_type; |
|
4463 last_type_symbol = param_data_type; |
|
4464 |
|
4465 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4466 { |
|
4467 |
|
4468 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
4469 s4o.print("("); |
|
4470 return_type_symbol->accept(*this); |
|
4471 s4o.print(")"); |
|
4472 IN_param_value->accept(*this); |
|
4473 return NULL; |
|
4474 |
|
4475 } |
|
4476 |
|
4477 ERROR; |
|
4478 } |
|
4479 |
|
4480 }/*function_udint_to_lint*/ |
|
4481 break; |
|
4482 |
|
4483 /**** |
|
4484 *UDINT_TO_USINT |
|
4485 */ |
|
4486 case function_udint_to_usint : |
|
4487 { |
|
4488 symbol_c *last_type_symbol = NULL; |
|
4489 |
|
4490 { |
|
4491 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4492 symbol_c *IN_param_value = &this->default_variable_name; |
|
4493 |
|
4494 symbol_c *IN_type_symbol = param_data_type; |
|
4495 last_type_symbol = param_data_type; |
|
4496 |
|
4497 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4498 { |
|
4499 |
|
4500 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
4501 s4o.print("("); |
|
4502 return_type_symbol->accept(*this); |
|
4503 s4o.print(")"); |
|
4504 IN_param_value->accept(*this); |
|
4505 return NULL; |
|
4506 |
|
4507 } |
|
4508 |
|
4509 ERROR; |
|
4510 } |
|
4511 |
|
4512 }/*function_udint_to_usint*/ |
|
4513 break; |
|
4514 |
|
4515 /**** |
|
4516 *UDINT_TO_UINT |
|
4517 */ |
|
4518 case function_udint_to_uint : |
|
4519 { |
|
4520 symbol_c *last_type_symbol = NULL; |
|
4521 |
|
4522 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4530 { |
|
4531 |
|
4532 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
4533 s4o.print("("); |
|
4534 return_type_symbol->accept(*this); |
|
4535 s4o.print(")"); |
|
4536 IN_param_value->accept(*this); |
|
4537 return NULL; |
|
4538 |
|
4539 } |
|
4540 |
|
4541 ERROR; |
|
4542 } |
|
4543 |
|
4544 }/*function_udint_to_uint*/ |
|
4545 break; |
|
4546 |
|
4547 /**** |
|
4548 *UDINT_TO_ULINT |
|
4549 */ |
|
4550 case function_udint_to_ulint : |
|
4551 { |
|
4552 symbol_c *last_type_symbol = NULL; |
|
4553 |
|
4554 { |
|
4555 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4556 symbol_c *IN_param_value = &this->default_variable_name; |
|
4557 |
|
4558 symbol_c *IN_type_symbol = param_data_type; |
|
4559 last_type_symbol = param_data_type; |
|
4560 |
|
4561 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4562 { |
|
4563 |
|
4564 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
4565 s4o.print("("); |
|
4566 return_type_symbol->accept(*this); |
|
4567 s4o.print(")"); |
|
4568 IN_param_value->accept(*this); |
|
4569 return NULL; |
|
4570 |
|
4571 } |
|
4572 |
|
4573 ERROR; |
|
4574 } |
|
4575 |
|
4576 }/*function_udint_to_ulint*/ |
|
4577 break; |
|
4578 |
|
4579 /**** |
|
4580 *UDINT_TO_REAL |
|
4581 */ |
|
4582 case function_udint_to_real : |
|
4583 { |
|
4584 symbol_c *last_type_symbol = NULL; |
|
4585 |
|
4586 { |
|
4587 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4588 symbol_c *IN_param_value = &this->default_variable_name; |
|
4589 |
|
4590 symbol_c *IN_type_symbol = param_data_type; |
|
4591 last_type_symbol = param_data_type; |
|
4592 |
|
4593 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4594 { |
|
4595 |
|
4596 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
4597 s4o.print("("); |
|
4598 return_type_symbol->accept(*this); |
|
4599 s4o.print(")"); |
|
4600 IN_param_value->accept(*this); |
|
4601 return NULL; |
|
4602 |
|
4603 } |
|
4604 |
|
4605 ERROR; |
|
4606 } |
|
4607 |
|
4608 }/*function_udint_to_real*/ |
|
4609 break; |
|
4610 |
|
4611 /**** |
|
4612 *UDINT_TO_LREAL |
|
4613 */ |
|
4614 case function_udint_to_lreal : |
|
4615 { |
|
4616 symbol_c *last_type_symbol = NULL; |
|
4617 |
|
4618 { |
|
4619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4620 symbol_c *IN_param_value = &this->default_variable_name; |
|
4621 |
|
4622 symbol_c *IN_type_symbol = param_data_type; |
|
4623 last_type_symbol = param_data_type; |
|
4624 |
|
4625 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4626 { |
|
4627 |
|
4628 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
4629 s4o.print("("); |
|
4630 return_type_symbol->accept(*this); |
|
4631 s4o.print(")"); |
|
4632 IN_param_value->accept(*this); |
|
4633 return NULL; |
|
4634 |
|
4635 } |
|
4636 |
|
4637 ERROR; |
|
4638 } |
|
4639 |
|
4640 }/*function_udint_to_lreal*/ |
|
4641 break; |
|
4642 |
|
4643 /**** |
|
4644 *UDINT_TO_TIME |
|
4645 */ |
|
4646 case function_udint_to_time : |
|
4647 { |
|
4648 symbol_c *last_type_symbol = NULL; |
|
4649 |
|
4650 { |
|
4651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4652 symbol_c *IN_param_value = &this->default_variable_name; |
|
4653 |
|
4654 symbol_c *IN_type_symbol = param_data_type; |
|
4655 last_type_symbol = param_data_type; |
|
4656 |
|
4657 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4658 { |
|
4659 |
|
4660 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
4661 s4o.print("("); |
|
4662 return_type_symbol->accept(*this); |
|
4663 s4o.print(")__int_to_time("); |
|
4664 IN_param_value->accept(*this); |
|
4665 s4o.print(")"); |
|
4666 return NULL; |
|
4667 |
|
4668 } |
|
4669 |
|
4670 ERROR; |
|
4671 } |
|
4672 |
|
4673 }/*function_udint_to_time*/ |
|
4674 break; |
|
4675 |
|
4676 /**** |
|
4677 *UDINT_TO_DATE |
|
4678 */ |
|
4679 case function_udint_to_date : |
|
4680 { |
|
4681 symbol_c *last_type_symbol = NULL; |
|
4682 |
|
4683 { |
|
4684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4685 symbol_c *IN_param_value = &this->default_variable_name; |
|
4686 |
|
4687 symbol_c *IN_type_symbol = param_data_type; |
|
4688 last_type_symbol = param_data_type; |
|
4689 |
|
4690 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4691 { |
|
4692 |
|
4693 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
4694 s4o.print("("); |
|
4695 return_type_symbol->accept(*this); |
|
4696 s4o.print(")__int_to_time("); |
|
4697 IN_param_value->accept(*this); |
|
4698 s4o.print(")"); |
|
4699 return NULL; |
|
4700 |
|
4701 } |
|
4702 |
|
4703 ERROR; |
|
4704 } |
|
4705 |
|
4706 }/*function_udint_to_date*/ |
|
4707 break; |
|
4708 |
|
4709 /**** |
|
4710 *UDINT_TO_TOD |
|
4711 */ |
|
4712 case function_udint_to_tod : |
|
4713 { |
|
4714 symbol_c *last_type_symbol = NULL; |
|
4715 |
|
4716 { |
|
4717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4718 symbol_c *IN_param_value = &this->default_variable_name; |
|
4719 |
|
4720 symbol_c *IN_type_symbol = param_data_type; |
|
4721 last_type_symbol = param_data_type; |
|
4722 |
|
4723 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4724 { |
|
4725 |
|
4726 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
4727 s4o.print("("); |
|
4728 return_type_symbol->accept(*this); |
|
4729 s4o.print(")__int_to_time("); |
|
4730 IN_param_value->accept(*this); |
|
4731 s4o.print(")"); |
|
4732 return NULL; |
|
4733 |
|
4734 } |
|
4735 |
|
4736 ERROR; |
|
4737 } |
|
4738 |
|
4739 }/*function_udint_to_tod*/ |
|
4740 break; |
|
4741 |
|
4742 /**** |
|
4743 *UDINT_TO_DT |
|
4744 */ |
|
4745 case function_udint_to_dt : |
|
4746 { |
|
4747 symbol_c *last_type_symbol = NULL; |
|
4748 |
|
4749 { |
|
4750 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4751 symbol_c *IN_param_value = &this->default_variable_name; |
|
4752 |
|
4753 symbol_c *IN_type_symbol = param_data_type; |
|
4754 last_type_symbol = param_data_type; |
|
4755 |
|
4756 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4757 { |
|
4758 |
|
4759 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
4760 s4o.print("("); |
|
4761 return_type_symbol->accept(*this); |
|
4762 s4o.print(")__int_to_time("); |
|
4763 IN_param_value->accept(*this); |
|
4764 s4o.print(")"); |
|
4765 return NULL; |
|
4766 |
|
4767 } |
|
4768 |
|
4769 ERROR; |
|
4770 } |
|
4771 |
|
4772 }/*function_udint_to_dt*/ |
|
4773 break; |
|
4774 |
|
4775 /**** |
|
4776 *UDINT_TO_STRING |
|
4777 */ |
|
4778 case function_udint_to_string : |
|
4779 { |
|
4780 symbol_c *last_type_symbol = NULL; |
|
4781 |
|
4782 { |
|
4783 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4784 symbol_c *IN_param_value = &this->default_variable_name; |
|
4785 |
|
4786 symbol_c *IN_type_symbol = param_data_type; |
|
4787 last_type_symbol = param_data_type; |
|
4788 |
|
4789 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4790 { |
|
4791 |
|
4792 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
4793 s4o.print("("); |
|
4794 return_type_symbol->accept(*this); |
|
4795 s4o.print(")__uint_to_string("); |
|
4796 IN_param_value->accept(*this); |
|
4797 s4o.print(")"); |
|
4798 return NULL; |
|
4799 |
|
4800 } |
|
4801 |
|
4802 ERROR; |
|
4803 } |
|
4804 |
|
4805 }/*function_udint_to_string*/ |
|
4806 break; |
|
4807 |
|
4808 /**** |
|
4809 *UDINT_TO_BYTE |
|
4810 */ |
|
4811 case function_udint_to_byte : |
|
4812 { |
|
4813 symbol_c *last_type_symbol = NULL; |
|
4814 |
|
4815 { |
|
4816 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4817 symbol_c *IN_param_value = &this->default_variable_name; |
|
4818 |
|
4819 symbol_c *IN_type_symbol = param_data_type; |
|
4820 last_type_symbol = param_data_type; |
|
4821 |
|
4822 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4823 { |
|
4824 |
|
4825 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
4826 s4o.print("("); |
|
4827 return_type_symbol->accept(*this); |
|
4828 s4o.print(")"); |
|
4829 IN_param_value->accept(*this); |
|
4830 return NULL; |
|
4831 |
|
4832 } |
|
4833 |
|
4834 ERROR; |
|
4835 } |
|
4836 |
|
4837 }/*function_udint_to_byte*/ |
|
4838 break; |
|
4839 |
|
4840 /**** |
|
4841 *UDINT_TO_WORD |
|
4842 */ |
|
4843 case function_udint_to_word : |
|
4844 { |
|
4845 symbol_c *last_type_symbol = NULL; |
|
4846 |
|
4847 { |
|
4848 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4849 symbol_c *IN_param_value = &this->default_variable_name; |
|
4850 |
|
4851 symbol_c *IN_type_symbol = param_data_type; |
|
4852 last_type_symbol = param_data_type; |
|
4853 |
|
4854 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4855 { |
|
4856 |
|
4857 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
4858 s4o.print("("); |
|
4859 return_type_symbol->accept(*this); |
|
4860 s4o.print(")"); |
|
4861 IN_param_value->accept(*this); |
|
4862 return NULL; |
|
4863 |
|
4864 } |
|
4865 |
|
4866 ERROR; |
|
4867 } |
|
4868 |
|
4869 }/*function_udint_to_word*/ |
|
4870 break; |
|
4871 |
|
4872 /**** |
|
4873 *UDINT_TO_DWORD |
|
4874 */ |
|
4875 case function_udint_to_dword : |
|
4876 { |
|
4877 symbol_c *last_type_symbol = NULL; |
|
4878 |
|
4879 { |
|
4880 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4881 symbol_c *IN_param_value = &this->default_variable_name; |
|
4882 |
|
4883 symbol_c *IN_type_symbol = param_data_type; |
|
4884 last_type_symbol = param_data_type; |
|
4885 |
|
4886 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4887 { |
|
4888 |
|
4889 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
4890 s4o.print("("); |
|
4891 return_type_symbol->accept(*this); |
|
4892 s4o.print(")"); |
|
4893 IN_param_value->accept(*this); |
|
4894 return NULL; |
|
4895 |
|
4896 } |
|
4897 |
|
4898 ERROR; |
|
4899 } |
|
4900 |
|
4901 }/*function_udint_to_dword*/ |
|
4902 break; |
|
4903 |
|
4904 /**** |
|
4905 *UDINT_TO_LWORD |
|
4906 */ |
|
4907 case function_udint_to_lword : |
|
4908 { |
|
4909 symbol_c *last_type_symbol = NULL; |
|
4910 |
|
4911 { |
|
4912 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4913 symbol_c *IN_param_value = &this->default_variable_name; |
|
4914 |
|
4915 symbol_c *IN_type_symbol = param_data_type; |
|
4916 last_type_symbol = param_data_type; |
|
4917 |
|
4918 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
4919 { |
|
4920 |
|
4921 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
4922 s4o.print("("); |
|
4923 return_type_symbol->accept(*this); |
|
4924 s4o.print(")"); |
|
4925 IN_param_value->accept(*this); |
|
4926 return NULL; |
|
4927 |
|
4928 } |
|
4929 |
|
4930 ERROR; |
|
4931 } |
|
4932 |
|
4933 }/*function_udint_to_lword*/ |
|
4934 break; |
|
4935 |
|
4936 /**** |
|
4937 *ULINT_TO_BOOL |
|
4938 */ |
|
4939 case function_ulint_to_bool : |
|
4940 { |
|
4941 symbol_c *last_type_symbol = NULL; |
|
4942 |
|
4943 { |
|
4944 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4945 symbol_c *IN_param_value = &this->default_variable_name; |
|
4946 |
|
4947 symbol_c *IN_type_symbol = param_data_type; |
|
4948 last_type_symbol = param_data_type; |
|
4949 |
|
4950 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
4951 { |
|
4952 |
|
4953 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
4954 s4o.print("("); |
|
4955 return_type_symbol->accept(*this); |
|
4956 s4o.print(")"); |
|
4957 IN_param_value->accept(*this); |
|
4958 return NULL; |
|
4959 |
|
4960 } |
|
4961 |
|
4962 ERROR; |
|
4963 } |
|
4964 |
|
4965 }/*function_ulint_to_bool*/ |
|
4966 break; |
|
4967 |
|
4968 /**** |
|
4969 *ULINT_TO_SINT |
|
4970 */ |
|
4971 case function_ulint_to_sint : |
|
4972 { |
|
4973 symbol_c *last_type_symbol = NULL; |
|
4974 |
|
4975 { |
|
4976 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
4977 symbol_c *IN_param_value = &this->default_variable_name; |
|
4978 |
|
4979 symbol_c *IN_type_symbol = param_data_type; |
|
4980 last_type_symbol = param_data_type; |
|
4981 |
|
4982 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
4983 { |
|
4984 |
|
4985 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
4986 s4o.print("("); |
|
4987 return_type_symbol->accept(*this); |
|
4988 s4o.print(")"); |
|
4989 IN_param_value->accept(*this); |
|
4990 return NULL; |
|
4991 |
|
4992 } |
|
4993 |
|
4994 ERROR; |
|
4995 } |
|
4996 |
|
4997 }/*function_ulint_to_sint*/ |
|
4998 break; |
|
4999 |
|
5000 /**** |
|
5001 *ULINT_TO_INT |
|
5002 */ |
|
5003 case function_ulint_to_int : |
|
5004 { |
|
5005 symbol_c *last_type_symbol = NULL; |
|
5006 |
|
5007 { |
|
5008 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5009 symbol_c *IN_param_value = &this->default_variable_name; |
|
5010 |
|
5011 symbol_c *IN_type_symbol = param_data_type; |
|
5012 last_type_symbol = param_data_type; |
|
5013 |
|
5014 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5015 { |
|
5016 |
|
5017 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5018 s4o.print("("); |
|
5019 return_type_symbol->accept(*this); |
|
5020 s4o.print(")"); |
|
5021 IN_param_value->accept(*this); |
|
5022 return NULL; |
|
5023 |
|
5024 } |
|
5025 |
|
5026 ERROR; |
|
5027 } |
|
5028 |
|
5029 }/*function_ulint_to_int*/ |
|
5030 break; |
|
5031 |
|
5032 /**** |
|
5033 *ULINT_TO_DINT |
|
5034 */ |
|
5035 case function_ulint_to_dint : |
|
5036 { |
|
5037 symbol_c *last_type_symbol = NULL; |
|
5038 |
|
5039 { |
|
5040 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5041 symbol_c *IN_param_value = &this->default_variable_name; |
|
5042 |
|
5043 symbol_c *IN_type_symbol = param_data_type; |
|
5044 last_type_symbol = param_data_type; |
|
5045 |
|
5046 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5047 { |
|
5048 |
|
5049 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5050 s4o.print("("); |
|
5051 return_type_symbol->accept(*this); |
|
5052 s4o.print(")"); |
|
5053 IN_param_value->accept(*this); |
|
5054 return NULL; |
|
5055 |
|
5056 } |
|
5057 |
|
5058 ERROR; |
|
5059 } |
|
5060 |
|
5061 }/*function_ulint_to_dint*/ |
|
5062 break; |
|
5063 |
|
5064 /**** |
|
5065 *ULINT_TO_LINT |
|
5066 */ |
|
5067 case function_ulint_to_lint : |
|
5068 { |
|
5069 symbol_c *last_type_symbol = NULL; |
|
5070 |
|
5071 { |
|
5072 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5073 symbol_c *IN_param_value = &this->default_variable_name; |
|
5074 |
|
5075 symbol_c *IN_type_symbol = param_data_type; |
|
5076 last_type_symbol = param_data_type; |
|
5077 |
|
5078 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5079 { |
|
5080 |
|
5081 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5082 s4o.print("("); |
|
5083 return_type_symbol->accept(*this); |
|
5084 s4o.print(")"); |
|
5085 IN_param_value->accept(*this); |
|
5086 return NULL; |
|
5087 |
|
5088 } |
|
5089 |
|
5090 ERROR; |
|
5091 } |
|
5092 |
|
5093 }/*function_ulint_to_lint*/ |
|
5094 break; |
|
5095 |
|
5096 /**** |
|
5097 *ULINT_TO_USINT |
|
5098 */ |
|
5099 case function_ulint_to_usint : |
|
5100 { |
|
5101 symbol_c *last_type_symbol = NULL; |
|
5102 |
|
5103 { |
|
5104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5105 symbol_c *IN_param_value = &this->default_variable_name; |
|
5106 |
|
5107 symbol_c *IN_type_symbol = param_data_type; |
|
5108 last_type_symbol = param_data_type; |
|
5109 |
|
5110 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5111 { |
|
5112 |
|
5113 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5114 s4o.print("("); |
|
5115 return_type_symbol->accept(*this); |
|
5116 s4o.print(")"); |
|
5117 IN_param_value->accept(*this); |
|
5118 return NULL; |
|
5119 |
|
5120 } |
|
5121 |
|
5122 ERROR; |
|
5123 } |
|
5124 |
|
5125 }/*function_ulint_to_usint*/ |
|
5126 break; |
|
5127 |
|
5128 /**** |
|
5129 *ULINT_TO_UINT |
|
5130 */ |
|
5131 case function_ulint_to_uint : |
|
5132 { |
|
5133 symbol_c *last_type_symbol = NULL; |
|
5134 |
|
5135 { |
|
5136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5137 symbol_c *IN_param_value = &this->default_variable_name; |
|
5138 |
|
5139 symbol_c *IN_type_symbol = param_data_type; |
|
5140 last_type_symbol = param_data_type; |
|
5141 |
|
5142 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5143 { |
|
5144 |
|
5145 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5146 s4o.print("("); |
|
5147 return_type_symbol->accept(*this); |
|
5148 s4o.print(")"); |
|
5149 IN_param_value->accept(*this); |
|
5150 return NULL; |
|
5151 |
|
5152 } |
|
5153 |
|
5154 ERROR; |
|
5155 } |
|
5156 |
|
5157 }/*function_ulint_to_uint*/ |
|
5158 break; |
|
5159 |
|
5160 /**** |
|
5161 *ULINT_TO_UDINT |
|
5162 */ |
|
5163 case function_ulint_to_udint : |
|
5164 { |
|
5165 symbol_c *last_type_symbol = NULL; |
|
5166 |
|
5167 { |
|
5168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5169 symbol_c *IN_param_value = &this->default_variable_name; |
|
5170 |
|
5171 symbol_c *IN_type_symbol = param_data_type; |
|
5172 last_type_symbol = param_data_type; |
|
5173 |
|
5174 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5175 { |
|
5176 |
|
5177 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
5178 s4o.print("("); |
|
5179 return_type_symbol->accept(*this); |
|
5180 s4o.print(")"); |
|
5181 IN_param_value->accept(*this); |
|
5182 return NULL; |
|
5183 |
|
5184 } |
|
5185 |
|
5186 ERROR; |
|
5187 } |
|
5188 |
|
5189 }/*function_ulint_to_udint*/ |
|
5190 break; |
|
5191 |
|
5192 /**** |
|
5193 *ULINT_TO_REAL |
|
5194 */ |
|
5195 case function_ulint_to_real : |
|
5196 { |
|
5197 symbol_c *last_type_symbol = NULL; |
|
5198 |
|
5199 { |
|
5200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5201 symbol_c *IN_param_value = &this->default_variable_name; |
|
5202 |
|
5203 symbol_c *IN_type_symbol = param_data_type; |
|
5204 last_type_symbol = param_data_type; |
|
5205 |
|
5206 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5207 { |
|
5208 |
|
5209 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
5210 s4o.print("("); |
|
5211 return_type_symbol->accept(*this); |
|
5212 s4o.print(")"); |
|
5213 IN_param_value->accept(*this); |
|
5214 return NULL; |
|
5215 |
|
5216 } |
|
5217 |
|
5218 ERROR; |
|
5219 } |
|
5220 |
|
5221 }/*function_ulint_to_real*/ |
|
5222 break; |
|
5223 |
|
5224 /**** |
|
5225 *ULINT_TO_LREAL |
|
5226 */ |
|
5227 case function_ulint_to_lreal : |
|
5228 { |
|
5229 symbol_c *last_type_symbol = NULL; |
|
5230 |
|
5231 { |
|
5232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5233 symbol_c *IN_param_value = &this->default_variable_name; |
|
5234 |
|
5235 symbol_c *IN_type_symbol = param_data_type; |
|
5236 last_type_symbol = param_data_type; |
|
5237 |
|
5238 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5239 { |
|
5240 |
|
5241 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5242 s4o.print("("); |
|
5243 return_type_symbol->accept(*this); |
|
5244 s4o.print(")"); |
|
5245 IN_param_value->accept(*this); |
|
5246 return NULL; |
|
5247 |
|
5248 } |
|
5249 |
|
5250 ERROR; |
|
5251 } |
|
5252 |
|
5253 }/*function_ulint_to_lreal*/ |
|
5254 break; |
|
5255 |
|
5256 /**** |
|
5257 *ULINT_TO_TIME |
|
5258 */ |
|
5259 case function_ulint_to_time : |
|
5260 { |
|
5261 symbol_c *last_type_symbol = NULL; |
|
5262 |
|
5263 { |
|
5264 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5265 symbol_c *IN_param_value = &this->default_variable_name; |
|
5266 |
|
5267 symbol_c *IN_type_symbol = param_data_type; |
|
5268 last_type_symbol = param_data_type; |
|
5269 |
|
5270 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5271 { |
|
5272 |
|
5273 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5274 s4o.print("("); |
|
5275 return_type_symbol->accept(*this); |
|
5276 s4o.print(")__int_to_time("); |
|
5277 IN_param_value->accept(*this); |
|
5278 s4o.print(")"); |
|
5279 return NULL; |
|
5280 |
|
5281 } |
|
5282 |
|
5283 ERROR; |
|
5284 } |
|
5285 |
|
5286 }/*function_ulint_to_time*/ |
|
5287 break; |
|
5288 |
|
5289 /**** |
|
5290 *ULINT_TO_DATE |
|
5291 */ |
|
5292 case function_ulint_to_date : |
|
5293 { |
|
5294 symbol_c *last_type_symbol = NULL; |
|
5295 |
|
5296 { |
|
5297 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5298 symbol_c *IN_param_value = &this->default_variable_name; |
|
5299 |
|
5300 symbol_c *IN_type_symbol = param_data_type; |
|
5301 last_type_symbol = param_data_type; |
|
5302 |
|
5303 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5304 { |
|
5305 |
|
5306 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5307 s4o.print("("); |
|
5308 return_type_symbol->accept(*this); |
|
5309 s4o.print(")__int_to_time("); |
|
5310 IN_param_value->accept(*this); |
|
5311 s4o.print(")"); |
|
5312 return NULL; |
|
5313 |
|
5314 } |
|
5315 |
|
5316 ERROR; |
|
5317 } |
|
5318 |
|
5319 }/*function_ulint_to_date*/ |
|
5320 break; |
|
5321 |
|
5322 /**** |
|
5323 *ULINT_TO_TOD |
|
5324 */ |
|
5325 case function_ulint_to_tod : |
|
5326 { |
|
5327 symbol_c *last_type_symbol = NULL; |
|
5328 |
|
5329 { |
|
5330 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5331 symbol_c *IN_param_value = &this->default_variable_name; |
|
5332 |
|
5333 symbol_c *IN_type_symbol = param_data_type; |
|
5334 last_type_symbol = param_data_type; |
|
5335 |
|
5336 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5337 { |
|
5338 |
|
5339 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5340 s4o.print("("); |
|
5341 return_type_symbol->accept(*this); |
|
5342 s4o.print(")__int_to_time("); |
|
5343 IN_param_value->accept(*this); |
|
5344 s4o.print(")"); |
|
5345 return NULL; |
|
5346 |
|
5347 } |
|
5348 |
|
5349 ERROR; |
|
5350 } |
|
5351 |
|
5352 }/*function_ulint_to_tod*/ |
|
5353 break; |
|
5354 |
|
5355 /**** |
|
5356 *ULINT_TO_DT |
|
5357 */ |
|
5358 case function_ulint_to_dt : |
|
5359 { |
|
5360 symbol_c *last_type_symbol = NULL; |
|
5361 |
|
5362 { |
|
5363 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5364 symbol_c *IN_param_value = &this->default_variable_name; |
|
5365 |
|
5366 symbol_c *IN_type_symbol = param_data_type; |
|
5367 last_type_symbol = param_data_type; |
|
5368 |
|
5369 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5370 { |
|
5371 |
|
5372 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5373 s4o.print("("); |
|
5374 return_type_symbol->accept(*this); |
|
5375 s4o.print(")__int_to_time("); |
|
5376 IN_param_value->accept(*this); |
|
5377 s4o.print(")"); |
|
5378 return NULL; |
|
5379 |
|
5380 } |
|
5381 |
|
5382 ERROR; |
|
5383 } |
|
5384 |
|
5385 }/*function_ulint_to_dt*/ |
|
5386 break; |
|
5387 |
|
5388 /**** |
|
5389 *ULINT_TO_STRING |
|
5390 */ |
|
5391 case function_ulint_to_string : |
|
5392 { |
|
5393 symbol_c *last_type_symbol = NULL; |
|
5394 |
|
5395 { |
|
5396 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5397 symbol_c *IN_param_value = &this->default_variable_name; |
|
5398 |
|
5399 symbol_c *IN_type_symbol = param_data_type; |
|
5400 last_type_symbol = param_data_type; |
|
5401 |
|
5402 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5403 { |
|
5404 |
|
5405 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
5406 s4o.print("("); |
|
5407 return_type_symbol->accept(*this); |
|
5408 s4o.print(")__uint_to_string("); |
|
5409 IN_param_value->accept(*this); |
|
5410 s4o.print(")"); |
|
5411 return NULL; |
|
5412 |
|
5413 } |
|
5414 |
|
5415 ERROR; |
|
5416 } |
|
5417 |
|
5418 }/*function_ulint_to_string*/ |
|
5419 break; |
|
5420 |
|
5421 /**** |
|
5422 *ULINT_TO_BYTE |
|
5423 */ |
|
5424 case function_ulint_to_byte : |
|
5425 { |
|
5426 symbol_c *last_type_symbol = NULL; |
|
5427 |
|
5428 { |
|
5429 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5430 symbol_c *IN_param_value = &this->default_variable_name; |
|
5431 |
|
5432 symbol_c *IN_type_symbol = param_data_type; |
|
5433 last_type_symbol = param_data_type; |
|
5434 |
|
5435 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5436 { |
|
5437 |
|
5438 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
5439 s4o.print("("); |
|
5440 return_type_symbol->accept(*this); |
|
5441 s4o.print(")"); |
|
5442 IN_param_value->accept(*this); |
|
5443 return NULL; |
|
5444 |
|
5445 } |
|
5446 |
|
5447 ERROR; |
|
5448 } |
|
5449 |
|
5450 }/*function_ulint_to_byte*/ |
|
5451 break; |
|
5452 |
|
5453 /**** |
|
5454 *ULINT_TO_WORD |
|
5455 */ |
|
5456 case function_ulint_to_word : |
|
5457 { |
|
5458 symbol_c *last_type_symbol = NULL; |
|
5459 |
|
5460 { |
|
5461 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5462 symbol_c *IN_param_value = &this->default_variable_name; |
|
5463 |
|
5464 symbol_c *IN_type_symbol = param_data_type; |
|
5465 last_type_symbol = param_data_type; |
|
5466 |
|
5467 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5468 { |
|
5469 |
|
5470 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
5471 s4o.print("("); |
|
5472 return_type_symbol->accept(*this); |
|
5473 s4o.print(")"); |
|
5474 IN_param_value->accept(*this); |
|
5475 return NULL; |
|
5476 |
|
5477 } |
|
5478 |
|
5479 ERROR; |
|
5480 } |
|
5481 |
|
5482 }/*function_ulint_to_word*/ |
|
5483 break; |
|
5484 |
|
5485 /**** |
|
5486 *ULINT_TO_DWORD |
|
5487 */ |
|
5488 case function_ulint_to_dword : |
|
5489 { |
|
5490 symbol_c *last_type_symbol = NULL; |
|
5491 |
|
5492 { |
|
5493 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5494 symbol_c *IN_param_value = &this->default_variable_name; |
|
5495 |
|
5496 symbol_c *IN_type_symbol = param_data_type; |
|
5497 last_type_symbol = param_data_type; |
|
5498 |
|
5499 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5500 { |
|
5501 |
|
5502 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
5503 s4o.print("("); |
|
5504 return_type_symbol->accept(*this); |
|
5505 s4o.print(")"); |
|
5506 IN_param_value->accept(*this); |
|
5507 return NULL; |
|
5508 |
|
5509 } |
|
5510 |
|
5511 ERROR; |
|
5512 } |
|
5513 |
|
5514 }/*function_ulint_to_dword*/ |
|
5515 break; |
|
5516 |
|
5517 /**** |
|
5518 *ULINT_TO_LWORD |
|
5519 */ |
|
5520 case function_ulint_to_lword : |
|
5521 { |
|
5522 symbol_c *last_type_symbol = NULL; |
|
5523 |
|
5524 { |
|
5525 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5526 symbol_c *IN_param_value = &this->default_variable_name; |
|
5527 |
|
5528 symbol_c *IN_type_symbol = param_data_type; |
|
5529 last_type_symbol = param_data_type; |
|
5530 |
|
5531 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
5532 { |
|
5533 |
|
5534 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
5535 s4o.print("("); |
|
5536 return_type_symbol->accept(*this); |
|
5537 s4o.print(")"); |
|
5538 IN_param_value->accept(*this); |
|
5539 return NULL; |
|
5540 |
|
5541 } |
|
5542 |
|
5543 ERROR; |
|
5544 } |
|
5545 |
|
5546 }/*function_ulint_to_lword*/ |
|
5547 break; |
|
5548 |
|
5549 /**** |
|
5550 *REAL_TO_BOOL |
|
5551 */ |
|
5552 case function_real_to_bool : |
|
5553 { |
|
5554 symbol_c *last_type_symbol = NULL; |
|
5555 |
|
5556 { |
|
5557 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5558 symbol_c *IN_param_value = &this->default_variable_name; |
|
5559 |
|
5560 symbol_c *IN_type_symbol = param_data_type; |
|
5561 last_type_symbol = param_data_type; |
|
5562 |
|
5563 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5564 { |
|
5565 |
|
5566 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
5567 s4o.print("("); |
|
5568 return_type_symbol->accept(*this); |
|
5569 s4o.print(")"); |
|
5570 IN_param_value->accept(*this); |
|
5571 return NULL; |
|
5572 |
|
5573 } |
|
5574 |
|
5575 ERROR; |
|
5576 } |
|
5577 |
|
5578 }/*function_real_to_bool*/ |
|
5579 break; |
|
5580 |
|
5581 /**** |
|
5582 *REAL_TO_SINT |
|
5583 */ |
|
5584 case function_real_to_sint : |
|
5585 { |
|
5586 symbol_c *last_type_symbol = NULL; |
|
5587 |
|
5588 { |
|
5589 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5590 symbol_c *IN_param_value = &this->default_variable_name; |
|
5591 |
|
5592 symbol_c *IN_type_symbol = param_data_type; |
|
5593 last_type_symbol = param_data_type; |
|
5594 |
|
5595 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5596 { |
|
5597 |
|
5598 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
5599 s4o.print("("); |
|
5600 return_type_symbol->accept(*this); |
|
5601 s4o.print(")"); |
|
5602 IN_param_value->accept(*this); |
|
5603 return NULL; |
|
5604 |
|
5605 } |
|
5606 |
|
5607 ERROR; |
|
5608 } |
|
5609 |
|
5610 }/*function_real_to_sint*/ |
|
5611 break; |
|
5612 |
|
5613 /**** |
|
5614 *REAL_TO_INT |
|
5615 */ |
|
5616 case function_real_to_int : |
|
5617 { |
|
5618 symbol_c *last_type_symbol = NULL; |
|
5619 |
|
5620 { |
|
5621 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5622 symbol_c *IN_param_value = &this->default_variable_name; |
|
5623 |
|
5624 symbol_c *IN_type_symbol = param_data_type; |
|
5625 last_type_symbol = param_data_type; |
|
5626 |
|
5627 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5628 { |
|
5629 |
|
5630 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
5631 s4o.print("("); |
|
5632 return_type_symbol->accept(*this); |
|
5633 s4o.print(")"); |
|
5634 IN_param_value->accept(*this); |
|
5635 return NULL; |
|
5636 |
|
5637 } |
|
5638 |
|
5639 ERROR; |
|
5640 } |
|
5641 |
|
5642 }/*function_real_to_int*/ |
|
5643 break; |
|
5644 |
|
5645 /**** |
|
5646 *REAL_TO_DINT |
|
5647 */ |
|
5648 case function_real_to_dint : |
|
5649 { |
|
5650 symbol_c *last_type_symbol = NULL; |
|
5651 |
|
5652 { |
|
5653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5654 symbol_c *IN_param_value = &this->default_variable_name; |
|
5655 |
|
5656 symbol_c *IN_type_symbol = param_data_type; |
|
5657 last_type_symbol = param_data_type; |
|
5658 |
|
5659 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5660 { |
|
5661 |
|
5662 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
5663 s4o.print("("); |
|
5664 return_type_symbol->accept(*this); |
|
5665 s4o.print(")"); |
|
5666 IN_param_value->accept(*this); |
|
5667 return NULL; |
|
5668 |
|
5669 } |
|
5670 |
|
5671 ERROR; |
|
5672 } |
|
5673 |
|
5674 }/*function_real_to_dint*/ |
|
5675 break; |
|
5676 |
|
5677 /**** |
|
5678 *REAL_TO_LINT |
|
5679 */ |
|
5680 case function_real_to_lint : |
|
5681 { |
|
5682 symbol_c *last_type_symbol = NULL; |
|
5683 |
|
5684 { |
|
5685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5686 symbol_c *IN_param_value = &this->default_variable_name; |
|
5687 |
|
5688 symbol_c *IN_type_symbol = param_data_type; |
|
5689 last_type_symbol = param_data_type; |
|
5690 |
|
5691 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5692 { |
|
5693 |
|
5694 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
5695 s4o.print("("); |
|
5696 return_type_symbol->accept(*this); |
|
5697 s4o.print(")"); |
|
5698 IN_param_value->accept(*this); |
|
5699 return NULL; |
|
5700 |
|
5701 } |
|
5702 |
|
5703 ERROR; |
|
5704 } |
|
5705 |
|
5706 }/*function_real_to_lint*/ |
|
5707 break; |
|
5708 |
|
5709 /**** |
|
5710 *REAL_TO_USINT |
|
5711 */ |
|
5712 case function_real_to_usint : |
|
5713 { |
|
5714 symbol_c *last_type_symbol = NULL; |
|
5715 |
|
5716 { |
|
5717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5718 symbol_c *IN_param_value = &this->default_variable_name; |
|
5719 |
|
5720 symbol_c *IN_type_symbol = param_data_type; |
|
5721 last_type_symbol = param_data_type; |
|
5722 |
|
5723 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5724 { |
|
5725 |
|
5726 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
5727 s4o.print("("); |
|
5728 return_type_symbol->accept(*this); |
|
5729 s4o.print(")"); |
|
5730 IN_param_value->accept(*this); |
|
5731 return NULL; |
|
5732 |
|
5733 } |
|
5734 |
|
5735 ERROR; |
|
5736 } |
|
5737 |
|
5738 }/*function_real_to_usint*/ |
|
5739 break; |
|
5740 |
|
5741 /**** |
|
5742 *REAL_TO_UINT |
|
5743 */ |
|
5744 case function_real_to_uint : |
|
5745 { |
|
5746 symbol_c *last_type_symbol = NULL; |
|
5747 |
|
5748 { |
|
5749 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5750 symbol_c *IN_param_value = &this->default_variable_name; |
|
5751 |
|
5752 symbol_c *IN_type_symbol = param_data_type; |
|
5753 last_type_symbol = param_data_type; |
|
5754 |
|
5755 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5756 { |
|
5757 |
|
5758 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
5759 s4o.print("("); |
|
5760 return_type_symbol->accept(*this); |
|
5761 s4o.print(")"); |
|
5762 IN_param_value->accept(*this); |
|
5763 return NULL; |
|
5764 |
|
5765 } |
|
5766 |
|
5767 ERROR; |
|
5768 } |
|
5769 |
|
5770 }/*function_real_to_uint*/ |
|
5771 break; |
|
5772 |
|
5773 /**** |
|
5774 *REAL_TO_UDINT |
|
5775 */ |
|
5776 case function_real_to_udint : |
|
5777 { |
|
5778 symbol_c *last_type_symbol = NULL; |
|
5779 |
|
5780 { |
|
5781 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5782 symbol_c *IN_param_value = &this->default_variable_name; |
|
5783 |
|
5784 symbol_c *IN_type_symbol = param_data_type; |
|
5785 last_type_symbol = param_data_type; |
|
5786 |
|
5787 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5788 { |
|
5789 |
|
5790 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
5791 s4o.print("("); |
|
5792 return_type_symbol->accept(*this); |
|
5793 s4o.print(")"); |
|
5794 IN_param_value->accept(*this); |
|
5795 return NULL; |
|
5796 |
|
5797 } |
|
5798 |
|
5799 ERROR; |
|
5800 } |
|
5801 |
|
5802 }/*function_real_to_udint*/ |
|
5803 break; |
|
5804 |
|
5805 /**** |
|
5806 *REAL_TO_ULINT |
|
5807 */ |
|
5808 case function_real_to_ulint : |
|
5809 { |
|
5810 symbol_c *last_type_symbol = NULL; |
|
5811 |
|
5812 { |
|
5813 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5814 symbol_c *IN_param_value = &this->default_variable_name; |
|
5815 |
|
5816 symbol_c *IN_type_symbol = param_data_type; |
|
5817 last_type_symbol = param_data_type; |
|
5818 |
|
5819 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5820 { |
|
5821 |
|
5822 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
5823 s4o.print("("); |
|
5824 return_type_symbol->accept(*this); |
|
5825 s4o.print(")"); |
|
5826 IN_param_value->accept(*this); |
|
5827 return NULL; |
|
5828 |
|
5829 } |
|
5830 |
|
5831 ERROR; |
|
5832 } |
|
5833 |
|
5834 }/*function_real_to_ulint*/ |
|
5835 break; |
|
5836 |
|
5837 /**** |
|
5838 *REAL_TO_LREAL |
|
5839 */ |
|
5840 case function_real_to_lreal : |
|
5841 { |
|
5842 symbol_c *last_type_symbol = NULL; |
|
5843 |
|
5844 { |
|
5845 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5846 symbol_c *IN_param_value = &this->default_variable_name; |
|
5847 |
|
5848 symbol_c *IN_type_symbol = param_data_type; |
|
5849 last_type_symbol = param_data_type; |
|
5850 |
|
5851 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5852 { |
|
5853 |
|
5854 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
5855 s4o.print("("); |
|
5856 return_type_symbol->accept(*this); |
|
5857 s4o.print(")"); |
|
5858 IN_param_value->accept(*this); |
|
5859 return NULL; |
|
5860 |
|
5861 } |
|
5862 |
|
5863 ERROR; |
|
5864 } |
|
5865 |
|
5866 }/*function_real_to_lreal*/ |
|
5867 break; |
|
5868 |
|
5869 /**** |
|
5870 *REAL_TO_TIME |
|
5871 */ |
|
5872 case function_real_to_time : |
|
5873 { |
|
5874 symbol_c *last_type_symbol = NULL; |
|
5875 |
|
5876 { |
|
5877 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5878 symbol_c *IN_param_value = &this->default_variable_name; |
|
5879 |
|
5880 symbol_c *IN_type_symbol = param_data_type; |
|
5881 last_type_symbol = param_data_type; |
|
5882 |
|
5883 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5884 { |
|
5885 |
|
5886 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
5887 s4o.print("("); |
|
5888 return_type_symbol->accept(*this); |
|
5889 s4o.print(")__real_to_time("); |
|
5890 IN_param_value->accept(*this); |
|
5891 s4o.print(")"); |
|
5892 return NULL; |
|
5893 |
|
5894 } |
|
5895 |
|
5896 ERROR; |
|
5897 } |
|
5898 |
|
5899 }/*function_real_to_time*/ |
|
5900 break; |
|
5901 |
|
5902 /**** |
|
5903 *REAL_TO_DATE |
|
5904 */ |
|
5905 case function_real_to_date : |
|
5906 { |
|
5907 symbol_c *last_type_symbol = NULL; |
|
5908 |
|
5909 { |
|
5910 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5911 symbol_c *IN_param_value = &this->default_variable_name; |
|
5912 |
|
5913 symbol_c *IN_type_symbol = param_data_type; |
|
5914 last_type_symbol = param_data_type; |
|
5915 |
|
5916 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5917 { |
|
5918 |
|
5919 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
5920 s4o.print("("); |
|
5921 return_type_symbol->accept(*this); |
|
5922 s4o.print(")__real_to_time("); |
|
5923 IN_param_value->accept(*this); |
|
5924 s4o.print(")"); |
|
5925 return NULL; |
|
5926 |
|
5927 } |
|
5928 |
|
5929 ERROR; |
|
5930 } |
|
5931 |
|
5932 }/*function_real_to_date*/ |
|
5933 break; |
|
5934 |
|
5935 /**** |
|
5936 *REAL_TO_TOD |
|
5937 */ |
|
5938 case function_real_to_tod : |
|
5939 { |
|
5940 symbol_c *last_type_symbol = NULL; |
|
5941 |
|
5942 { |
|
5943 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5944 symbol_c *IN_param_value = &this->default_variable_name; |
|
5945 |
|
5946 symbol_c *IN_type_symbol = param_data_type; |
|
5947 last_type_symbol = param_data_type; |
|
5948 |
|
5949 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5950 { |
|
5951 |
|
5952 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
5953 s4o.print("("); |
|
5954 return_type_symbol->accept(*this); |
|
5955 s4o.print(")__real_to_time("); |
|
5956 IN_param_value->accept(*this); |
|
5957 s4o.print(")"); |
|
5958 return NULL; |
|
5959 |
|
5960 } |
|
5961 |
|
5962 ERROR; |
|
5963 } |
|
5964 |
|
5965 }/*function_real_to_tod*/ |
|
5966 break; |
|
5967 |
|
5968 /**** |
|
5969 *REAL_TO_DT |
|
5970 */ |
|
5971 case function_real_to_dt : |
|
5972 { |
|
5973 symbol_c *last_type_symbol = NULL; |
|
5974 |
|
5975 { |
|
5976 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
5977 symbol_c *IN_param_value = &this->default_variable_name; |
|
5978 |
|
5979 symbol_c *IN_type_symbol = param_data_type; |
|
5980 last_type_symbol = param_data_type; |
|
5981 |
|
5982 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
5983 { |
|
5984 |
|
5985 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
5986 s4o.print("("); |
|
5987 return_type_symbol->accept(*this); |
|
5988 s4o.print(")__real_to_time("); |
|
5989 IN_param_value->accept(*this); |
|
5990 s4o.print(")"); |
|
5991 return NULL; |
|
5992 |
|
5993 } |
|
5994 |
|
5995 ERROR; |
|
5996 } |
|
5997 |
|
5998 }/*function_real_to_dt*/ |
|
5999 break; |
|
6000 |
|
6001 /**** |
|
6002 *REAL_TO_STRING |
|
6003 */ |
|
6004 case function_real_to_string : |
|
6005 { |
|
6006 symbol_c *last_type_symbol = NULL; |
|
6007 |
|
6008 { |
|
6009 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6010 symbol_c *IN_param_value = &this->default_variable_name; |
|
6011 |
|
6012 symbol_c *IN_type_symbol = param_data_type; |
|
6013 last_type_symbol = param_data_type; |
|
6014 |
|
6015 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
6016 { |
|
6017 |
|
6018 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6019 s4o.print("("); |
|
6020 return_type_symbol->accept(*this); |
|
6021 s4o.print(")__real_to_string("); |
|
6022 IN_param_value->accept(*this); |
|
6023 s4o.print(")"); |
|
6024 return NULL; |
|
6025 |
|
6026 } |
|
6027 |
|
6028 ERROR; |
|
6029 } |
|
6030 |
|
6031 }/*function_real_to_string*/ |
|
6032 break; |
|
6033 |
|
6034 /**** |
|
6035 *REAL_TO_BYTE |
|
6036 */ |
|
6037 case function_real_to_byte : |
|
6038 { |
|
6039 symbol_c *last_type_symbol = NULL; |
|
6040 |
|
6041 { |
|
6042 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6043 symbol_c *IN_param_value = &this->default_variable_name; |
|
6044 |
|
6045 symbol_c *IN_type_symbol = param_data_type; |
|
6046 last_type_symbol = param_data_type; |
|
6047 |
|
6048 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
6049 { |
|
6050 |
|
6051 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6052 s4o.print("("); |
|
6053 return_type_symbol->accept(*this); |
|
6054 s4o.print(")"); |
|
6055 IN_param_value->accept(*this); |
|
6056 return NULL; |
|
6057 |
|
6058 } |
|
6059 |
|
6060 ERROR; |
|
6061 } |
|
6062 |
|
6063 }/*function_real_to_byte*/ |
|
6064 break; |
|
6065 |
|
6066 /**** |
|
6067 *REAL_TO_WORD |
|
6068 */ |
|
6069 case function_real_to_word : |
|
6070 { |
|
6071 symbol_c *last_type_symbol = NULL; |
|
6072 |
|
6073 { |
|
6074 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6075 symbol_c *IN_param_value = &this->default_variable_name; |
|
6076 |
|
6077 symbol_c *IN_type_symbol = param_data_type; |
|
6078 last_type_symbol = param_data_type; |
|
6079 |
|
6080 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
6081 { |
|
6082 |
|
6083 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6084 s4o.print("("); |
|
6085 return_type_symbol->accept(*this); |
|
6086 s4o.print(")"); |
|
6087 IN_param_value->accept(*this); |
|
6088 return NULL; |
|
6089 |
|
6090 } |
|
6091 |
|
6092 ERROR; |
|
6093 } |
|
6094 |
|
6095 }/*function_real_to_word*/ |
|
6096 break; |
|
6097 |
|
6098 /**** |
|
6099 *REAL_TO_DWORD |
|
6100 */ |
|
6101 case function_real_to_dword : |
|
6102 { |
|
6103 symbol_c *last_type_symbol = NULL; |
|
6104 |
|
6105 { |
|
6106 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6107 symbol_c *IN_param_value = &this->default_variable_name; |
|
6108 |
|
6109 symbol_c *IN_type_symbol = param_data_type; |
|
6110 last_type_symbol = param_data_type; |
|
6111 |
|
6112 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
6113 { |
|
6114 |
|
6115 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6116 s4o.print("("); |
|
6117 return_type_symbol->accept(*this); |
|
6118 s4o.print(")"); |
|
6119 IN_param_value->accept(*this); |
|
6120 return NULL; |
|
6121 |
|
6122 } |
|
6123 |
|
6124 ERROR; |
|
6125 } |
|
6126 |
|
6127 }/*function_real_to_dword*/ |
|
6128 break; |
|
6129 |
|
6130 /**** |
|
6131 *REAL_TO_LWORD |
|
6132 */ |
|
6133 case function_real_to_lword : |
|
6134 { |
|
6135 symbol_c *last_type_symbol = NULL; |
|
6136 |
|
6137 { |
|
6138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6139 symbol_c *IN_param_value = &this->default_variable_name; |
|
6140 |
|
6141 symbol_c *IN_type_symbol = param_data_type; |
|
6142 last_type_symbol = param_data_type; |
|
6143 |
|
6144 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
6145 { |
|
6146 |
|
6147 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6148 s4o.print("("); |
|
6149 return_type_symbol->accept(*this); |
|
6150 s4o.print(")"); |
|
6151 IN_param_value->accept(*this); |
|
6152 return NULL; |
|
6153 |
|
6154 } |
|
6155 |
|
6156 ERROR; |
|
6157 } |
|
6158 |
|
6159 }/*function_real_to_lword*/ |
|
6160 break; |
|
6161 |
|
6162 /**** |
|
6163 *LREAL_TO_BOOL |
|
6164 */ |
|
6165 case function_lreal_to_bool : |
|
6166 { |
|
6167 symbol_c *last_type_symbol = NULL; |
|
6168 |
|
6169 { |
|
6170 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6171 symbol_c *IN_param_value = &this->default_variable_name; |
|
6172 |
|
6173 symbol_c *IN_type_symbol = param_data_type; |
|
6174 last_type_symbol = param_data_type; |
|
6175 |
|
6176 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6177 { |
|
6178 |
|
6179 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
6180 s4o.print("("); |
|
6181 return_type_symbol->accept(*this); |
|
6182 s4o.print(")"); |
|
6183 IN_param_value->accept(*this); |
|
6184 return NULL; |
|
6185 |
|
6186 } |
|
6187 |
|
6188 ERROR; |
|
6189 } |
|
6190 |
|
6191 }/*function_lreal_to_bool*/ |
|
6192 break; |
|
6193 |
|
6194 /**** |
|
6195 *LREAL_TO_SINT |
|
6196 */ |
|
6197 case function_lreal_to_sint : |
|
6198 { |
|
6199 symbol_c *last_type_symbol = NULL; |
|
6200 |
|
6201 { |
|
6202 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6203 symbol_c *IN_param_value = &this->default_variable_name; |
|
6204 |
|
6205 symbol_c *IN_type_symbol = param_data_type; |
|
6206 last_type_symbol = param_data_type; |
|
6207 |
|
6208 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6209 { |
|
6210 |
|
6211 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6212 s4o.print("("); |
|
6213 return_type_symbol->accept(*this); |
|
6214 s4o.print(")"); |
|
6215 IN_param_value->accept(*this); |
|
6216 return NULL; |
|
6217 |
|
6218 } |
|
6219 |
|
6220 ERROR; |
|
6221 } |
|
6222 |
|
6223 }/*function_lreal_to_sint*/ |
|
6224 break; |
|
6225 |
|
6226 /**** |
|
6227 *LREAL_TO_INT |
|
6228 */ |
|
6229 case function_lreal_to_int : |
|
6230 { |
|
6231 symbol_c *last_type_symbol = NULL; |
|
6232 |
|
6233 { |
|
6234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6235 symbol_c *IN_param_value = &this->default_variable_name; |
|
6236 |
|
6237 symbol_c *IN_type_symbol = param_data_type; |
|
6238 last_type_symbol = param_data_type; |
|
6239 |
|
6240 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6241 { |
|
6242 |
|
6243 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6244 s4o.print("("); |
|
6245 return_type_symbol->accept(*this); |
|
6246 s4o.print(")"); |
|
6247 IN_param_value->accept(*this); |
|
6248 return NULL; |
|
6249 |
|
6250 } |
|
6251 |
|
6252 ERROR; |
|
6253 } |
|
6254 |
|
6255 }/*function_lreal_to_int*/ |
|
6256 break; |
|
6257 |
|
6258 /**** |
|
6259 *LREAL_TO_DINT |
|
6260 */ |
|
6261 case function_lreal_to_dint : |
|
6262 { |
|
6263 symbol_c *last_type_symbol = NULL; |
|
6264 |
|
6265 { |
|
6266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6267 symbol_c *IN_param_value = &this->default_variable_name; |
|
6268 |
|
6269 symbol_c *IN_type_symbol = param_data_type; |
|
6270 last_type_symbol = param_data_type; |
|
6271 |
|
6272 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6273 { |
|
6274 |
|
6275 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6276 s4o.print("("); |
|
6277 return_type_symbol->accept(*this); |
|
6278 s4o.print(")"); |
|
6279 IN_param_value->accept(*this); |
|
6280 return NULL; |
|
6281 |
|
6282 } |
|
6283 |
|
6284 ERROR; |
|
6285 } |
|
6286 |
|
6287 }/*function_lreal_to_dint*/ |
|
6288 break; |
|
6289 |
|
6290 /**** |
|
6291 *LREAL_TO_LINT |
|
6292 */ |
|
6293 case function_lreal_to_lint : |
|
6294 { |
|
6295 symbol_c *last_type_symbol = NULL; |
|
6296 |
|
6297 { |
|
6298 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6299 symbol_c *IN_param_value = &this->default_variable_name; |
|
6300 |
|
6301 symbol_c *IN_type_symbol = param_data_type; |
|
6302 last_type_symbol = param_data_type; |
|
6303 |
|
6304 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6305 { |
|
6306 |
|
6307 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6308 s4o.print("("); |
|
6309 return_type_symbol->accept(*this); |
|
6310 s4o.print(")"); |
|
6311 IN_param_value->accept(*this); |
|
6312 return NULL; |
|
6313 |
|
6314 } |
|
6315 |
|
6316 ERROR; |
|
6317 } |
|
6318 |
|
6319 }/*function_lreal_to_lint*/ |
|
6320 break; |
|
6321 |
|
6322 /**** |
|
6323 *LREAL_TO_USINT |
|
6324 */ |
|
6325 case function_lreal_to_usint : |
|
6326 { |
|
6327 symbol_c *last_type_symbol = NULL; |
|
6328 |
|
6329 { |
|
6330 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6331 symbol_c *IN_param_value = &this->default_variable_name; |
|
6332 |
|
6333 symbol_c *IN_type_symbol = param_data_type; |
|
6334 last_type_symbol = param_data_type; |
|
6335 |
|
6336 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6337 { |
|
6338 |
|
6339 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6340 s4o.print("("); |
|
6341 return_type_symbol->accept(*this); |
|
6342 s4o.print(")"); |
|
6343 IN_param_value->accept(*this); |
|
6344 return NULL; |
|
6345 |
|
6346 } |
|
6347 |
|
6348 ERROR; |
|
6349 } |
|
6350 |
|
6351 }/*function_lreal_to_usint*/ |
|
6352 break; |
|
6353 |
|
6354 /**** |
|
6355 *LREAL_TO_UINT |
|
6356 */ |
|
6357 case function_lreal_to_uint : |
|
6358 { |
|
6359 symbol_c *last_type_symbol = NULL; |
|
6360 |
|
6361 { |
|
6362 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6363 symbol_c *IN_param_value = &this->default_variable_name; |
|
6364 |
|
6365 symbol_c *IN_type_symbol = param_data_type; |
|
6366 last_type_symbol = param_data_type; |
|
6367 |
|
6368 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6369 { |
|
6370 |
|
6371 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6372 s4o.print("("); |
|
6373 return_type_symbol->accept(*this); |
|
6374 s4o.print(")"); |
|
6375 IN_param_value->accept(*this); |
|
6376 return NULL; |
|
6377 |
|
6378 } |
|
6379 |
|
6380 ERROR; |
|
6381 } |
|
6382 |
|
6383 }/*function_lreal_to_uint*/ |
|
6384 break; |
|
6385 |
|
6386 /**** |
|
6387 *LREAL_TO_UDINT |
|
6388 */ |
|
6389 case function_lreal_to_udint : |
|
6390 { |
|
6391 symbol_c *last_type_symbol = NULL; |
|
6392 |
|
6393 { |
|
6394 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6395 symbol_c *IN_param_value = &this->default_variable_name; |
|
6396 |
|
6397 symbol_c *IN_type_symbol = param_data_type; |
|
6398 last_type_symbol = param_data_type; |
|
6399 |
|
6400 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6401 { |
|
6402 |
|
6403 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6404 s4o.print("("); |
|
6405 return_type_symbol->accept(*this); |
|
6406 s4o.print(")"); |
|
6407 IN_param_value->accept(*this); |
|
6408 return NULL; |
|
6409 |
|
6410 } |
|
6411 |
|
6412 ERROR; |
|
6413 } |
|
6414 |
|
6415 }/*function_lreal_to_udint*/ |
|
6416 break; |
|
6417 |
|
6418 /**** |
|
6419 *LREAL_TO_ULINT |
|
6420 */ |
|
6421 case function_lreal_to_ulint : |
|
6422 { |
|
6423 symbol_c *last_type_symbol = NULL; |
|
6424 |
|
6425 { |
|
6426 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6427 symbol_c *IN_param_value = &this->default_variable_name; |
|
6428 |
|
6429 symbol_c *IN_type_symbol = param_data_type; |
|
6430 last_type_symbol = param_data_type; |
|
6431 |
|
6432 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6433 { |
|
6434 |
|
6435 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
6436 s4o.print("("); |
|
6437 return_type_symbol->accept(*this); |
|
6438 s4o.print(")"); |
|
6439 IN_param_value->accept(*this); |
|
6440 return NULL; |
|
6441 |
|
6442 } |
|
6443 |
|
6444 ERROR; |
|
6445 } |
|
6446 |
|
6447 }/*function_lreal_to_ulint*/ |
|
6448 break; |
|
6449 |
|
6450 /**** |
|
6451 *LREAL_TO_REAL |
|
6452 */ |
|
6453 case function_lreal_to_real : |
|
6454 { |
|
6455 symbol_c *last_type_symbol = NULL; |
|
6456 |
|
6457 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6465 { |
|
6466 |
|
6467 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
6468 s4o.print("("); |
|
6469 return_type_symbol->accept(*this); |
|
6470 s4o.print(")"); |
|
6471 IN_param_value->accept(*this); |
|
6472 return NULL; |
|
6473 |
|
6474 } |
|
6475 |
|
6476 ERROR; |
|
6477 } |
|
6478 |
|
6479 }/*function_lreal_to_real*/ |
|
6480 break; |
|
6481 |
|
6482 /**** |
|
6483 *LREAL_TO_TIME |
|
6484 */ |
|
6485 case function_lreal_to_time : |
|
6486 { |
|
6487 symbol_c *last_type_symbol = NULL; |
|
6488 |
|
6489 { |
|
6490 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6491 symbol_c *IN_param_value = &this->default_variable_name; |
|
6492 |
|
6493 symbol_c *IN_type_symbol = param_data_type; |
|
6494 last_type_symbol = param_data_type; |
|
6495 |
|
6496 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6497 { |
|
6498 |
|
6499 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
6500 s4o.print("("); |
|
6501 return_type_symbol->accept(*this); |
|
6502 s4o.print(")__real_to_time("); |
|
6503 IN_param_value->accept(*this); |
|
6504 s4o.print(")"); |
|
6505 return NULL; |
|
6506 |
|
6507 } |
|
6508 |
|
6509 ERROR; |
|
6510 } |
|
6511 |
|
6512 }/*function_lreal_to_time*/ |
|
6513 break; |
|
6514 |
|
6515 /**** |
|
6516 *LREAL_TO_DATE |
|
6517 */ |
|
6518 case function_lreal_to_date : |
|
6519 { |
|
6520 symbol_c *last_type_symbol = NULL; |
|
6521 |
|
6522 { |
|
6523 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6524 symbol_c *IN_param_value = &this->default_variable_name; |
|
6525 |
|
6526 symbol_c *IN_type_symbol = param_data_type; |
|
6527 last_type_symbol = param_data_type; |
|
6528 |
|
6529 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6530 { |
|
6531 |
|
6532 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
6533 s4o.print("("); |
|
6534 return_type_symbol->accept(*this); |
|
6535 s4o.print(")__real_to_time("); |
|
6536 IN_param_value->accept(*this); |
|
6537 s4o.print(")"); |
|
6538 return NULL; |
|
6539 |
|
6540 } |
|
6541 |
|
6542 ERROR; |
|
6543 } |
|
6544 |
|
6545 }/*function_lreal_to_date*/ |
|
6546 break; |
|
6547 |
|
6548 /**** |
|
6549 *LREAL_TO_TOD |
|
6550 */ |
|
6551 case function_lreal_to_tod : |
|
6552 { |
|
6553 symbol_c *last_type_symbol = NULL; |
|
6554 |
|
6555 { |
|
6556 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6557 symbol_c *IN_param_value = &this->default_variable_name; |
|
6558 |
|
6559 symbol_c *IN_type_symbol = param_data_type; |
|
6560 last_type_symbol = param_data_type; |
|
6561 |
|
6562 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6563 { |
|
6564 |
|
6565 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
6566 s4o.print("("); |
|
6567 return_type_symbol->accept(*this); |
|
6568 s4o.print(")__real_to_time("); |
|
6569 IN_param_value->accept(*this); |
|
6570 s4o.print(")"); |
|
6571 return NULL; |
|
6572 |
|
6573 } |
|
6574 |
|
6575 ERROR; |
|
6576 } |
|
6577 |
|
6578 }/*function_lreal_to_tod*/ |
|
6579 break; |
|
6580 |
|
6581 /**** |
|
6582 *LREAL_TO_DT |
|
6583 */ |
|
6584 case function_lreal_to_dt : |
|
6585 { |
|
6586 symbol_c *last_type_symbol = NULL; |
|
6587 |
|
6588 { |
|
6589 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6590 symbol_c *IN_param_value = &this->default_variable_name; |
|
6591 |
|
6592 symbol_c *IN_type_symbol = param_data_type; |
|
6593 last_type_symbol = param_data_type; |
|
6594 |
|
6595 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6596 { |
|
6597 |
|
6598 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
6599 s4o.print("("); |
|
6600 return_type_symbol->accept(*this); |
|
6601 s4o.print(")__real_to_time("); |
|
6602 IN_param_value->accept(*this); |
|
6603 s4o.print(")"); |
|
6604 return NULL; |
|
6605 |
|
6606 } |
|
6607 |
|
6608 ERROR; |
|
6609 } |
|
6610 |
|
6611 }/*function_lreal_to_dt*/ |
|
6612 break; |
|
6613 |
|
6614 /**** |
|
6615 *LREAL_TO_STRING |
|
6616 */ |
|
6617 case function_lreal_to_string : |
|
6618 { |
|
6619 symbol_c *last_type_symbol = NULL; |
|
6620 |
|
6621 { |
|
6622 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6623 symbol_c *IN_param_value = &this->default_variable_name; |
|
6624 |
|
6625 symbol_c *IN_type_symbol = param_data_type; |
|
6626 last_type_symbol = param_data_type; |
|
6627 |
|
6628 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6629 { |
|
6630 |
|
6631 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
6632 s4o.print("("); |
|
6633 return_type_symbol->accept(*this); |
|
6634 s4o.print(")__real_to_string("); |
|
6635 IN_param_value->accept(*this); |
|
6636 s4o.print(")"); |
|
6637 return NULL; |
|
6638 |
|
6639 } |
|
6640 |
|
6641 ERROR; |
|
6642 } |
|
6643 |
|
6644 }/*function_lreal_to_string*/ |
|
6645 break; |
|
6646 |
|
6647 /**** |
|
6648 *LREAL_TO_BYTE |
|
6649 */ |
|
6650 case function_lreal_to_byte : |
|
6651 { |
|
6652 symbol_c *last_type_symbol = NULL; |
|
6653 |
|
6654 { |
|
6655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6656 symbol_c *IN_param_value = &this->default_variable_name; |
|
6657 |
|
6658 symbol_c *IN_type_symbol = param_data_type; |
|
6659 last_type_symbol = param_data_type; |
|
6660 |
|
6661 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6662 { |
|
6663 |
|
6664 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
6665 s4o.print("("); |
|
6666 return_type_symbol->accept(*this); |
|
6667 s4o.print(")"); |
|
6668 IN_param_value->accept(*this); |
|
6669 return NULL; |
|
6670 |
|
6671 } |
|
6672 |
|
6673 ERROR; |
|
6674 } |
|
6675 |
|
6676 }/*function_lreal_to_byte*/ |
|
6677 break; |
|
6678 |
|
6679 /**** |
|
6680 *LREAL_TO_WORD |
|
6681 */ |
|
6682 case function_lreal_to_word : |
|
6683 { |
|
6684 symbol_c *last_type_symbol = NULL; |
|
6685 |
|
6686 { |
|
6687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6688 symbol_c *IN_param_value = &this->default_variable_name; |
|
6689 |
|
6690 symbol_c *IN_type_symbol = param_data_type; |
|
6691 last_type_symbol = param_data_type; |
|
6692 |
|
6693 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6694 { |
|
6695 |
|
6696 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
6697 s4o.print("("); |
|
6698 return_type_symbol->accept(*this); |
|
6699 s4o.print(")"); |
|
6700 IN_param_value->accept(*this); |
|
6701 return NULL; |
|
6702 |
|
6703 } |
|
6704 |
|
6705 ERROR; |
|
6706 } |
|
6707 |
|
6708 }/*function_lreal_to_word*/ |
|
6709 break; |
|
6710 |
|
6711 /**** |
|
6712 *LREAL_TO_DWORD |
|
6713 */ |
|
6714 case function_lreal_to_dword : |
|
6715 { |
|
6716 symbol_c *last_type_symbol = NULL; |
|
6717 |
|
6718 { |
|
6719 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6720 symbol_c *IN_param_value = &this->default_variable_name; |
|
6721 |
|
6722 symbol_c *IN_type_symbol = param_data_type; |
|
6723 last_type_symbol = param_data_type; |
|
6724 |
|
6725 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6726 { |
|
6727 |
|
6728 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
6729 s4o.print("("); |
|
6730 return_type_symbol->accept(*this); |
|
6731 s4o.print(")"); |
|
6732 IN_param_value->accept(*this); |
|
6733 return NULL; |
|
6734 |
|
6735 } |
|
6736 |
|
6737 ERROR; |
|
6738 } |
|
6739 |
|
6740 }/*function_lreal_to_dword*/ |
|
6741 break; |
|
6742 |
|
6743 /**** |
|
6744 *LREAL_TO_LWORD |
|
6745 */ |
|
6746 case function_lreal_to_lword : |
|
6747 { |
|
6748 symbol_c *last_type_symbol = NULL; |
|
6749 |
|
6750 { |
|
6751 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6752 symbol_c *IN_param_value = &this->default_variable_name; |
|
6753 |
|
6754 symbol_c *IN_type_symbol = param_data_type; |
|
6755 last_type_symbol = param_data_type; |
|
6756 |
|
6757 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
6758 { |
|
6759 |
|
6760 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
6761 s4o.print("("); |
|
6762 return_type_symbol->accept(*this); |
|
6763 s4o.print(")"); |
|
6764 IN_param_value->accept(*this); |
|
6765 return NULL; |
|
6766 |
|
6767 } |
|
6768 |
|
6769 ERROR; |
|
6770 } |
|
6771 |
|
6772 }/*function_lreal_to_lword*/ |
|
6773 break; |
|
6774 |
|
6775 /**** |
|
6776 *TIME_TO_SINT |
|
6777 */ |
|
6778 case function_time_to_sint : |
|
6779 { |
|
6780 symbol_c *last_type_symbol = NULL; |
|
6781 |
|
6782 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6790 { |
|
6791 |
|
6792 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
6793 s4o.print("("); |
|
6794 return_type_symbol->accept(*this); |
|
6795 s4o.print(")__time_to_int("); |
|
6796 IN_param_value->accept(*this); |
|
6797 s4o.print(")"); |
|
6798 return NULL; |
|
6799 |
|
6800 } |
|
6801 |
|
6802 ERROR; |
|
6803 } |
|
6804 |
|
6805 }/*function_time_to_sint*/ |
|
6806 break; |
|
6807 |
|
6808 /**** |
|
6809 *TIME_TO_INT |
|
6810 */ |
|
6811 case function_time_to_int : |
|
6812 { |
|
6813 symbol_c *last_type_symbol = NULL; |
|
6814 |
|
6815 { |
|
6816 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6817 symbol_c *IN_param_value = &this->default_variable_name; |
|
6818 |
|
6819 symbol_c *IN_type_symbol = param_data_type; |
|
6820 last_type_symbol = param_data_type; |
|
6821 |
|
6822 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6823 { |
|
6824 |
|
6825 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
6826 s4o.print("("); |
|
6827 return_type_symbol->accept(*this); |
|
6828 s4o.print(")__time_to_int("); |
|
6829 IN_param_value->accept(*this); |
|
6830 s4o.print(")"); |
|
6831 return NULL; |
|
6832 |
|
6833 } |
|
6834 |
|
6835 ERROR; |
|
6836 } |
|
6837 |
|
6838 }/*function_time_to_int*/ |
|
6839 break; |
|
6840 |
|
6841 /**** |
|
6842 *TIME_TO_DINT |
|
6843 */ |
|
6844 case function_time_to_dint : |
|
6845 { |
|
6846 symbol_c *last_type_symbol = NULL; |
|
6847 |
|
6848 { |
|
6849 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6850 symbol_c *IN_param_value = &this->default_variable_name; |
|
6851 |
|
6852 symbol_c *IN_type_symbol = param_data_type; |
|
6853 last_type_symbol = param_data_type; |
|
6854 |
|
6855 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6856 { |
|
6857 |
|
6858 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
6859 s4o.print("("); |
|
6860 return_type_symbol->accept(*this); |
|
6861 s4o.print(")__time_to_int("); |
|
6862 IN_param_value->accept(*this); |
|
6863 s4o.print(")"); |
|
6864 return NULL; |
|
6865 |
|
6866 } |
|
6867 |
|
6868 ERROR; |
|
6869 } |
|
6870 |
|
6871 }/*function_time_to_dint*/ |
|
6872 break; |
|
6873 |
|
6874 /**** |
|
6875 *TIME_TO_LINT |
|
6876 */ |
|
6877 case function_time_to_lint : |
|
6878 { |
|
6879 symbol_c *last_type_symbol = NULL; |
|
6880 |
|
6881 { |
|
6882 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6883 symbol_c *IN_param_value = &this->default_variable_name; |
|
6884 |
|
6885 symbol_c *IN_type_symbol = param_data_type; |
|
6886 last_type_symbol = param_data_type; |
|
6887 |
|
6888 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6889 { |
|
6890 |
|
6891 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
6892 s4o.print("("); |
|
6893 return_type_symbol->accept(*this); |
|
6894 s4o.print(")__time_to_int("); |
|
6895 IN_param_value->accept(*this); |
|
6896 s4o.print(")"); |
|
6897 return NULL; |
|
6898 |
|
6899 } |
|
6900 |
|
6901 ERROR; |
|
6902 } |
|
6903 |
|
6904 }/*function_time_to_lint*/ |
|
6905 break; |
|
6906 |
|
6907 /**** |
|
6908 *TIME_TO_USINT |
|
6909 */ |
|
6910 case function_time_to_usint : |
|
6911 { |
|
6912 symbol_c *last_type_symbol = NULL; |
|
6913 |
|
6914 { |
|
6915 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6916 symbol_c *IN_param_value = &this->default_variable_name; |
|
6917 |
|
6918 symbol_c *IN_type_symbol = param_data_type; |
|
6919 last_type_symbol = param_data_type; |
|
6920 |
|
6921 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6922 { |
|
6923 |
|
6924 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
6925 s4o.print("("); |
|
6926 return_type_symbol->accept(*this); |
|
6927 s4o.print(")__time_to_int("); |
|
6928 IN_param_value->accept(*this); |
|
6929 s4o.print(")"); |
|
6930 return NULL; |
|
6931 |
|
6932 } |
|
6933 |
|
6934 ERROR; |
|
6935 } |
|
6936 |
|
6937 }/*function_time_to_usint*/ |
|
6938 break; |
|
6939 |
|
6940 /**** |
|
6941 *TIME_TO_UINT |
|
6942 */ |
|
6943 case function_time_to_uint : |
|
6944 { |
|
6945 symbol_c *last_type_symbol = NULL; |
|
6946 |
|
6947 { |
|
6948 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6949 symbol_c *IN_param_value = &this->default_variable_name; |
|
6950 |
|
6951 symbol_c *IN_type_symbol = param_data_type; |
|
6952 last_type_symbol = param_data_type; |
|
6953 |
|
6954 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6955 { |
|
6956 |
|
6957 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
6958 s4o.print("("); |
|
6959 return_type_symbol->accept(*this); |
|
6960 s4o.print(")__time_to_int("); |
|
6961 IN_param_value->accept(*this); |
|
6962 s4o.print(")"); |
|
6963 return NULL; |
|
6964 |
|
6965 } |
|
6966 |
|
6967 ERROR; |
|
6968 } |
|
6969 |
|
6970 }/*function_time_to_uint*/ |
|
6971 break; |
|
6972 |
|
6973 /**** |
|
6974 *TIME_TO_UDINT |
|
6975 */ |
|
6976 case function_time_to_udint : |
|
6977 { |
|
6978 symbol_c *last_type_symbol = NULL; |
|
6979 |
|
6980 { |
|
6981 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
6982 symbol_c *IN_param_value = &this->default_variable_name; |
|
6983 |
|
6984 symbol_c *IN_type_symbol = param_data_type; |
|
6985 last_type_symbol = param_data_type; |
|
6986 |
|
6987 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
6988 { |
|
6989 |
|
6990 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
6991 s4o.print("("); |
|
6992 return_type_symbol->accept(*this); |
|
6993 s4o.print(")__time_to_int("); |
|
6994 IN_param_value->accept(*this); |
|
6995 s4o.print(")"); |
|
6996 return NULL; |
|
6997 |
|
6998 } |
|
6999 |
|
7000 ERROR; |
|
7001 } |
|
7002 |
|
7003 }/*function_time_to_udint*/ |
|
7004 break; |
|
7005 |
|
7006 /**** |
|
7007 *TIME_TO_ULINT |
|
7008 */ |
|
7009 case function_time_to_ulint : |
|
7010 { |
|
7011 symbol_c *last_type_symbol = NULL; |
|
7012 |
|
7013 { |
|
7014 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7015 symbol_c *IN_param_value = &this->default_variable_name; |
|
7016 |
|
7017 symbol_c *IN_type_symbol = param_data_type; |
|
7018 last_type_symbol = param_data_type; |
|
7019 |
|
7020 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7021 { |
|
7022 |
|
7023 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7024 s4o.print("("); |
|
7025 return_type_symbol->accept(*this); |
|
7026 s4o.print(")__time_to_int("); |
|
7027 IN_param_value->accept(*this); |
|
7028 s4o.print(")"); |
|
7029 return NULL; |
|
7030 |
|
7031 } |
|
7032 |
|
7033 ERROR; |
|
7034 } |
|
7035 |
|
7036 }/*function_time_to_ulint*/ |
|
7037 break; |
|
7038 |
|
7039 /**** |
|
7040 *TIME_TO_REAL |
|
7041 */ |
|
7042 case function_time_to_real : |
|
7043 { |
|
7044 symbol_c *last_type_symbol = NULL; |
|
7045 |
|
7046 { |
|
7047 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7048 symbol_c *IN_param_value = &this->default_variable_name; |
|
7049 |
|
7050 symbol_c *IN_type_symbol = param_data_type; |
|
7051 last_type_symbol = param_data_type; |
|
7052 |
|
7053 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7054 { |
|
7055 |
|
7056 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7057 s4o.print("("); |
|
7058 return_type_symbol->accept(*this); |
|
7059 s4o.print(")__time_to_real("); |
|
7060 IN_param_value->accept(*this); |
|
7061 s4o.print(")"); |
|
7062 return NULL; |
|
7063 |
|
7064 } |
|
7065 |
|
7066 ERROR; |
|
7067 } |
|
7068 |
|
7069 }/*function_time_to_real*/ |
|
7070 break; |
|
7071 |
|
7072 /**** |
|
7073 *TIME_TO_LREAL |
|
7074 */ |
|
7075 case function_time_to_lreal : |
|
7076 { |
|
7077 symbol_c *last_type_symbol = NULL; |
|
7078 |
|
7079 { |
|
7080 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7081 symbol_c *IN_param_value = &this->default_variable_name; |
|
7082 |
|
7083 symbol_c *IN_type_symbol = param_data_type; |
|
7084 last_type_symbol = param_data_type; |
|
7085 |
|
7086 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7087 { |
|
7088 |
|
7089 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7090 s4o.print("("); |
|
7091 return_type_symbol->accept(*this); |
|
7092 s4o.print(")__time_to_real("); |
|
7093 IN_param_value->accept(*this); |
|
7094 s4o.print(")"); |
|
7095 return NULL; |
|
7096 |
|
7097 } |
|
7098 |
|
7099 ERROR; |
|
7100 } |
|
7101 |
|
7102 }/*function_time_to_lreal*/ |
|
7103 break; |
|
7104 |
|
7105 /**** |
|
7106 *TIME_TO_STRING |
|
7107 */ |
|
7108 case function_time_to_string : |
|
7109 { |
|
7110 symbol_c *last_type_symbol = NULL; |
|
7111 |
|
7112 { |
|
7113 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7114 symbol_c *IN_param_value = &this->default_variable_name; |
|
7115 |
|
7116 symbol_c *IN_type_symbol = param_data_type; |
|
7117 last_type_symbol = param_data_type; |
|
7118 |
|
7119 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7120 { |
|
7121 |
|
7122 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7123 s4o.print("("); |
|
7124 return_type_symbol->accept(*this); |
|
7125 s4o.print(")__time_to_string("); |
|
7126 IN_param_value->accept(*this); |
|
7127 s4o.print(")"); |
|
7128 return NULL; |
|
7129 |
|
7130 } |
|
7131 |
|
7132 ERROR; |
|
7133 } |
|
7134 |
|
7135 }/*function_time_to_string*/ |
|
7136 break; |
|
7137 |
|
7138 /**** |
|
7139 *TIME_TO_BYTE |
|
7140 */ |
|
7141 case function_time_to_byte : |
|
7142 { |
|
7143 symbol_c *last_type_symbol = NULL; |
|
7144 |
|
7145 { |
|
7146 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7147 symbol_c *IN_param_value = &this->default_variable_name; |
|
7148 |
|
7149 symbol_c *IN_type_symbol = param_data_type; |
|
7150 last_type_symbol = param_data_type; |
|
7151 |
|
7152 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7153 { |
|
7154 |
|
7155 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7156 s4o.print("("); |
|
7157 return_type_symbol->accept(*this); |
|
7158 s4o.print(")__time_to_int("); |
|
7159 IN_param_value->accept(*this); |
|
7160 s4o.print(")"); |
|
7161 return NULL; |
|
7162 |
|
7163 } |
|
7164 |
|
7165 ERROR; |
|
7166 } |
|
7167 |
|
7168 }/*function_time_to_byte*/ |
|
7169 break; |
|
7170 |
|
7171 /**** |
|
7172 *TIME_TO_WORD |
|
7173 */ |
|
7174 case function_time_to_word : |
|
7175 { |
|
7176 symbol_c *last_type_symbol = NULL; |
|
7177 |
|
7178 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7186 { |
|
7187 |
|
7188 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7189 s4o.print("("); |
|
7190 return_type_symbol->accept(*this); |
|
7191 s4o.print(")__time_to_int("); |
|
7192 IN_param_value->accept(*this); |
|
7193 s4o.print(")"); |
|
7194 return NULL; |
|
7195 |
|
7196 } |
|
7197 |
|
7198 ERROR; |
|
7199 } |
|
7200 |
|
7201 }/*function_time_to_word*/ |
|
7202 break; |
|
7203 |
|
7204 /**** |
|
7205 *TIME_TO_DWORD |
|
7206 */ |
|
7207 case function_time_to_dword : |
|
7208 { |
|
7209 symbol_c *last_type_symbol = NULL; |
|
7210 |
|
7211 { |
|
7212 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7213 symbol_c *IN_param_value = &this->default_variable_name; |
|
7214 |
|
7215 symbol_c *IN_type_symbol = param_data_type; |
|
7216 last_type_symbol = param_data_type; |
|
7217 |
|
7218 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7219 { |
|
7220 |
|
7221 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7222 s4o.print("("); |
|
7223 return_type_symbol->accept(*this); |
|
7224 s4o.print(")__time_to_int("); |
|
7225 IN_param_value->accept(*this); |
|
7226 s4o.print(")"); |
|
7227 return NULL; |
|
7228 |
|
7229 } |
|
7230 |
|
7231 ERROR; |
|
7232 } |
|
7233 |
|
7234 }/*function_time_to_dword*/ |
|
7235 break; |
|
7236 |
|
7237 /**** |
|
7238 *TIME_TO_LWORD |
|
7239 */ |
|
7240 case function_time_to_lword : |
|
7241 { |
|
7242 symbol_c *last_type_symbol = NULL; |
|
7243 |
|
7244 { |
|
7245 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7246 symbol_c *IN_param_value = &this->default_variable_name; |
|
7247 |
|
7248 symbol_c *IN_type_symbol = param_data_type; |
|
7249 last_type_symbol = param_data_type; |
|
7250 |
|
7251 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
|
7252 { |
|
7253 |
|
7254 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
7255 s4o.print("("); |
|
7256 return_type_symbol->accept(*this); |
|
7257 s4o.print(")__time_to_int("); |
|
7258 IN_param_value->accept(*this); |
|
7259 s4o.print(")"); |
|
7260 return NULL; |
|
7261 |
|
7262 } |
|
7263 |
|
7264 ERROR; |
|
7265 } |
|
7266 |
|
7267 }/*function_time_to_lword*/ |
|
7268 break; |
|
7269 |
|
7270 /**** |
|
7271 *DATE_TO_SINT |
|
7272 */ |
|
7273 case function_date_to_sint : |
|
7274 { |
|
7275 symbol_c *last_type_symbol = NULL; |
|
7276 |
|
7277 { |
|
7278 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7279 symbol_c *IN_param_value = &this->default_variable_name; |
|
7280 |
|
7281 symbol_c *IN_type_symbol = param_data_type; |
|
7282 last_type_symbol = param_data_type; |
|
7283 |
|
7284 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7285 { |
|
7286 |
|
7287 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7288 s4o.print("("); |
|
7289 return_type_symbol->accept(*this); |
|
7290 s4o.print(")__time_to_int("); |
|
7291 IN_param_value->accept(*this); |
|
7292 s4o.print(")"); |
|
7293 return NULL; |
|
7294 |
|
7295 } |
|
7296 |
|
7297 ERROR; |
|
7298 } |
|
7299 |
|
7300 }/*function_date_to_sint*/ |
|
7301 break; |
|
7302 |
|
7303 /**** |
|
7304 *DATE_TO_INT |
|
7305 */ |
|
7306 case function_date_to_int : |
|
7307 { |
|
7308 symbol_c *last_type_symbol = NULL; |
|
7309 |
|
7310 { |
|
7311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7312 symbol_c *IN_param_value = &this->default_variable_name; |
|
7313 |
|
7314 symbol_c *IN_type_symbol = param_data_type; |
|
7315 last_type_symbol = param_data_type; |
|
7316 |
|
7317 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7318 { |
|
7319 |
|
7320 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7321 s4o.print("("); |
|
7322 return_type_symbol->accept(*this); |
|
7323 s4o.print(")__time_to_int("); |
|
7324 IN_param_value->accept(*this); |
|
7325 s4o.print(")"); |
|
7326 return NULL; |
|
7327 |
|
7328 } |
|
7329 |
|
7330 ERROR; |
|
7331 } |
|
7332 |
|
7333 }/*function_date_to_int*/ |
|
7334 break; |
|
7335 |
|
7336 /**** |
|
7337 *DATE_TO_DINT |
|
7338 */ |
|
7339 case function_date_to_dint : |
|
7340 { |
|
7341 symbol_c *last_type_symbol = NULL; |
|
7342 |
|
7343 { |
|
7344 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7345 symbol_c *IN_param_value = &this->default_variable_name; |
|
7346 |
|
7347 symbol_c *IN_type_symbol = param_data_type; |
|
7348 last_type_symbol = param_data_type; |
|
7349 |
|
7350 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7351 { |
|
7352 |
|
7353 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7354 s4o.print("("); |
|
7355 return_type_symbol->accept(*this); |
|
7356 s4o.print(")__time_to_int("); |
|
7357 IN_param_value->accept(*this); |
|
7358 s4o.print(")"); |
|
7359 return NULL; |
|
7360 |
|
7361 } |
|
7362 |
|
7363 ERROR; |
|
7364 } |
|
7365 |
|
7366 }/*function_date_to_dint*/ |
|
7367 break; |
|
7368 |
|
7369 /**** |
|
7370 *DATE_TO_LINT |
|
7371 */ |
|
7372 case function_date_to_lint : |
|
7373 { |
|
7374 symbol_c *last_type_symbol = NULL; |
|
7375 |
|
7376 { |
|
7377 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7378 symbol_c *IN_param_value = &this->default_variable_name; |
|
7379 |
|
7380 symbol_c *IN_type_symbol = param_data_type; |
|
7381 last_type_symbol = param_data_type; |
|
7382 |
|
7383 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7384 { |
|
7385 |
|
7386 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7387 s4o.print("("); |
|
7388 return_type_symbol->accept(*this); |
|
7389 s4o.print(")__time_to_int("); |
|
7390 IN_param_value->accept(*this); |
|
7391 s4o.print(")"); |
|
7392 return NULL; |
|
7393 |
|
7394 } |
|
7395 |
|
7396 ERROR; |
|
7397 } |
|
7398 |
|
7399 }/*function_date_to_lint*/ |
|
7400 break; |
|
7401 |
|
7402 /**** |
|
7403 *DATE_TO_USINT |
|
7404 */ |
|
7405 case function_date_to_usint : |
|
7406 { |
|
7407 symbol_c *last_type_symbol = NULL; |
|
7408 |
|
7409 { |
|
7410 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7411 symbol_c *IN_param_value = &this->default_variable_name; |
|
7412 |
|
7413 symbol_c *IN_type_symbol = param_data_type; |
|
7414 last_type_symbol = param_data_type; |
|
7415 |
|
7416 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7417 { |
|
7418 |
|
7419 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7420 s4o.print("("); |
|
7421 return_type_symbol->accept(*this); |
|
7422 s4o.print(")__time_to_int("); |
|
7423 IN_param_value->accept(*this); |
|
7424 s4o.print(")"); |
|
7425 return NULL; |
|
7426 |
|
7427 } |
|
7428 |
|
7429 ERROR; |
|
7430 } |
|
7431 |
|
7432 }/*function_date_to_usint*/ |
|
7433 break; |
|
7434 |
|
7435 /**** |
|
7436 *DATE_TO_UINT |
|
7437 */ |
|
7438 case function_date_to_uint : |
|
7439 { |
|
7440 symbol_c *last_type_symbol = NULL; |
|
7441 |
|
7442 { |
|
7443 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7444 symbol_c *IN_param_value = &this->default_variable_name; |
|
7445 |
|
7446 symbol_c *IN_type_symbol = param_data_type; |
|
7447 last_type_symbol = param_data_type; |
|
7448 |
|
7449 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7450 { |
|
7451 |
|
7452 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7453 s4o.print("("); |
|
7454 return_type_symbol->accept(*this); |
|
7455 s4o.print(")__time_to_int("); |
|
7456 IN_param_value->accept(*this); |
|
7457 s4o.print(")"); |
|
7458 return NULL; |
|
7459 |
|
7460 } |
|
7461 |
|
7462 ERROR; |
|
7463 } |
|
7464 |
|
7465 }/*function_date_to_uint*/ |
|
7466 break; |
|
7467 |
|
7468 /**** |
|
7469 *DATE_TO_UDINT |
|
7470 */ |
|
7471 case function_date_to_udint : |
|
7472 { |
|
7473 symbol_c *last_type_symbol = NULL; |
|
7474 |
|
7475 { |
|
7476 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7477 symbol_c *IN_param_value = &this->default_variable_name; |
|
7478 |
|
7479 symbol_c *IN_type_symbol = param_data_type; |
|
7480 last_type_symbol = param_data_type; |
|
7481 |
|
7482 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7483 { |
|
7484 |
|
7485 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7486 s4o.print("("); |
|
7487 return_type_symbol->accept(*this); |
|
7488 s4o.print(")__time_to_int("); |
|
7489 IN_param_value->accept(*this); |
|
7490 s4o.print(")"); |
|
7491 return NULL; |
|
7492 |
|
7493 } |
|
7494 |
|
7495 ERROR; |
|
7496 } |
|
7497 |
|
7498 }/*function_date_to_udint*/ |
|
7499 break; |
|
7500 |
|
7501 /**** |
|
7502 *DATE_TO_ULINT |
|
7503 */ |
|
7504 case function_date_to_ulint : |
|
7505 { |
|
7506 symbol_c *last_type_symbol = NULL; |
|
7507 |
|
7508 { |
|
7509 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7510 symbol_c *IN_param_value = &this->default_variable_name; |
|
7511 |
|
7512 symbol_c *IN_type_symbol = param_data_type; |
|
7513 last_type_symbol = param_data_type; |
|
7514 |
|
7515 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7516 { |
|
7517 |
|
7518 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
7519 s4o.print("("); |
|
7520 return_type_symbol->accept(*this); |
|
7521 s4o.print(")__time_to_int("); |
|
7522 IN_param_value->accept(*this); |
|
7523 s4o.print(")"); |
|
7524 return NULL; |
|
7525 |
|
7526 } |
|
7527 |
|
7528 ERROR; |
|
7529 } |
|
7530 |
|
7531 }/*function_date_to_ulint*/ |
|
7532 break; |
|
7533 |
|
7534 /**** |
|
7535 *DATE_TO_REAL |
|
7536 */ |
|
7537 case function_date_to_real : |
|
7538 { |
|
7539 symbol_c *last_type_symbol = NULL; |
|
7540 |
|
7541 { |
|
7542 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7543 symbol_c *IN_param_value = &this->default_variable_name; |
|
7544 |
|
7545 symbol_c *IN_type_symbol = param_data_type; |
|
7546 last_type_symbol = param_data_type; |
|
7547 |
|
7548 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7549 { |
|
7550 |
|
7551 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
7552 s4o.print("("); |
|
7553 return_type_symbol->accept(*this); |
|
7554 s4o.print(")__time_to_real("); |
|
7555 IN_param_value->accept(*this); |
|
7556 s4o.print(")"); |
|
7557 return NULL; |
|
7558 |
|
7559 } |
|
7560 |
|
7561 ERROR; |
|
7562 } |
|
7563 |
|
7564 }/*function_date_to_real*/ |
|
7565 break; |
|
7566 |
|
7567 /**** |
|
7568 *DATE_TO_LREAL |
|
7569 */ |
|
7570 case function_date_to_lreal : |
|
7571 { |
|
7572 symbol_c *last_type_symbol = NULL; |
|
7573 |
|
7574 { |
|
7575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7576 symbol_c *IN_param_value = &this->default_variable_name; |
|
7577 |
|
7578 symbol_c *IN_type_symbol = param_data_type; |
|
7579 last_type_symbol = param_data_type; |
|
7580 |
|
7581 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7582 { |
|
7583 |
|
7584 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
7585 s4o.print("("); |
|
7586 return_type_symbol->accept(*this); |
|
7587 s4o.print(")__time_to_real("); |
|
7588 IN_param_value->accept(*this); |
|
7589 s4o.print(")"); |
|
7590 return NULL; |
|
7591 |
|
7592 } |
|
7593 |
|
7594 ERROR; |
|
7595 } |
|
7596 |
|
7597 }/*function_date_to_lreal*/ |
|
7598 break; |
|
7599 |
|
7600 /**** |
|
7601 *DATE_TO_STRING |
|
7602 */ |
|
7603 case function_date_to_string : |
|
7604 { |
|
7605 symbol_c *last_type_symbol = NULL; |
|
7606 |
|
7607 { |
|
7608 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7609 symbol_c *IN_param_value = &this->default_variable_name; |
|
7610 |
|
7611 symbol_c *IN_type_symbol = param_data_type; |
|
7612 last_type_symbol = param_data_type; |
|
7613 |
|
7614 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7615 { |
|
7616 |
|
7617 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
7618 s4o.print("("); |
|
7619 return_type_symbol->accept(*this); |
|
7620 s4o.print(")__date_to_string("); |
|
7621 IN_param_value->accept(*this); |
|
7622 s4o.print(")"); |
|
7623 return NULL; |
|
7624 |
|
7625 } |
|
7626 |
|
7627 ERROR; |
|
7628 } |
|
7629 |
|
7630 }/*function_date_to_string*/ |
|
7631 break; |
|
7632 |
|
7633 /**** |
|
7634 *DATE_TO_BYTE |
|
7635 */ |
|
7636 case function_date_to_byte : |
|
7637 { |
|
7638 symbol_c *last_type_symbol = NULL; |
|
7639 |
|
7640 { |
|
7641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7642 symbol_c *IN_param_value = &this->default_variable_name; |
|
7643 |
|
7644 symbol_c *IN_type_symbol = param_data_type; |
|
7645 last_type_symbol = param_data_type; |
|
7646 |
|
7647 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7648 { |
|
7649 |
|
7650 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
7651 s4o.print("("); |
|
7652 return_type_symbol->accept(*this); |
|
7653 s4o.print(")__time_to_int("); |
|
7654 IN_param_value->accept(*this); |
|
7655 s4o.print(")"); |
|
7656 return NULL; |
|
7657 |
|
7658 } |
|
7659 |
|
7660 ERROR; |
|
7661 } |
|
7662 |
|
7663 }/*function_date_to_byte*/ |
|
7664 break; |
|
7665 |
|
7666 /**** |
|
7667 *DATE_TO_WORD |
|
7668 */ |
|
7669 case function_date_to_word : |
|
7670 { |
|
7671 symbol_c *last_type_symbol = NULL; |
|
7672 |
|
7673 { |
|
7674 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7675 symbol_c *IN_param_value = &this->default_variable_name; |
|
7676 |
|
7677 symbol_c *IN_type_symbol = param_data_type; |
|
7678 last_type_symbol = param_data_type; |
|
7679 |
|
7680 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7681 { |
|
7682 |
|
7683 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
7684 s4o.print("("); |
|
7685 return_type_symbol->accept(*this); |
|
7686 s4o.print(")__time_to_int("); |
|
7687 IN_param_value->accept(*this); |
|
7688 s4o.print(")"); |
|
7689 return NULL; |
|
7690 |
|
7691 } |
|
7692 |
|
7693 ERROR; |
|
7694 } |
|
7695 |
|
7696 }/*function_date_to_word*/ |
|
7697 break; |
|
7698 |
|
7699 /**** |
|
7700 *DATE_TO_DWORD |
|
7701 */ |
|
7702 case function_date_to_dword : |
|
7703 { |
|
7704 symbol_c *last_type_symbol = NULL; |
|
7705 |
|
7706 { |
|
7707 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7708 symbol_c *IN_param_value = &this->default_variable_name; |
|
7709 |
|
7710 symbol_c *IN_type_symbol = param_data_type; |
|
7711 last_type_symbol = param_data_type; |
|
7712 |
|
7713 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7714 { |
|
7715 |
|
7716 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
7717 s4o.print("("); |
|
7718 return_type_symbol->accept(*this); |
|
7719 s4o.print(")__time_to_int("); |
|
7720 IN_param_value->accept(*this); |
|
7721 s4o.print(")"); |
|
7722 return NULL; |
|
7723 |
|
7724 } |
|
7725 |
|
7726 ERROR; |
|
7727 } |
|
7728 |
|
7729 }/*function_date_to_dword*/ |
|
7730 break; |
|
7731 |
|
7732 /**** |
|
7733 *DATE_TO_LWORD |
|
7734 */ |
|
7735 case function_date_to_lword : |
|
7736 { |
|
7737 symbol_c *last_type_symbol = NULL; |
|
7738 |
|
7739 { |
|
7740 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7741 symbol_c *IN_param_value = &this->default_variable_name; |
|
7742 |
|
7743 symbol_c *IN_type_symbol = param_data_type; |
|
7744 last_type_symbol = param_data_type; |
|
7745 |
|
7746 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
|
7747 { |
|
7748 |
|
7749 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
7750 s4o.print("("); |
|
7751 return_type_symbol->accept(*this); |
|
7752 s4o.print(")__time_to_int("); |
|
7753 IN_param_value->accept(*this); |
|
7754 s4o.print(")"); |
|
7755 return NULL; |
|
7756 |
|
7757 } |
|
7758 |
|
7759 ERROR; |
|
7760 } |
|
7761 |
|
7762 }/*function_date_to_lword*/ |
|
7763 break; |
|
7764 |
|
7765 /**** |
|
7766 *TOD_TO_SINT |
|
7767 */ |
|
7768 case function_tod_to_sint : |
|
7769 { |
|
7770 symbol_c *last_type_symbol = NULL; |
|
7771 |
|
7772 { |
|
7773 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7774 symbol_c *IN_param_value = &this->default_variable_name; |
|
7775 |
|
7776 symbol_c *IN_type_symbol = param_data_type; |
|
7777 last_type_symbol = param_data_type; |
|
7778 |
|
7779 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7780 { |
|
7781 |
|
7782 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
7783 s4o.print("("); |
|
7784 return_type_symbol->accept(*this); |
|
7785 s4o.print(")__time_to_int("); |
|
7786 IN_param_value->accept(*this); |
|
7787 s4o.print(")"); |
|
7788 return NULL; |
|
7789 |
|
7790 } |
|
7791 |
|
7792 ERROR; |
|
7793 } |
|
7794 |
|
7795 }/*function_tod_to_sint*/ |
|
7796 break; |
|
7797 |
|
7798 /**** |
|
7799 *TOD_TO_INT |
|
7800 */ |
|
7801 case function_tod_to_int : |
|
7802 { |
|
7803 symbol_c *last_type_symbol = NULL; |
|
7804 |
|
7805 { |
|
7806 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7807 symbol_c *IN_param_value = &this->default_variable_name; |
|
7808 |
|
7809 symbol_c *IN_type_symbol = param_data_type; |
|
7810 last_type_symbol = param_data_type; |
|
7811 |
|
7812 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7813 { |
|
7814 |
|
7815 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
7816 s4o.print("("); |
|
7817 return_type_symbol->accept(*this); |
|
7818 s4o.print(")__time_to_int("); |
|
7819 IN_param_value->accept(*this); |
|
7820 s4o.print(")"); |
|
7821 return NULL; |
|
7822 |
|
7823 } |
|
7824 |
|
7825 ERROR; |
|
7826 } |
|
7827 |
|
7828 }/*function_tod_to_int*/ |
|
7829 break; |
|
7830 |
|
7831 /**** |
|
7832 *TOD_TO_DINT |
|
7833 */ |
|
7834 case function_tod_to_dint : |
|
7835 { |
|
7836 symbol_c *last_type_symbol = NULL; |
|
7837 |
|
7838 { |
|
7839 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7840 symbol_c *IN_param_value = &this->default_variable_name; |
|
7841 |
|
7842 symbol_c *IN_type_symbol = param_data_type; |
|
7843 last_type_symbol = param_data_type; |
|
7844 |
|
7845 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7846 { |
|
7847 |
|
7848 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
7849 s4o.print("("); |
|
7850 return_type_symbol->accept(*this); |
|
7851 s4o.print(")__time_to_int("); |
|
7852 IN_param_value->accept(*this); |
|
7853 s4o.print(")"); |
|
7854 return NULL; |
|
7855 |
|
7856 } |
|
7857 |
|
7858 ERROR; |
|
7859 } |
|
7860 |
|
7861 }/*function_tod_to_dint*/ |
|
7862 break; |
|
7863 |
|
7864 /**** |
|
7865 *TOD_TO_LINT |
|
7866 */ |
|
7867 case function_tod_to_lint : |
|
7868 { |
|
7869 symbol_c *last_type_symbol = NULL; |
|
7870 |
|
7871 { |
|
7872 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7873 symbol_c *IN_param_value = &this->default_variable_name; |
|
7874 |
|
7875 symbol_c *IN_type_symbol = param_data_type; |
|
7876 last_type_symbol = param_data_type; |
|
7877 |
|
7878 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7879 { |
|
7880 |
|
7881 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
7882 s4o.print("("); |
|
7883 return_type_symbol->accept(*this); |
|
7884 s4o.print(")__time_to_int("); |
|
7885 IN_param_value->accept(*this); |
|
7886 s4o.print(")"); |
|
7887 return NULL; |
|
7888 |
|
7889 } |
|
7890 |
|
7891 ERROR; |
|
7892 } |
|
7893 |
|
7894 }/*function_tod_to_lint*/ |
|
7895 break; |
|
7896 |
|
7897 /**** |
|
7898 *TOD_TO_USINT |
|
7899 */ |
|
7900 case function_tod_to_usint : |
|
7901 { |
|
7902 symbol_c *last_type_symbol = NULL; |
|
7903 |
|
7904 { |
|
7905 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7906 symbol_c *IN_param_value = &this->default_variable_name; |
|
7907 |
|
7908 symbol_c *IN_type_symbol = param_data_type; |
|
7909 last_type_symbol = param_data_type; |
|
7910 |
|
7911 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7912 { |
|
7913 |
|
7914 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
7915 s4o.print("("); |
|
7916 return_type_symbol->accept(*this); |
|
7917 s4o.print(")__time_to_int("); |
|
7918 IN_param_value->accept(*this); |
|
7919 s4o.print(")"); |
|
7920 return NULL; |
|
7921 |
|
7922 } |
|
7923 |
|
7924 ERROR; |
|
7925 } |
|
7926 |
|
7927 }/*function_tod_to_usint*/ |
|
7928 break; |
|
7929 |
|
7930 /**** |
|
7931 *TOD_TO_UINT |
|
7932 */ |
|
7933 case function_tod_to_uint : |
|
7934 { |
|
7935 symbol_c *last_type_symbol = NULL; |
|
7936 |
|
7937 { |
|
7938 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7939 symbol_c *IN_param_value = &this->default_variable_name; |
|
7940 |
|
7941 symbol_c *IN_type_symbol = param_data_type; |
|
7942 last_type_symbol = param_data_type; |
|
7943 |
|
7944 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7945 { |
|
7946 |
|
7947 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
7948 s4o.print("("); |
|
7949 return_type_symbol->accept(*this); |
|
7950 s4o.print(")__time_to_int("); |
|
7951 IN_param_value->accept(*this); |
|
7952 s4o.print(")"); |
|
7953 return NULL; |
|
7954 |
|
7955 } |
|
7956 |
|
7957 ERROR; |
|
7958 } |
|
7959 |
|
7960 }/*function_tod_to_uint*/ |
|
7961 break; |
|
7962 |
|
7963 /**** |
|
7964 *TOD_TO_UDINT |
|
7965 */ |
|
7966 case function_tod_to_udint : |
|
7967 { |
|
7968 symbol_c *last_type_symbol = NULL; |
|
7969 |
|
7970 { |
|
7971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
7972 symbol_c *IN_param_value = &this->default_variable_name; |
|
7973 |
|
7974 symbol_c *IN_type_symbol = param_data_type; |
|
7975 last_type_symbol = param_data_type; |
|
7976 |
|
7977 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
7978 { |
|
7979 |
|
7980 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
7981 s4o.print("("); |
|
7982 return_type_symbol->accept(*this); |
|
7983 s4o.print(")__time_to_int("); |
|
7984 IN_param_value->accept(*this); |
|
7985 s4o.print(")"); |
|
7986 return NULL; |
|
7987 |
|
7988 } |
|
7989 |
|
7990 ERROR; |
|
7991 } |
|
7992 |
|
7993 }/*function_tod_to_udint*/ |
|
7994 break; |
|
7995 |
|
7996 /**** |
|
7997 *TOD_TO_ULINT |
|
7998 */ |
|
7999 case function_tod_to_ulint : |
|
8000 { |
|
8001 symbol_c *last_type_symbol = NULL; |
|
8002 |
|
8003 { |
|
8004 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8005 symbol_c *IN_param_value = &this->default_variable_name; |
|
8006 |
|
8007 symbol_c *IN_type_symbol = param_data_type; |
|
8008 last_type_symbol = param_data_type; |
|
8009 |
|
8010 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8011 { |
|
8012 |
|
8013 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8014 s4o.print("("); |
|
8015 return_type_symbol->accept(*this); |
|
8016 s4o.print(")__time_to_int("); |
|
8017 IN_param_value->accept(*this); |
|
8018 s4o.print(")"); |
|
8019 return NULL; |
|
8020 |
|
8021 } |
|
8022 |
|
8023 ERROR; |
|
8024 } |
|
8025 |
|
8026 }/*function_tod_to_ulint*/ |
|
8027 break; |
|
8028 |
|
8029 /**** |
|
8030 *TOD_TO_REAL |
|
8031 */ |
|
8032 case function_tod_to_real : |
|
8033 { |
|
8034 symbol_c *last_type_symbol = NULL; |
|
8035 |
|
8036 { |
|
8037 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8038 symbol_c *IN_param_value = &this->default_variable_name; |
|
8039 |
|
8040 symbol_c *IN_type_symbol = param_data_type; |
|
8041 last_type_symbol = param_data_type; |
|
8042 |
|
8043 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8044 { |
|
8045 |
|
8046 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8047 s4o.print("("); |
|
8048 return_type_symbol->accept(*this); |
|
8049 s4o.print(")__time_to_real("); |
|
8050 IN_param_value->accept(*this); |
|
8051 s4o.print(")"); |
|
8052 return NULL; |
|
8053 |
|
8054 } |
|
8055 |
|
8056 ERROR; |
|
8057 } |
|
8058 |
|
8059 }/*function_tod_to_real*/ |
|
8060 break; |
|
8061 |
|
8062 /**** |
|
8063 *TOD_TO_LREAL |
|
8064 */ |
|
8065 case function_tod_to_lreal : |
|
8066 { |
|
8067 symbol_c *last_type_symbol = NULL; |
|
8068 |
|
8069 { |
|
8070 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8071 symbol_c *IN_param_value = &this->default_variable_name; |
|
8072 |
|
8073 symbol_c *IN_type_symbol = param_data_type; |
|
8074 last_type_symbol = param_data_type; |
|
8075 |
|
8076 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8077 { |
|
8078 |
|
8079 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8080 s4o.print("("); |
|
8081 return_type_symbol->accept(*this); |
|
8082 s4o.print(")__time_to_real("); |
|
8083 IN_param_value->accept(*this); |
|
8084 s4o.print(")"); |
|
8085 return NULL; |
|
8086 |
|
8087 } |
|
8088 |
|
8089 ERROR; |
|
8090 } |
|
8091 |
|
8092 }/*function_tod_to_lreal*/ |
|
8093 break; |
|
8094 |
|
8095 /**** |
|
8096 *TOD_TO_STRING |
|
8097 */ |
|
8098 case function_tod_to_string : |
|
8099 { |
|
8100 symbol_c *last_type_symbol = NULL; |
|
8101 |
|
8102 { |
|
8103 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8104 symbol_c *IN_param_value = &this->default_variable_name; |
|
8105 |
|
8106 symbol_c *IN_type_symbol = param_data_type; |
|
8107 last_type_symbol = param_data_type; |
|
8108 |
|
8109 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8110 { |
|
8111 |
|
8112 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8113 s4o.print("("); |
|
8114 return_type_symbol->accept(*this); |
|
8115 s4o.print(")__tod_to_string("); |
|
8116 IN_param_value->accept(*this); |
|
8117 s4o.print(")"); |
|
8118 return NULL; |
|
8119 |
|
8120 } |
|
8121 |
|
8122 ERROR; |
|
8123 } |
|
8124 |
|
8125 }/*function_tod_to_string*/ |
|
8126 break; |
|
8127 |
|
8128 /**** |
|
8129 *TOD_TO_BYTE |
|
8130 */ |
|
8131 case function_tod_to_byte : |
|
8132 { |
|
8133 symbol_c *last_type_symbol = NULL; |
|
8134 |
|
8135 { |
|
8136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8137 symbol_c *IN_param_value = &this->default_variable_name; |
|
8138 |
|
8139 symbol_c *IN_type_symbol = param_data_type; |
|
8140 last_type_symbol = param_data_type; |
|
8141 |
|
8142 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8143 { |
|
8144 |
|
8145 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
8146 s4o.print("("); |
|
8147 return_type_symbol->accept(*this); |
|
8148 s4o.print(")__time_to_int("); |
|
8149 IN_param_value->accept(*this); |
|
8150 s4o.print(")"); |
|
8151 return NULL; |
|
8152 |
|
8153 } |
|
8154 |
|
8155 ERROR; |
|
8156 } |
|
8157 |
|
8158 }/*function_tod_to_byte*/ |
|
8159 break; |
|
8160 |
|
8161 /**** |
|
8162 *TOD_TO_WORD |
|
8163 */ |
|
8164 case function_tod_to_word : |
|
8165 { |
|
8166 symbol_c *last_type_symbol = NULL; |
|
8167 |
|
8168 { |
|
8169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8170 symbol_c *IN_param_value = &this->default_variable_name; |
|
8171 |
|
8172 symbol_c *IN_type_symbol = param_data_type; |
|
8173 last_type_symbol = param_data_type; |
|
8174 |
|
8175 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8176 { |
|
8177 |
|
8178 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8179 s4o.print("("); |
|
8180 return_type_symbol->accept(*this); |
|
8181 s4o.print(")__time_to_int("); |
|
8182 IN_param_value->accept(*this); |
|
8183 s4o.print(")"); |
|
8184 return NULL; |
|
8185 |
|
8186 } |
|
8187 |
|
8188 ERROR; |
|
8189 } |
|
8190 |
|
8191 }/*function_tod_to_word*/ |
|
8192 break; |
|
8193 |
|
8194 /**** |
|
8195 *TOD_TO_DWORD |
|
8196 */ |
|
8197 case function_tod_to_dword : |
|
8198 { |
|
8199 symbol_c *last_type_symbol = NULL; |
|
8200 |
|
8201 { |
|
8202 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8203 symbol_c *IN_param_value = &this->default_variable_name; |
|
8204 |
|
8205 symbol_c *IN_type_symbol = param_data_type; |
|
8206 last_type_symbol = param_data_type; |
|
8207 |
|
8208 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8209 { |
|
8210 |
|
8211 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8212 s4o.print("("); |
|
8213 return_type_symbol->accept(*this); |
|
8214 s4o.print(")__time_to_int("); |
|
8215 IN_param_value->accept(*this); |
|
8216 s4o.print(")"); |
|
8217 return NULL; |
|
8218 |
|
8219 } |
|
8220 |
|
8221 ERROR; |
|
8222 } |
|
8223 |
|
8224 }/*function_tod_to_dword*/ |
|
8225 break; |
|
8226 |
|
8227 /**** |
|
8228 *TOD_TO_LWORD |
|
8229 */ |
|
8230 case function_tod_to_lword : |
|
8231 { |
|
8232 symbol_c *last_type_symbol = NULL; |
|
8233 |
|
8234 { |
|
8235 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8236 symbol_c *IN_param_value = &this->default_variable_name; |
|
8237 |
|
8238 symbol_c *IN_type_symbol = param_data_type; |
|
8239 last_type_symbol = param_data_type; |
|
8240 |
|
8241 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
|
8242 { |
|
8243 |
|
8244 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8245 s4o.print("("); |
|
8246 return_type_symbol->accept(*this); |
|
8247 s4o.print(")__time_to_int("); |
|
8248 IN_param_value->accept(*this); |
|
8249 s4o.print(")"); |
|
8250 return NULL; |
|
8251 |
|
8252 } |
|
8253 |
|
8254 ERROR; |
|
8255 } |
|
8256 |
|
8257 }/*function_tod_to_lword*/ |
|
8258 break; |
|
8259 |
|
8260 /**** |
|
8261 *DT_TO_SINT |
|
8262 */ |
|
8263 case function_dt_to_sint : |
|
8264 { |
|
8265 symbol_c *last_type_symbol = NULL; |
|
8266 |
|
8267 { |
|
8268 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8269 symbol_c *IN_param_value = &this->default_variable_name; |
|
8270 |
|
8271 symbol_c *IN_type_symbol = param_data_type; |
|
8272 last_type_symbol = param_data_type; |
|
8273 |
|
8274 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8275 { |
|
8276 |
|
8277 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8278 s4o.print("("); |
|
8279 return_type_symbol->accept(*this); |
|
8280 s4o.print(")__time_to_int("); |
|
8281 IN_param_value->accept(*this); |
|
8282 s4o.print(")"); |
|
8283 return NULL; |
|
8284 |
|
8285 } |
|
8286 |
|
8287 ERROR; |
|
8288 } |
|
8289 |
|
8290 }/*function_dt_to_sint*/ |
|
8291 break; |
|
8292 |
|
8293 /**** |
|
8294 *DT_TO_INT |
|
8295 */ |
|
8296 case function_dt_to_int : |
|
8297 { |
|
8298 symbol_c *last_type_symbol = NULL; |
|
8299 |
|
8300 { |
|
8301 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8302 symbol_c *IN_param_value = &this->default_variable_name; |
|
8303 |
|
8304 symbol_c *IN_type_symbol = param_data_type; |
|
8305 last_type_symbol = param_data_type; |
|
8306 |
|
8307 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8308 { |
|
8309 |
|
8310 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8311 s4o.print("("); |
|
8312 return_type_symbol->accept(*this); |
|
8313 s4o.print(")__time_to_int("); |
|
8314 IN_param_value->accept(*this); |
|
8315 s4o.print(")"); |
|
8316 return NULL; |
|
8317 |
|
8318 } |
|
8319 |
|
8320 ERROR; |
|
8321 } |
|
8322 |
|
8323 }/*function_dt_to_int*/ |
|
8324 break; |
|
8325 |
|
8326 /**** |
|
8327 *DT_TO_DINT |
|
8328 */ |
|
8329 case function_dt_to_dint : |
|
8330 { |
|
8331 symbol_c *last_type_symbol = NULL; |
|
8332 |
|
8333 { |
|
8334 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8335 symbol_c *IN_param_value = &this->default_variable_name; |
|
8336 |
|
8337 symbol_c *IN_type_symbol = param_data_type; |
|
8338 last_type_symbol = param_data_type; |
|
8339 |
|
8340 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8341 { |
|
8342 |
|
8343 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8344 s4o.print("("); |
|
8345 return_type_symbol->accept(*this); |
|
8346 s4o.print(")__time_to_int("); |
|
8347 IN_param_value->accept(*this); |
|
8348 s4o.print(")"); |
|
8349 return NULL; |
|
8350 |
|
8351 } |
|
8352 |
|
8353 ERROR; |
|
8354 } |
|
8355 |
|
8356 }/*function_dt_to_dint*/ |
|
8357 break; |
|
8358 |
|
8359 /**** |
|
8360 *DT_TO_LINT |
|
8361 */ |
|
8362 case function_dt_to_lint : |
|
8363 { |
|
8364 symbol_c *last_type_symbol = NULL; |
|
8365 |
|
8366 { |
|
8367 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8368 symbol_c *IN_param_value = &this->default_variable_name; |
|
8369 |
|
8370 symbol_c *IN_type_symbol = param_data_type; |
|
8371 last_type_symbol = param_data_type; |
|
8372 |
|
8373 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8374 { |
|
8375 |
|
8376 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8377 s4o.print("("); |
|
8378 return_type_symbol->accept(*this); |
|
8379 s4o.print(")__time_to_int("); |
|
8380 IN_param_value->accept(*this); |
|
8381 s4o.print(")"); |
|
8382 return NULL; |
|
8383 |
|
8384 } |
|
8385 |
|
8386 ERROR; |
|
8387 } |
|
8388 |
|
8389 }/*function_dt_to_lint*/ |
|
8390 break; |
|
8391 |
|
8392 /**** |
|
8393 *DT_TO_USINT |
|
8394 */ |
|
8395 case function_dt_to_usint : |
|
8396 { |
|
8397 symbol_c *last_type_symbol = NULL; |
|
8398 |
|
8399 { |
|
8400 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8401 symbol_c *IN_param_value = &this->default_variable_name; |
|
8402 |
|
8403 symbol_c *IN_type_symbol = param_data_type; |
|
8404 last_type_symbol = param_data_type; |
|
8405 |
|
8406 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8407 { |
|
8408 |
|
8409 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8410 s4o.print("("); |
|
8411 return_type_symbol->accept(*this); |
|
8412 s4o.print(")__time_to_int("); |
|
8413 IN_param_value->accept(*this); |
|
8414 s4o.print(")"); |
|
8415 return NULL; |
|
8416 |
|
8417 } |
|
8418 |
|
8419 ERROR; |
|
8420 } |
|
8421 |
|
8422 }/*function_dt_to_usint*/ |
|
8423 break; |
|
8424 |
|
8425 /**** |
|
8426 *DT_TO_UINT |
|
8427 */ |
|
8428 case function_dt_to_uint : |
|
8429 { |
|
8430 symbol_c *last_type_symbol = NULL; |
|
8431 |
|
8432 { |
|
8433 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8434 symbol_c *IN_param_value = &this->default_variable_name; |
|
8435 |
|
8436 symbol_c *IN_type_symbol = param_data_type; |
|
8437 last_type_symbol = param_data_type; |
|
8438 |
|
8439 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8440 { |
|
8441 |
|
8442 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
8443 s4o.print("("); |
|
8444 return_type_symbol->accept(*this); |
|
8445 s4o.print(")__time_to_int("); |
|
8446 IN_param_value->accept(*this); |
|
8447 s4o.print(")"); |
|
8448 return NULL; |
|
8449 |
|
8450 } |
|
8451 |
|
8452 ERROR; |
|
8453 } |
|
8454 |
|
8455 }/*function_dt_to_uint*/ |
|
8456 break; |
|
8457 |
|
8458 /**** |
|
8459 *DT_TO_UDINT |
|
8460 */ |
|
8461 case function_dt_to_udint : |
|
8462 { |
|
8463 symbol_c *last_type_symbol = NULL; |
|
8464 |
|
8465 { |
|
8466 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8467 symbol_c *IN_param_value = &this->default_variable_name; |
|
8468 |
|
8469 symbol_c *IN_type_symbol = param_data_type; |
|
8470 last_type_symbol = param_data_type; |
|
8471 |
|
8472 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8473 { |
|
8474 |
|
8475 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
8476 s4o.print("("); |
|
8477 return_type_symbol->accept(*this); |
|
8478 s4o.print(")__time_to_int("); |
|
8479 IN_param_value->accept(*this); |
|
8480 s4o.print(")"); |
|
8481 return NULL; |
|
8482 |
|
8483 } |
|
8484 |
|
8485 ERROR; |
|
8486 } |
|
8487 |
|
8488 }/*function_dt_to_udint*/ |
|
8489 break; |
|
8490 |
|
8491 /**** |
|
8492 *DT_TO_ULINT |
|
8493 */ |
|
8494 case function_dt_to_ulint : |
|
8495 { |
|
8496 symbol_c *last_type_symbol = NULL; |
|
8497 |
|
8498 { |
|
8499 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8500 symbol_c *IN_param_value = &this->default_variable_name; |
|
8501 |
|
8502 symbol_c *IN_type_symbol = param_data_type; |
|
8503 last_type_symbol = param_data_type; |
|
8504 |
|
8505 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8506 { |
|
8507 |
|
8508 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
8509 s4o.print("("); |
|
8510 return_type_symbol->accept(*this); |
|
8511 s4o.print(")__time_to_int("); |
|
8512 IN_param_value->accept(*this); |
|
8513 s4o.print(")"); |
|
8514 return NULL; |
|
8515 |
|
8516 } |
|
8517 |
|
8518 ERROR; |
|
8519 } |
|
8520 |
|
8521 }/*function_dt_to_ulint*/ |
|
8522 break; |
|
8523 |
|
8524 /**** |
|
8525 *DT_TO_REAL |
|
8526 */ |
|
8527 case function_dt_to_real : |
|
8528 { |
|
8529 symbol_c *last_type_symbol = NULL; |
|
8530 |
|
8531 { |
|
8532 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8533 symbol_c *IN_param_value = &this->default_variable_name; |
|
8534 |
|
8535 symbol_c *IN_type_symbol = param_data_type; |
|
8536 last_type_symbol = param_data_type; |
|
8537 |
|
8538 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8539 { |
|
8540 |
|
8541 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
8542 s4o.print("("); |
|
8543 return_type_symbol->accept(*this); |
|
8544 s4o.print(")__time_to_real("); |
|
8545 IN_param_value->accept(*this); |
|
8546 s4o.print(")"); |
|
8547 return NULL; |
|
8548 |
|
8549 } |
|
8550 |
|
8551 ERROR; |
|
8552 } |
|
8553 |
|
8554 }/*function_dt_to_real*/ |
|
8555 break; |
|
8556 |
|
8557 /**** |
|
8558 *DT_TO_LREAL |
|
8559 */ |
|
8560 case function_dt_to_lreal : |
|
8561 { |
|
8562 symbol_c *last_type_symbol = NULL; |
|
8563 |
|
8564 { |
|
8565 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8566 symbol_c *IN_param_value = &this->default_variable_name; |
|
8567 |
|
8568 symbol_c *IN_type_symbol = param_data_type; |
|
8569 last_type_symbol = param_data_type; |
|
8570 |
|
8571 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8572 { |
|
8573 |
|
8574 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
8575 s4o.print("("); |
|
8576 return_type_symbol->accept(*this); |
|
8577 s4o.print(")__time_to_real("); |
|
8578 IN_param_value->accept(*this); |
|
8579 s4o.print(")"); |
|
8580 return NULL; |
|
8581 |
|
8582 } |
|
8583 |
|
8584 ERROR; |
|
8585 } |
|
8586 |
|
8587 }/*function_dt_to_lreal*/ |
|
8588 break; |
|
8589 |
|
8590 /**** |
|
8591 *DT_TO_STRING |
|
8592 */ |
|
8593 case function_dt_to_string : |
|
8594 { |
|
8595 symbol_c *last_type_symbol = NULL; |
|
8596 |
|
8597 { |
|
8598 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8599 symbol_c *IN_param_value = &this->default_variable_name; |
|
8600 |
|
8601 symbol_c *IN_type_symbol = param_data_type; |
|
8602 last_type_symbol = param_data_type; |
|
8603 |
|
8604 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8605 { |
|
8606 |
|
8607 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
8608 s4o.print("("); |
|
8609 return_type_symbol->accept(*this); |
|
8610 s4o.print(")__dt_to_string("); |
|
8611 IN_param_value->accept(*this); |
|
8612 s4o.print(")"); |
|
8613 return NULL; |
|
8614 |
|
8615 } |
|
8616 |
|
8617 ERROR; |
|
8618 } |
|
8619 |
|
8620 }/*function_dt_to_string*/ |
|
8621 break; |
|
8622 |
|
8623 /**** |
|
8624 *DT_TO_BYTE |
|
8625 */ |
|
8626 case function_dt_to_byte : |
|
8627 { |
|
8628 symbol_c *last_type_symbol = NULL; |
|
8629 |
|
8630 { |
|
8631 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8632 symbol_c *IN_param_value = &this->default_variable_name; |
|
8633 |
|
8634 symbol_c *IN_type_symbol = param_data_type; |
|
8635 last_type_symbol = param_data_type; |
|
8636 |
|
8637 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8638 { |
|
8639 |
|
8640 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
8641 s4o.print("("); |
|
8642 return_type_symbol->accept(*this); |
|
8643 s4o.print(")__time_to_int("); |
|
8644 IN_param_value->accept(*this); |
|
8645 s4o.print(")"); |
|
8646 return NULL; |
|
8647 |
|
8648 } |
|
8649 |
|
8650 ERROR; |
|
8651 } |
|
8652 |
|
8653 }/*function_dt_to_byte*/ |
|
8654 break; |
|
8655 |
|
8656 /**** |
|
8657 *DT_TO_WORD |
|
8658 */ |
|
8659 case function_dt_to_word : |
|
8660 { |
|
8661 symbol_c *last_type_symbol = NULL; |
|
8662 |
|
8663 { |
|
8664 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8665 symbol_c *IN_param_value = &this->default_variable_name; |
|
8666 |
|
8667 symbol_c *IN_type_symbol = param_data_type; |
|
8668 last_type_symbol = param_data_type; |
|
8669 |
|
8670 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8671 { |
|
8672 |
|
8673 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
8674 s4o.print("("); |
|
8675 return_type_symbol->accept(*this); |
|
8676 s4o.print(")__time_to_int("); |
|
8677 IN_param_value->accept(*this); |
|
8678 s4o.print(")"); |
|
8679 return NULL; |
|
8680 |
|
8681 } |
|
8682 |
|
8683 ERROR; |
|
8684 } |
|
8685 |
|
8686 }/*function_dt_to_word*/ |
|
8687 break; |
|
8688 |
|
8689 /**** |
|
8690 *DT_TO_DWORD |
|
8691 */ |
|
8692 case function_dt_to_dword : |
|
8693 { |
|
8694 symbol_c *last_type_symbol = NULL; |
|
8695 |
|
8696 { |
|
8697 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8698 symbol_c *IN_param_value = &this->default_variable_name; |
|
8699 |
|
8700 symbol_c *IN_type_symbol = param_data_type; |
|
8701 last_type_symbol = param_data_type; |
|
8702 |
|
8703 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8704 { |
|
8705 |
|
8706 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
8707 s4o.print("("); |
|
8708 return_type_symbol->accept(*this); |
|
8709 s4o.print(")__time_to_int("); |
|
8710 IN_param_value->accept(*this); |
|
8711 s4o.print(")"); |
|
8712 return NULL; |
|
8713 |
|
8714 } |
|
8715 |
|
8716 ERROR; |
|
8717 } |
|
8718 |
|
8719 }/*function_dt_to_dword*/ |
|
8720 break; |
|
8721 |
|
8722 /**** |
|
8723 *DT_TO_LWORD |
|
8724 */ |
|
8725 case function_dt_to_lword : |
|
8726 { |
|
8727 symbol_c *last_type_symbol = NULL; |
|
8728 |
|
8729 { |
|
8730 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8731 symbol_c *IN_param_value = &this->default_variable_name; |
|
8732 |
|
8733 symbol_c *IN_type_symbol = param_data_type; |
|
8734 last_type_symbol = param_data_type; |
|
8735 |
|
8736 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
|
8737 { |
|
8738 |
|
8739 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
8740 s4o.print("("); |
|
8741 return_type_symbol->accept(*this); |
|
8742 s4o.print(")__time_to_int("); |
|
8743 IN_param_value->accept(*this); |
|
8744 s4o.print(")"); |
|
8745 return NULL; |
|
8746 |
|
8747 } |
|
8748 |
|
8749 ERROR; |
|
8750 } |
|
8751 |
|
8752 }/*function_dt_to_lword*/ |
|
8753 break; |
|
8754 |
|
8755 /**** |
|
8756 *STRING_TO_BOOL |
|
8757 */ |
|
8758 case function_string_to_bool : |
|
8759 { |
|
8760 symbol_c *last_type_symbol = NULL; |
|
8761 |
|
8762 { |
|
8763 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8764 symbol_c *IN_param_value = &this->default_variable_name; |
|
8765 |
|
8766 symbol_c *IN_type_symbol = param_data_type; |
|
8767 last_type_symbol = param_data_type; |
|
8768 |
|
8769 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8770 { |
|
8771 |
|
8772 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
8773 s4o.print("("); |
|
8774 return_type_symbol->accept(*this); |
|
8775 s4o.print(")__string_to_bool("); |
|
8776 IN_param_value->accept(*this); |
|
8777 s4o.print(")"); |
|
8778 return NULL; |
|
8779 |
|
8780 } |
|
8781 |
|
8782 ERROR; |
|
8783 } |
|
8784 |
|
8785 }/*function_string_to_bool*/ |
|
8786 break; |
|
8787 |
|
8788 /**** |
|
8789 *STRING_TO_SINT |
|
8790 */ |
|
8791 case function_string_to_sint : |
|
8792 { |
|
8793 symbol_c *last_type_symbol = NULL; |
|
8794 |
|
8795 { |
|
8796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8797 symbol_c *IN_param_value = &this->default_variable_name; |
|
8798 |
|
8799 symbol_c *IN_type_symbol = param_data_type; |
|
8800 last_type_symbol = param_data_type; |
|
8801 |
|
8802 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8803 { |
|
8804 |
|
8805 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
8806 s4o.print("("); |
|
8807 return_type_symbol->accept(*this); |
|
8808 s4o.print(")__string_to_sint("); |
|
8809 IN_param_value->accept(*this); |
|
8810 s4o.print(")"); |
|
8811 return NULL; |
|
8812 |
|
8813 } |
|
8814 |
|
8815 ERROR; |
|
8816 } |
|
8817 |
|
8818 }/*function_string_to_sint*/ |
|
8819 break; |
|
8820 |
|
8821 /**** |
|
8822 *STRING_TO_INT |
|
8823 */ |
|
8824 case function_string_to_int : |
|
8825 { |
|
8826 symbol_c *last_type_symbol = NULL; |
|
8827 |
|
8828 { |
|
8829 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8830 symbol_c *IN_param_value = &this->default_variable_name; |
|
8831 |
|
8832 symbol_c *IN_type_symbol = param_data_type; |
|
8833 last_type_symbol = param_data_type; |
|
8834 |
|
8835 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8836 { |
|
8837 |
|
8838 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
8839 s4o.print("("); |
|
8840 return_type_symbol->accept(*this); |
|
8841 s4o.print(")__string_to_sint("); |
|
8842 IN_param_value->accept(*this); |
|
8843 s4o.print(")"); |
|
8844 return NULL; |
|
8845 |
|
8846 } |
|
8847 |
|
8848 ERROR; |
|
8849 } |
|
8850 |
|
8851 }/*function_string_to_int*/ |
|
8852 break; |
|
8853 |
|
8854 /**** |
|
8855 *STRING_TO_DINT |
|
8856 */ |
|
8857 case function_string_to_dint : |
|
8858 { |
|
8859 symbol_c *last_type_symbol = NULL; |
|
8860 |
|
8861 { |
|
8862 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8863 symbol_c *IN_param_value = &this->default_variable_name; |
|
8864 |
|
8865 symbol_c *IN_type_symbol = param_data_type; |
|
8866 last_type_symbol = param_data_type; |
|
8867 |
|
8868 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8869 { |
|
8870 |
|
8871 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
8872 s4o.print("("); |
|
8873 return_type_symbol->accept(*this); |
|
8874 s4o.print(")__string_to_sint("); |
|
8875 IN_param_value->accept(*this); |
|
8876 s4o.print(")"); |
|
8877 return NULL; |
|
8878 |
|
8879 } |
|
8880 |
|
8881 ERROR; |
|
8882 } |
|
8883 |
|
8884 }/*function_string_to_dint*/ |
|
8885 break; |
|
8886 |
|
8887 /**** |
|
8888 *STRING_TO_LINT |
|
8889 */ |
|
8890 case function_string_to_lint : |
|
8891 { |
|
8892 symbol_c *last_type_symbol = NULL; |
|
8893 |
|
8894 { |
|
8895 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8896 symbol_c *IN_param_value = &this->default_variable_name; |
|
8897 |
|
8898 symbol_c *IN_type_symbol = param_data_type; |
|
8899 last_type_symbol = param_data_type; |
|
8900 |
|
8901 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8902 { |
|
8903 |
|
8904 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
8905 s4o.print("("); |
|
8906 return_type_symbol->accept(*this); |
|
8907 s4o.print(")__string_to_sint("); |
|
8908 IN_param_value->accept(*this); |
|
8909 s4o.print(")"); |
|
8910 return NULL; |
|
8911 |
|
8912 } |
|
8913 |
|
8914 ERROR; |
|
8915 } |
|
8916 |
|
8917 }/*function_string_to_lint*/ |
|
8918 break; |
|
8919 |
|
8920 /**** |
|
8921 *STRING_TO_USINT |
|
8922 */ |
|
8923 case function_string_to_usint : |
|
8924 { |
|
8925 symbol_c *last_type_symbol = NULL; |
|
8926 |
|
8927 { |
|
8928 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8929 symbol_c *IN_param_value = &this->default_variable_name; |
|
8930 |
|
8931 symbol_c *IN_type_symbol = param_data_type; |
|
8932 last_type_symbol = param_data_type; |
|
8933 |
|
8934 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8935 { |
|
8936 |
|
8937 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
8938 s4o.print("("); |
|
8939 return_type_symbol->accept(*this); |
|
8940 s4o.print(")__string_to_uint("); |
|
8941 IN_param_value->accept(*this); |
|
8942 s4o.print(")"); |
|
8943 return NULL; |
|
8944 |
|
8945 } |
|
8946 |
|
8947 ERROR; |
|
8948 } |
|
8949 |
|
8950 }/*function_string_to_usint*/ |
|
8951 break; |
|
8952 |
|
8953 /**** |
|
8954 *STRING_TO_UINT |
|
8955 */ |
|
8956 case function_string_to_uint : |
|
8957 { |
|
8958 symbol_c *last_type_symbol = NULL; |
|
8959 |
|
8960 { |
|
8961 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8962 symbol_c *IN_param_value = &this->default_variable_name; |
|
8963 |
|
8964 symbol_c *IN_type_symbol = param_data_type; |
|
8965 last_type_symbol = param_data_type; |
|
8966 |
|
8967 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
8968 { |
|
8969 |
|
8970 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
8971 s4o.print("("); |
|
8972 return_type_symbol->accept(*this); |
|
8973 s4o.print(")__string_to_uint("); |
|
8974 IN_param_value->accept(*this); |
|
8975 s4o.print(")"); |
|
8976 return NULL; |
|
8977 |
|
8978 } |
|
8979 |
|
8980 ERROR; |
|
8981 } |
|
8982 |
|
8983 }/*function_string_to_uint*/ |
|
8984 break; |
|
8985 |
|
8986 /**** |
|
8987 *STRING_TO_UDINT |
|
8988 */ |
|
8989 case function_string_to_udint : |
|
8990 { |
|
8991 symbol_c *last_type_symbol = NULL; |
|
8992 |
|
8993 { |
|
8994 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
8995 symbol_c *IN_param_value = &this->default_variable_name; |
|
8996 |
|
8997 symbol_c *IN_type_symbol = param_data_type; |
|
8998 last_type_symbol = param_data_type; |
|
8999 |
|
9000 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9001 { |
|
9002 |
|
9003 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9004 s4o.print("("); |
|
9005 return_type_symbol->accept(*this); |
|
9006 s4o.print(")__string_to_uint("); |
|
9007 IN_param_value->accept(*this); |
|
9008 s4o.print(")"); |
|
9009 return NULL; |
|
9010 |
|
9011 } |
|
9012 |
|
9013 ERROR; |
|
9014 } |
|
9015 |
|
9016 }/*function_string_to_udint*/ |
|
9017 break; |
|
9018 |
|
9019 /**** |
|
9020 *STRING_TO_ULINT |
|
9021 */ |
|
9022 case function_string_to_ulint : |
|
9023 { |
|
9024 symbol_c *last_type_symbol = NULL; |
|
9025 |
|
9026 { |
|
9027 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9028 symbol_c *IN_param_value = &this->default_variable_name; |
|
9029 |
|
9030 symbol_c *IN_type_symbol = param_data_type; |
|
9031 last_type_symbol = param_data_type; |
|
9032 |
|
9033 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9034 { |
|
9035 |
|
9036 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9037 s4o.print("("); |
|
9038 return_type_symbol->accept(*this); |
|
9039 s4o.print(")__string_to_uint("); |
|
9040 IN_param_value->accept(*this); |
|
9041 s4o.print(")"); |
|
9042 return NULL; |
|
9043 |
|
9044 } |
|
9045 |
|
9046 ERROR; |
|
9047 } |
|
9048 |
|
9049 }/*function_string_to_ulint*/ |
|
9050 break; |
|
9051 |
|
9052 /**** |
|
9053 *STRING_TO_REAL |
|
9054 */ |
|
9055 case function_string_to_real : |
|
9056 { |
|
9057 symbol_c *last_type_symbol = NULL; |
|
9058 |
|
9059 { |
|
9060 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9061 symbol_c *IN_param_value = &this->default_variable_name; |
|
9062 |
|
9063 symbol_c *IN_type_symbol = param_data_type; |
|
9064 last_type_symbol = param_data_type; |
|
9065 |
|
9066 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9067 { |
|
9068 |
|
9069 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9070 s4o.print("("); |
|
9071 return_type_symbol->accept(*this); |
|
9072 s4o.print(")__string_to_real("); |
|
9073 IN_param_value->accept(*this); |
|
9074 s4o.print(")"); |
|
9075 return NULL; |
|
9076 |
|
9077 } |
|
9078 |
|
9079 ERROR; |
|
9080 } |
|
9081 |
|
9082 }/*function_string_to_real*/ |
|
9083 break; |
|
9084 |
|
9085 /**** |
|
9086 *STRING_TO_LREAL |
|
9087 */ |
|
9088 case function_string_to_lreal : |
|
9089 { |
|
9090 symbol_c *last_type_symbol = NULL; |
|
9091 |
|
9092 { |
|
9093 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9094 symbol_c *IN_param_value = &this->default_variable_name; |
|
9095 |
|
9096 symbol_c *IN_type_symbol = param_data_type; |
|
9097 last_type_symbol = param_data_type; |
|
9098 |
|
9099 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9100 { |
|
9101 |
|
9102 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9103 s4o.print("("); |
|
9104 return_type_symbol->accept(*this); |
|
9105 s4o.print(")__string_to_real("); |
|
9106 IN_param_value->accept(*this); |
|
9107 s4o.print(")"); |
|
9108 return NULL; |
|
9109 |
|
9110 } |
|
9111 |
|
9112 ERROR; |
|
9113 } |
|
9114 |
|
9115 }/*function_string_to_lreal*/ |
|
9116 break; |
|
9117 |
|
9118 /**** |
|
9119 *STRING_TO_TIME |
|
9120 */ |
|
9121 case function_string_to_time : |
|
9122 { |
|
9123 symbol_c *last_type_symbol = NULL; |
|
9124 |
|
9125 { |
|
9126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9127 symbol_c *IN_param_value = &this->default_variable_name; |
|
9128 |
|
9129 symbol_c *IN_type_symbol = param_data_type; |
|
9130 last_type_symbol = param_data_type; |
|
9131 |
|
9132 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9133 { |
|
9134 |
|
9135 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9136 s4o.print("("); |
|
9137 return_type_symbol->accept(*this); |
|
9138 s4o.print(")__string_to_time("); |
|
9139 IN_param_value->accept(*this); |
|
9140 s4o.print(")"); |
|
9141 return NULL; |
|
9142 |
|
9143 } |
|
9144 |
|
9145 ERROR; |
|
9146 } |
|
9147 |
|
9148 }/*function_string_to_time*/ |
|
9149 break; |
|
9150 |
|
9151 /**** |
|
9152 *STRING_TO_DATE |
|
9153 */ |
|
9154 case function_string_to_date : |
|
9155 { |
|
9156 symbol_c *last_type_symbol = NULL; |
|
9157 |
|
9158 { |
|
9159 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9160 symbol_c *IN_param_value = &this->default_variable_name; |
|
9161 |
|
9162 symbol_c *IN_type_symbol = param_data_type; |
|
9163 last_type_symbol = param_data_type; |
|
9164 |
|
9165 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9166 { |
|
9167 |
|
9168 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9169 s4o.print("("); |
|
9170 return_type_symbol->accept(*this); |
|
9171 s4o.print(")__string_to_time("); |
|
9172 IN_param_value->accept(*this); |
|
9173 s4o.print(")"); |
|
9174 return NULL; |
|
9175 |
|
9176 } |
|
9177 |
|
9178 ERROR; |
|
9179 } |
|
9180 |
|
9181 }/*function_string_to_date*/ |
|
9182 break; |
|
9183 |
|
9184 /**** |
|
9185 *STRING_TO_TOD |
|
9186 */ |
|
9187 case function_string_to_tod : |
|
9188 { |
|
9189 symbol_c *last_type_symbol = NULL; |
|
9190 |
|
9191 { |
|
9192 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9193 symbol_c *IN_param_value = &this->default_variable_name; |
|
9194 |
|
9195 symbol_c *IN_type_symbol = param_data_type; |
|
9196 last_type_symbol = param_data_type; |
|
9197 |
|
9198 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9199 { |
|
9200 |
|
9201 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9202 s4o.print("("); |
|
9203 return_type_symbol->accept(*this); |
|
9204 s4o.print(")__string_to_time("); |
|
9205 IN_param_value->accept(*this); |
|
9206 s4o.print(")"); |
|
9207 return NULL; |
|
9208 |
|
9209 } |
|
9210 |
|
9211 ERROR; |
|
9212 } |
|
9213 |
|
9214 }/*function_string_to_tod*/ |
|
9215 break; |
|
9216 |
|
9217 /**** |
|
9218 *STRING_TO_DT |
|
9219 */ |
|
9220 case function_string_to_dt : |
|
9221 { |
|
9222 symbol_c *last_type_symbol = NULL; |
|
9223 |
|
9224 { |
|
9225 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9226 symbol_c *IN_param_value = &this->default_variable_name; |
|
9227 |
|
9228 symbol_c *IN_type_symbol = param_data_type; |
|
9229 last_type_symbol = param_data_type; |
|
9230 |
|
9231 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9232 { |
|
9233 |
|
9234 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9235 s4o.print("("); |
|
9236 return_type_symbol->accept(*this); |
|
9237 s4o.print(")__string_to_time("); |
|
9238 IN_param_value->accept(*this); |
|
9239 s4o.print(")"); |
|
9240 return NULL; |
|
9241 |
|
9242 } |
|
9243 |
|
9244 ERROR; |
|
9245 } |
|
9246 |
|
9247 }/*function_string_to_dt*/ |
|
9248 break; |
|
9249 |
|
9250 /**** |
|
9251 *STRING_TO_BYTE |
|
9252 */ |
|
9253 case function_string_to_byte : |
|
9254 { |
|
9255 symbol_c *last_type_symbol = NULL; |
|
9256 |
|
9257 { |
|
9258 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9259 symbol_c *IN_param_value = &this->default_variable_name; |
|
9260 |
|
9261 symbol_c *IN_type_symbol = param_data_type; |
|
9262 last_type_symbol = param_data_type; |
|
9263 |
|
9264 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9265 { |
|
9266 |
|
9267 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
9268 s4o.print("("); |
|
9269 return_type_symbol->accept(*this); |
|
9270 s4o.print(")__string_to_bit("); |
|
9271 IN_param_value->accept(*this); |
|
9272 s4o.print(")"); |
|
9273 return NULL; |
|
9274 |
|
9275 } |
|
9276 |
|
9277 ERROR; |
|
9278 } |
|
9279 |
|
9280 }/*function_string_to_byte*/ |
|
9281 break; |
|
9282 |
|
9283 /**** |
|
9284 *STRING_TO_WORD |
|
9285 */ |
|
9286 case function_string_to_word : |
|
9287 { |
|
9288 symbol_c *last_type_symbol = NULL; |
|
9289 |
|
9290 { |
|
9291 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9292 symbol_c *IN_param_value = &this->default_variable_name; |
|
9293 |
|
9294 symbol_c *IN_type_symbol = param_data_type; |
|
9295 last_type_symbol = param_data_type; |
|
9296 |
|
9297 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9298 { |
|
9299 |
|
9300 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9301 s4o.print("("); |
|
9302 return_type_symbol->accept(*this); |
|
9303 s4o.print(")__string_to_bit("); |
|
9304 IN_param_value->accept(*this); |
|
9305 s4o.print(")"); |
|
9306 return NULL; |
|
9307 |
|
9308 } |
|
9309 |
|
9310 ERROR; |
|
9311 } |
|
9312 |
|
9313 }/*function_string_to_word*/ |
|
9314 break; |
|
9315 |
|
9316 /**** |
|
9317 *STRING_TO_DWORD |
|
9318 */ |
|
9319 case function_string_to_dword : |
|
9320 { |
|
9321 symbol_c *last_type_symbol = NULL; |
|
9322 |
|
9323 { |
|
9324 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9325 symbol_c *IN_param_value = &this->default_variable_name; |
|
9326 |
|
9327 symbol_c *IN_type_symbol = param_data_type; |
|
9328 last_type_symbol = param_data_type; |
|
9329 |
|
9330 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9331 { |
|
9332 |
|
9333 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
9334 s4o.print("("); |
|
9335 return_type_symbol->accept(*this); |
|
9336 s4o.print(")__string_to_bit("); |
|
9337 IN_param_value->accept(*this); |
|
9338 s4o.print(")"); |
|
9339 return NULL; |
|
9340 |
|
9341 } |
|
9342 |
|
9343 ERROR; |
|
9344 } |
|
9345 |
|
9346 }/*function_string_to_dword*/ |
|
9347 break; |
|
9348 |
|
9349 /**** |
|
9350 *STRING_TO_LWORD |
|
9351 */ |
|
9352 case function_string_to_lword : |
|
9353 { |
|
9354 symbol_c *last_type_symbol = NULL; |
|
9355 |
|
9356 { |
|
9357 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9358 symbol_c *IN_param_value = &this->default_variable_name; |
|
9359 |
|
9360 symbol_c *IN_type_symbol = param_data_type; |
|
9361 last_type_symbol = param_data_type; |
|
9362 |
|
9363 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
|
9364 { |
|
9365 |
|
9366 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9367 s4o.print("("); |
|
9368 return_type_symbol->accept(*this); |
|
9369 s4o.print(")__string_to_bit("); |
|
9370 IN_param_value->accept(*this); |
|
9371 s4o.print(")"); |
|
9372 return NULL; |
|
9373 |
|
9374 } |
|
9375 |
|
9376 ERROR; |
|
9377 } |
|
9378 |
|
9379 }/*function_string_to_lword*/ |
|
9380 break; |
|
9381 |
|
9382 /**** |
|
9383 *BYTE_TO_BOOL |
|
9384 */ |
|
9385 case function_byte_to_bool : |
|
9386 { |
|
9387 symbol_c *last_type_symbol = NULL; |
|
9388 |
|
9389 { |
|
9390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9391 symbol_c *IN_param_value = &this->default_variable_name; |
|
9392 |
|
9393 symbol_c *IN_type_symbol = param_data_type; |
|
9394 last_type_symbol = param_data_type; |
|
9395 |
|
9396 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9397 { |
|
9398 |
|
9399 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
9400 s4o.print("("); |
|
9401 return_type_symbol->accept(*this); |
|
9402 s4o.print(")"); |
|
9403 IN_param_value->accept(*this); |
|
9404 return NULL; |
|
9405 |
|
9406 } |
|
9407 |
|
9408 ERROR; |
|
9409 } |
|
9410 |
|
9411 }/*function_byte_to_bool*/ |
|
9412 break; |
|
9413 |
|
9414 /**** |
|
9415 *BYTE_TO_SINT |
|
9416 */ |
|
9417 case function_byte_to_sint : |
|
9418 { |
|
9419 symbol_c *last_type_symbol = NULL; |
|
9420 |
|
9421 { |
|
9422 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9423 symbol_c *IN_param_value = &this->default_variable_name; |
|
9424 |
|
9425 symbol_c *IN_type_symbol = param_data_type; |
|
9426 last_type_symbol = param_data_type; |
|
9427 |
|
9428 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9429 { |
|
9430 |
|
9431 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
9432 s4o.print("("); |
|
9433 return_type_symbol->accept(*this); |
|
9434 s4o.print(")"); |
|
9435 IN_param_value->accept(*this); |
|
9436 return NULL; |
|
9437 |
|
9438 } |
|
9439 |
|
9440 ERROR; |
|
9441 } |
|
9442 |
|
9443 }/*function_byte_to_sint*/ |
|
9444 break; |
|
9445 |
|
9446 /**** |
|
9447 *BYTE_TO_INT |
|
9448 */ |
|
9449 case function_byte_to_int : |
|
9450 { |
|
9451 symbol_c *last_type_symbol = NULL; |
|
9452 |
|
9453 { |
|
9454 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9455 symbol_c *IN_param_value = &this->default_variable_name; |
|
9456 |
|
9457 symbol_c *IN_type_symbol = param_data_type; |
|
9458 last_type_symbol = param_data_type; |
|
9459 |
|
9460 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9461 { |
|
9462 |
|
9463 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
9464 s4o.print("("); |
|
9465 return_type_symbol->accept(*this); |
|
9466 s4o.print(")"); |
|
9467 IN_param_value->accept(*this); |
|
9468 return NULL; |
|
9469 |
|
9470 } |
|
9471 |
|
9472 ERROR; |
|
9473 } |
|
9474 |
|
9475 }/*function_byte_to_int*/ |
|
9476 break; |
|
9477 |
|
9478 /**** |
|
9479 *BYTE_TO_DINT |
|
9480 */ |
|
9481 case function_byte_to_dint : |
|
9482 { |
|
9483 symbol_c *last_type_symbol = NULL; |
|
9484 |
|
9485 { |
|
9486 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9487 symbol_c *IN_param_value = &this->default_variable_name; |
|
9488 |
|
9489 symbol_c *IN_type_symbol = param_data_type; |
|
9490 last_type_symbol = param_data_type; |
|
9491 |
|
9492 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9493 { |
|
9494 |
|
9495 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
9496 s4o.print("("); |
|
9497 return_type_symbol->accept(*this); |
|
9498 s4o.print(")"); |
|
9499 IN_param_value->accept(*this); |
|
9500 return NULL; |
|
9501 |
|
9502 } |
|
9503 |
|
9504 ERROR; |
|
9505 } |
|
9506 |
|
9507 }/*function_byte_to_dint*/ |
|
9508 break; |
|
9509 |
|
9510 /**** |
|
9511 *BYTE_TO_LINT |
|
9512 */ |
|
9513 case function_byte_to_lint : |
|
9514 { |
|
9515 symbol_c *last_type_symbol = NULL; |
|
9516 |
|
9517 { |
|
9518 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9519 symbol_c *IN_param_value = &this->default_variable_name; |
|
9520 |
|
9521 symbol_c *IN_type_symbol = param_data_type; |
|
9522 last_type_symbol = param_data_type; |
|
9523 |
|
9524 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9525 { |
|
9526 |
|
9527 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
9528 s4o.print("("); |
|
9529 return_type_symbol->accept(*this); |
|
9530 s4o.print(")"); |
|
9531 IN_param_value->accept(*this); |
|
9532 return NULL; |
|
9533 |
|
9534 } |
|
9535 |
|
9536 ERROR; |
|
9537 } |
|
9538 |
|
9539 }/*function_byte_to_lint*/ |
|
9540 break; |
|
9541 |
|
9542 /**** |
|
9543 *BYTE_TO_USINT |
|
9544 */ |
|
9545 case function_byte_to_usint : |
|
9546 { |
|
9547 symbol_c *last_type_symbol = NULL; |
|
9548 |
|
9549 { |
|
9550 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9551 symbol_c *IN_param_value = &this->default_variable_name; |
|
9552 |
|
9553 symbol_c *IN_type_symbol = param_data_type; |
|
9554 last_type_symbol = param_data_type; |
|
9555 |
|
9556 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9557 { |
|
9558 |
|
9559 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
9560 s4o.print("("); |
|
9561 return_type_symbol->accept(*this); |
|
9562 s4o.print(")"); |
|
9563 IN_param_value->accept(*this); |
|
9564 return NULL; |
|
9565 |
|
9566 } |
|
9567 |
|
9568 ERROR; |
|
9569 } |
|
9570 |
|
9571 }/*function_byte_to_usint*/ |
|
9572 break; |
|
9573 |
|
9574 /**** |
|
9575 *BYTE_TO_UINT |
|
9576 */ |
|
9577 case function_byte_to_uint : |
|
9578 { |
|
9579 symbol_c *last_type_symbol = NULL; |
|
9580 |
|
9581 { |
|
9582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9583 symbol_c *IN_param_value = &this->default_variable_name; |
|
9584 |
|
9585 symbol_c *IN_type_symbol = param_data_type; |
|
9586 last_type_symbol = param_data_type; |
|
9587 |
|
9588 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9589 { |
|
9590 |
|
9591 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
9592 s4o.print("("); |
|
9593 return_type_symbol->accept(*this); |
|
9594 s4o.print(")"); |
|
9595 IN_param_value->accept(*this); |
|
9596 return NULL; |
|
9597 |
|
9598 } |
|
9599 |
|
9600 ERROR; |
|
9601 } |
|
9602 |
|
9603 }/*function_byte_to_uint*/ |
|
9604 break; |
|
9605 |
|
9606 /**** |
|
9607 *BYTE_TO_UDINT |
|
9608 */ |
|
9609 case function_byte_to_udint : |
|
9610 { |
|
9611 symbol_c *last_type_symbol = NULL; |
|
9612 |
|
9613 { |
|
9614 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9615 symbol_c *IN_param_value = &this->default_variable_name; |
|
9616 |
|
9617 symbol_c *IN_type_symbol = param_data_type; |
|
9618 last_type_symbol = param_data_type; |
|
9619 |
|
9620 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9621 { |
|
9622 |
|
9623 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
9624 s4o.print("("); |
|
9625 return_type_symbol->accept(*this); |
|
9626 s4o.print(")"); |
|
9627 IN_param_value->accept(*this); |
|
9628 return NULL; |
|
9629 |
|
9630 } |
|
9631 |
|
9632 ERROR; |
|
9633 } |
|
9634 |
|
9635 }/*function_byte_to_udint*/ |
|
9636 break; |
|
9637 |
|
9638 /**** |
|
9639 *BYTE_TO_ULINT |
|
9640 */ |
|
9641 case function_byte_to_ulint : |
|
9642 { |
|
9643 symbol_c *last_type_symbol = NULL; |
|
9644 |
|
9645 { |
|
9646 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9647 symbol_c *IN_param_value = &this->default_variable_name; |
|
9648 |
|
9649 symbol_c *IN_type_symbol = param_data_type; |
|
9650 last_type_symbol = param_data_type; |
|
9651 |
|
9652 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9653 { |
|
9654 |
|
9655 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
9656 s4o.print("("); |
|
9657 return_type_symbol->accept(*this); |
|
9658 s4o.print(")"); |
|
9659 IN_param_value->accept(*this); |
|
9660 return NULL; |
|
9661 |
|
9662 } |
|
9663 |
|
9664 ERROR; |
|
9665 } |
|
9666 |
|
9667 }/*function_byte_to_ulint*/ |
|
9668 break; |
|
9669 |
|
9670 /**** |
|
9671 *BYTE_TO_REAL |
|
9672 */ |
|
9673 case function_byte_to_real : |
|
9674 { |
|
9675 symbol_c *last_type_symbol = NULL; |
|
9676 |
|
9677 { |
|
9678 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9679 symbol_c *IN_param_value = &this->default_variable_name; |
|
9680 |
|
9681 symbol_c *IN_type_symbol = param_data_type; |
|
9682 last_type_symbol = param_data_type; |
|
9683 |
|
9684 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9685 { |
|
9686 |
|
9687 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
9688 s4o.print("("); |
|
9689 return_type_symbol->accept(*this); |
|
9690 s4o.print(")"); |
|
9691 IN_param_value->accept(*this); |
|
9692 return NULL; |
|
9693 |
|
9694 } |
|
9695 |
|
9696 ERROR; |
|
9697 } |
|
9698 |
|
9699 }/*function_byte_to_real*/ |
|
9700 break; |
|
9701 |
|
9702 /**** |
|
9703 *BYTE_TO_LREAL |
|
9704 */ |
|
9705 case function_byte_to_lreal : |
|
9706 { |
|
9707 symbol_c *last_type_symbol = NULL; |
|
9708 |
|
9709 { |
|
9710 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9711 symbol_c *IN_param_value = &this->default_variable_name; |
|
9712 |
|
9713 symbol_c *IN_type_symbol = param_data_type; |
|
9714 last_type_symbol = param_data_type; |
|
9715 |
|
9716 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9717 { |
|
9718 |
|
9719 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
9720 s4o.print("("); |
|
9721 return_type_symbol->accept(*this); |
|
9722 s4o.print(")"); |
|
9723 IN_param_value->accept(*this); |
|
9724 return NULL; |
|
9725 |
|
9726 } |
|
9727 |
|
9728 ERROR; |
|
9729 } |
|
9730 |
|
9731 }/*function_byte_to_lreal*/ |
|
9732 break; |
|
9733 |
|
9734 /**** |
|
9735 *BYTE_TO_TIME |
|
9736 */ |
|
9737 case function_byte_to_time : |
|
9738 { |
|
9739 symbol_c *last_type_symbol = NULL; |
|
9740 |
|
9741 { |
|
9742 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9743 symbol_c *IN_param_value = &this->default_variable_name; |
|
9744 |
|
9745 symbol_c *IN_type_symbol = param_data_type; |
|
9746 last_type_symbol = param_data_type; |
|
9747 |
|
9748 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9749 { |
|
9750 |
|
9751 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
9752 s4o.print("("); |
|
9753 return_type_symbol->accept(*this); |
|
9754 s4o.print(")__int_to_time("); |
|
9755 IN_param_value->accept(*this); |
|
9756 s4o.print(")"); |
|
9757 return NULL; |
|
9758 |
|
9759 } |
|
9760 |
|
9761 ERROR; |
|
9762 } |
|
9763 |
|
9764 }/*function_byte_to_time*/ |
|
9765 break; |
|
9766 |
|
9767 /**** |
|
9768 *BYTE_TO_DATE |
|
9769 */ |
|
9770 case function_byte_to_date : |
|
9771 { |
|
9772 symbol_c *last_type_symbol = NULL; |
|
9773 |
|
9774 { |
|
9775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9776 symbol_c *IN_param_value = &this->default_variable_name; |
|
9777 |
|
9778 symbol_c *IN_type_symbol = param_data_type; |
|
9779 last_type_symbol = param_data_type; |
|
9780 |
|
9781 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9782 { |
|
9783 |
|
9784 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
9785 s4o.print("("); |
|
9786 return_type_symbol->accept(*this); |
|
9787 s4o.print(")__int_to_time("); |
|
9788 IN_param_value->accept(*this); |
|
9789 s4o.print(")"); |
|
9790 return NULL; |
|
9791 |
|
9792 } |
|
9793 |
|
9794 ERROR; |
|
9795 } |
|
9796 |
|
9797 }/*function_byte_to_date*/ |
|
9798 break; |
|
9799 |
|
9800 /**** |
|
9801 *BYTE_TO_TOD |
|
9802 */ |
|
9803 case function_byte_to_tod : |
|
9804 { |
|
9805 symbol_c *last_type_symbol = NULL; |
|
9806 |
|
9807 { |
|
9808 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9809 symbol_c *IN_param_value = &this->default_variable_name; |
|
9810 |
|
9811 symbol_c *IN_type_symbol = param_data_type; |
|
9812 last_type_symbol = param_data_type; |
|
9813 |
|
9814 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9815 { |
|
9816 |
|
9817 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
9818 s4o.print("("); |
|
9819 return_type_symbol->accept(*this); |
|
9820 s4o.print(")__int_to_time("); |
|
9821 IN_param_value->accept(*this); |
|
9822 s4o.print(")"); |
|
9823 return NULL; |
|
9824 |
|
9825 } |
|
9826 |
|
9827 ERROR; |
|
9828 } |
|
9829 |
|
9830 }/*function_byte_to_tod*/ |
|
9831 break; |
|
9832 |
|
9833 /**** |
|
9834 *BYTE_TO_DT |
|
9835 */ |
|
9836 case function_byte_to_dt : |
|
9837 { |
|
9838 symbol_c *last_type_symbol = NULL; |
|
9839 |
|
9840 { |
|
9841 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9842 symbol_c *IN_param_value = &this->default_variable_name; |
|
9843 |
|
9844 symbol_c *IN_type_symbol = param_data_type; |
|
9845 last_type_symbol = param_data_type; |
|
9846 |
|
9847 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9848 { |
|
9849 |
|
9850 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
9851 s4o.print("("); |
|
9852 return_type_symbol->accept(*this); |
|
9853 s4o.print(")__int_to_time("); |
|
9854 IN_param_value->accept(*this); |
|
9855 s4o.print(")"); |
|
9856 return NULL; |
|
9857 |
|
9858 } |
|
9859 |
|
9860 ERROR; |
|
9861 } |
|
9862 |
|
9863 }/*function_byte_to_dt*/ |
|
9864 break; |
|
9865 |
|
9866 /**** |
|
9867 *BYTE_TO_STRING |
|
9868 */ |
|
9869 case function_byte_to_string : |
|
9870 { |
|
9871 symbol_c *last_type_symbol = NULL; |
|
9872 |
|
9873 { |
|
9874 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9875 symbol_c *IN_param_value = &this->default_variable_name; |
|
9876 |
|
9877 symbol_c *IN_type_symbol = param_data_type; |
|
9878 last_type_symbol = param_data_type; |
|
9879 |
|
9880 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9881 { |
|
9882 |
|
9883 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
9884 s4o.print("("); |
|
9885 return_type_symbol->accept(*this); |
|
9886 s4o.print(")__bit_to_string("); |
|
9887 IN_param_value->accept(*this); |
|
9888 s4o.print(")"); |
|
9889 return NULL; |
|
9890 |
|
9891 } |
|
9892 |
|
9893 ERROR; |
|
9894 } |
|
9895 |
|
9896 }/*function_byte_to_string*/ |
|
9897 break; |
|
9898 |
|
9899 /**** |
|
9900 *BYTE_TO_WORD |
|
9901 */ |
|
9902 case function_byte_to_word : |
|
9903 { |
|
9904 symbol_c *last_type_symbol = NULL; |
|
9905 |
|
9906 { |
|
9907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9908 symbol_c *IN_param_value = &this->default_variable_name; |
|
9909 |
|
9910 symbol_c *IN_type_symbol = param_data_type; |
|
9911 last_type_symbol = param_data_type; |
|
9912 |
|
9913 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9914 { |
|
9915 |
|
9916 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
9917 s4o.print("("); |
|
9918 return_type_symbol->accept(*this); |
|
9919 s4o.print(")"); |
|
9920 IN_param_value->accept(*this); |
|
9921 return NULL; |
|
9922 |
|
9923 } |
|
9924 |
|
9925 ERROR; |
|
9926 } |
|
9927 |
|
9928 }/*function_byte_to_word*/ |
|
9929 break; |
|
9930 |
|
9931 /**** |
|
9932 *BYTE_TO_DWORD |
|
9933 */ |
|
9934 case function_byte_to_dword : |
|
9935 { |
|
9936 symbol_c *last_type_symbol = NULL; |
|
9937 |
|
9938 { |
|
9939 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9940 symbol_c *IN_param_value = &this->default_variable_name; |
|
9941 |
|
9942 symbol_c *IN_type_symbol = param_data_type; |
|
9943 last_type_symbol = param_data_type; |
|
9944 |
|
9945 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9946 { |
|
9947 |
|
9948 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
9949 s4o.print("("); |
|
9950 return_type_symbol->accept(*this); |
|
9951 s4o.print(")"); |
|
9952 IN_param_value->accept(*this); |
|
9953 return NULL; |
|
9954 |
|
9955 } |
|
9956 |
|
9957 ERROR; |
|
9958 } |
|
9959 |
|
9960 }/*function_byte_to_dword*/ |
|
9961 break; |
|
9962 |
|
9963 /**** |
|
9964 *BYTE_TO_LWORD |
|
9965 */ |
|
9966 case function_byte_to_lword : |
|
9967 { |
|
9968 symbol_c *last_type_symbol = NULL; |
|
9969 |
|
9970 { |
|
9971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
9972 symbol_c *IN_param_value = &this->default_variable_name; |
|
9973 |
|
9974 symbol_c *IN_type_symbol = param_data_type; |
|
9975 last_type_symbol = param_data_type; |
|
9976 |
|
9977 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
9978 { |
|
9979 |
|
9980 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
9981 s4o.print("("); |
|
9982 return_type_symbol->accept(*this); |
|
9983 s4o.print(")"); |
|
9984 IN_param_value->accept(*this); |
|
9985 return NULL; |
|
9986 |
|
9987 } |
|
9988 |
|
9989 ERROR; |
|
9990 } |
|
9991 |
|
9992 }/*function_byte_to_lword*/ |
|
9993 break; |
|
9994 |
|
9995 /**** |
|
9996 *WORD_TO_BOOL |
|
9997 */ |
|
9998 case function_word_to_bool : |
|
9999 { |
|
10000 symbol_c *last_type_symbol = NULL; |
|
10001 |
|
10002 { |
|
10003 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10004 symbol_c *IN_param_value = &this->default_variable_name; |
|
10005 |
|
10006 symbol_c *IN_type_symbol = param_data_type; |
|
10007 last_type_symbol = param_data_type; |
|
10008 |
|
10009 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10010 { |
|
10011 |
|
10012 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10013 s4o.print("("); |
|
10014 return_type_symbol->accept(*this); |
|
10015 s4o.print(")"); |
|
10016 IN_param_value->accept(*this); |
|
10017 return NULL; |
|
10018 |
|
10019 } |
|
10020 |
|
10021 ERROR; |
|
10022 } |
|
10023 |
|
10024 }/*function_word_to_bool*/ |
|
10025 break; |
|
10026 |
|
10027 /**** |
|
10028 *WORD_TO_SINT |
|
10029 */ |
|
10030 case function_word_to_sint : |
|
10031 { |
|
10032 symbol_c *last_type_symbol = NULL; |
|
10033 |
|
10034 { |
|
10035 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10036 symbol_c *IN_param_value = &this->default_variable_name; |
|
10037 |
|
10038 symbol_c *IN_type_symbol = param_data_type; |
|
10039 last_type_symbol = param_data_type; |
|
10040 |
|
10041 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10042 { |
|
10043 |
|
10044 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10045 s4o.print("("); |
|
10046 return_type_symbol->accept(*this); |
|
10047 s4o.print(")"); |
|
10048 IN_param_value->accept(*this); |
|
10049 return NULL; |
|
10050 |
|
10051 } |
|
10052 |
|
10053 ERROR; |
|
10054 } |
|
10055 |
|
10056 }/*function_word_to_sint*/ |
|
10057 break; |
|
10058 |
|
10059 /**** |
|
10060 *WORD_TO_INT |
|
10061 */ |
|
10062 case function_word_to_int : |
|
10063 { |
|
10064 symbol_c *last_type_symbol = NULL; |
|
10065 |
|
10066 { |
|
10067 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10068 symbol_c *IN_param_value = &this->default_variable_name; |
|
10069 |
|
10070 symbol_c *IN_type_symbol = param_data_type; |
|
10071 last_type_symbol = param_data_type; |
|
10072 |
|
10073 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10074 { |
|
10075 |
|
10076 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10077 s4o.print("("); |
|
10078 return_type_symbol->accept(*this); |
|
10079 s4o.print(")"); |
|
10080 IN_param_value->accept(*this); |
|
10081 return NULL; |
|
10082 |
|
10083 } |
|
10084 |
|
10085 ERROR; |
|
10086 } |
|
10087 |
|
10088 }/*function_word_to_int*/ |
|
10089 break; |
|
10090 |
|
10091 /**** |
|
10092 *WORD_TO_DINT |
|
10093 */ |
|
10094 case function_word_to_dint : |
|
10095 { |
|
10096 symbol_c *last_type_symbol = NULL; |
|
10097 |
|
10098 { |
|
10099 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10100 symbol_c *IN_param_value = &this->default_variable_name; |
|
10101 |
|
10102 symbol_c *IN_type_symbol = param_data_type; |
|
10103 last_type_symbol = param_data_type; |
|
10104 |
|
10105 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10106 { |
|
10107 |
|
10108 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10109 s4o.print("("); |
|
10110 return_type_symbol->accept(*this); |
|
10111 s4o.print(")"); |
|
10112 IN_param_value->accept(*this); |
|
10113 return NULL; |
|
10114 |
|
10115 } |
|
10116 |
|
10117 ERROR; |
|
10118 } |
|
10119 |
|
10120 }/*function_word_to_dint*/ |
|
10121 break; |
|
10122 |
|
10123 /**** |
|
10124 *WORD_TO_LINT |
|
10125 */ |
|
10126 case function_word_to_lint : |
|
10127 { |
|
10128 symbol_c *last_type_symbol = NULL; |
|
10129 |
|
10130 { |
|
10131 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10132 symbol_c *IN_param_value = &this->default_variable_name; |
|
10133 |
|
10134 symbol_c *IN_type_symbol = param_data_type; |
|
10135 last_type_symbol = param_data_type; |
|
10136 |
|
10137 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10138 { |
|
10139 |
|
10140 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10141 s4o.print("("); |
|
10142 return_type_symbol->accept(*this); |
|
10143 s4o.print(")"); |
|
10144 IN_param_value->accept(*this); |
|
10145 return NULL; |
|
10146 |
|
10147 } |
|
10148 |
|
10149 ERROR; |
|
10150 } |
|
10151 |
|
10152 }/*function_word_to_lint*/ |
|
10153 break; |
|
10154 |
|
10155 /**** |
|
10156 *WORD_TO_USINT |
|
10157 */ |
|
10158 case function_word_to_usint : |
|
10159 { |
|
10160 symbol_c *last_type_symbol = NULL; |
|
10161 |
|
10162 { |
|
10163 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10164 symbol_c *IN_param_value = &this->default_variable_name; |
|
10165 |
|
10166 symbol_c *IN_type_symbol = param_data_type; |
|
10167 last_type_symbol = param_data_type; |
|
10168 |
|
10169 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10170 { |
|
10171 |
|
10172 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
10173 s4o.print("("); |
|
10174 return_type_symbol->accept(*this); |
|
10175 s4o.print(")"); |
|
10176 IN_param_value->accept(*this); |
|
10177 return NULL; |
|
10178 |
|
10179 } |
|
10180 |
|
10181 ERROR; |
|
10182 } |
|
10183 |
|
10184 }/*function_word_to_usint*/ |
|
10185 break; |
|
10186 |
|
10187 /**** |
|
10188 *WORD_TO_UINT |
|
10189 */ |
|
10190 case function_word_to_uint : |
|
10191 { |
|
10192 symbol_c *last_type_symbol = NULL; |
|
10193 |
|
10194 { |
|
10195 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10196 symbol_c *IN_param_value = &this->default_variable_name; |
|
10197 |
|
10198 symbol_c *IN_type_symbol = param_data_type; |
|
10199 last_type_symbol = param_data_type; |
|
10200 |
|
10201 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10202 { |
|
10203 |
|
10204 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10205 s4o.print("("); |
|
10206 return_type_symbol->accept(*this); |
|
10207 s4o.print(")"); |
|
10208 IN_param_value->accept(*this); |
|
10209 return NULL; |
|
10210 |
|
10211 } |
|
10212 |
|
10213 ERROR; |
|
10214 } |
|
10215 |
|
10216 }/*function_word_to_uint*/ |
|
10217 break; |
|
10218 |
|
10219 /**** |
|
10220 *WORD_TO_UDINT |
|
10221 */ |
|
10222 case function_word_to_udint : |
|
10223 { |
|
10224 symbol_c *last_type_symbol = NULL; |
|
10225 |
|
10226 { |
|
10227 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10228 symbol_c *IN_param_value = &this->default_variable_name; |
|
10229 |
|
10230 symbol_c *IN_type_symbol = param_data_type; |
|
10231 last_type_symbol = param_data_type; |
|
10232 |
|
10233 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10234 { |
|
10235 |
|
10236 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10237 s4o.print("("); |
|
10238 return_type_symbol->accept(*this); |
|
10239 s4o.print(")"); |
|
10240 IN_param_value->accept(*this); |
|
10241 return NULL; |
|
10242 |
|
10243 } |
|
10244 |
|
10245 ERROR; |
|
10246 } |
|
10247 |
|
10248 }/*function_word_to_udint*/ |
|
10249 break; |
|
10250 |
|
10251 /**** |
|
10252 *WORD_TO_ULINT |
|
10253 */ |
|
10254 case function_word_to_ulint : |
|
10255 { |
|
10256 symbol_c *last_type_symbol = NULL; |
|
10257 |
|
10258 { |
|
10259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10260 symbol_c *IN_param_value = &this->default_variable_name; |
|
10261 |
|
10262 symbol_c *IN_type_symbol = param_data_type; |
|
10263 last_type_symbol = param_data_type; |
|
10264 |
|
10265 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10266 { |
|
10267 |
|
10268 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10269 s4o.print("("); |
|
10270 return_type_symbol->accept(*this); |
|
10271 s4o.print(")"); |
|
10272 IN_param_value->accept(*this); |
|
10273 return NULL; |
|
10274 |
|
10275 } |
|
10276 |
|
10277 ERROR; |
|
10278 } |
|
10279 |
|
10280 }/*function_word_to_ulint*/ |
|
10281 break; |
|
10282 |
|
10283 /**** |
|
10284 *WORD_TO_REAL |
|
10285 */ |
|
10286 case function_word_to_real : |
|
10287 { |
|
10288 symbol_c *last_type_symbol = NULL; |
|
10289 |
|
10290 { |
|
10291 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10292 symbol_c *IN_param_value = &this->default_variable_name; |
|
10293 |
|
10294 symbol_c *IN_type_symbol = param_data_type; |
|
10295 last_type_symbol = param_data_type; |
|
10296 |
|
10297 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10298 { |
|
10299 |
|
10300 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10301 s4o.print("("); |
|
10302 return_type_symbol->accept(*this); |
|
10303 s4o.print(")"); |
|
10304 IN_param_value->accept(*this); |
|
10305 return NULL; |
|
10306 |
|
10307 } |
|
10308 |
|
10309 ERROR; |
|
10310 } |
|
10311 |
|
10312 }/*function_word_to_real*/ |
|
10313 break; |
|
10314 |
|
10315 /**** |
|
10316 *WORD_TO_LREAL |
|
10317 */ |
|
10318 case function_word_to_lreal : |
|
10319 { |
|
10320 symbol_c *last_type_symbol = NULL; |
|
10321 |
|
10322 { |
|
10323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10324 symbol_c *IN_param_value = &this->default_variable_name; |
|
10325 |
|
10326 symbol_c *IN_type_symbol = param_data_type; |
|
10327 last_type_symbol = param_data_type; |
|
10328 |
|
10329 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10330 { |
|
10331 |
|
10332 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10333 s4o.print("("); |
|
10334 return_type_symbol->accept(*this); |
|
10335 s4o.print(")"); |
|
10336 IN_param_value->accept(*this); |
|
10337 return NULL; |
|
10338 |
|
10339 } |
|
10340 |
|
10341 ERROR; |
|
10342 } |
|
10343 |
|
10344 }/*function_word_to_lreal*/ |
|
10345 break; |
|
10346 |
|
10347 /**** |
|
10348 *WORD_TO_TIME |
|
10349 */ |
|
10350 case function_word_to_time : |
|
10351 { |
|
10352 symbol_c *last_type_symbol = NULL; |
|
10353 |
|
10354 { |
|
10355 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10356 symbol_c *IN_param_value = &this->default_variable_name; |
|
10357 |
|
10358 symbol_c *IN_type_symbol = param_data_type; |
|
10359 last_type_symbol = param_data_type; |
|
10360 |
|
10361 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10362 { |
|
10363 |
|
10364 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10365 s4o.print("("); |
|
10366 return_type_symbol->accept(*this); |
|
10367 s4o.print(")__int_to_time("); |
|
10368 IN_param_value->accept(*this); |
|
10369 s4o.print(")"); |
|
10370 return NULL; |
|
10371 |
|
10372 } |
|
10373 |
|
10374 ERROR; |
|
10375 } |
|
10376 |
|
10377 }/*function_word_to_time*/ |
|
10378 break; |
|
10379 |
|
10380 /**** |
|
10381 *WORD_TO_DATE |
|
10382 */ |
|
10383 case function_word_to_date : |
|
10384 { |
|
10385 symbol_c *last_type_symbol = NULL; |
|
10386 |
|
10387 { |
|
10388 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10389 symbol_c *IN_param_value = &this->default_variable_name; |
|
10390 |
|
10391 symbol_c *IN_type_symbol = param_data_type; |
|
10392 last_type_symbol = param_data_type; |
|
10393 |
|
10394 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10395 { |
|
10396 |
|
10397 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
10398 s4o.print("("); |
|
10399 return_type_symbol->accept(*this); |
|
10400 s4o.print(")__int_to_time("); |
|
10401 IN_param_value->accept(*this); |
|
10402 s4o.print(")"); |
|
10403 return NULL; |
|
10404 |
|
10405 } |
|
10406 |
|
10407 ERROR; |
|
10408 } |
|
10409 |
|
10410 }/*function_word_to_date*/ |
|
10411 break; |
|
10412 |
|
10413 /**** |
|
10414 *WORD_TO_TOD |
|
10415 */ |
|
10416 case function_word_to_tod : |
|
10417 { |
|
10418 symbol_c *last_type_symbol = NULL; |
|
10419 |
|
10420 { |
|
10421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10422 symbol_c *IN_param_value = &this->default_variable_name; |
|
10423 |
|
10424 symbol_c *IN_type_symbol = param_data_type; |
|
10425 last_type_symbol = param_data_type; |
|
10426 |
|
10427 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10428 { |
|
10429 |
|
10430 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
10431 s4o.print("("); |
|
10432 return_type_symbol->accept(*this); |
|
10433 s4o.print(")__int_to_time("); |
|
10434 IN_param_value->accept(*this); |
|
10435 s4o.print(")"); |
|
10436 return NULL; |
|
10437 |
|
10438 } |
|
10439 |
|
10440 ERROR; |
|
10441 } |
|
10442 |
|
10443 }/*function_word_to_tod*/ |
|
10444 break; |
|
10445 |
|
10446 /**** |
|
10447 *WORD_TO_DT |
|
10448 */ |
|
10449 case function_word_to_dt : |
|
10450 { |
|
10451 symbol_c *last_type_symbol = NULL; |
|
10452 |
|
10453 { |
|
10454 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10455 symbol_c *IN_param_value = &this->default_variable_name; |
|
10456 |
|
10457 symbol_c *IN_type_symbol = param_data_type; |
|
10458 last_type_symbol = param_data_type; |
|
10459 |
|
10460 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10461 { |
|
10462 |
|
10463 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
10464 s4o.print("("); |
|
10465 return_type_symbol->accept(*this); |
|
10466 s4o.print(")__int_to_time("); |
|
10467 IN_param_value->accept(*this); |
|
10468 s4o.print(")"); |
|
10469 return NULL; |
|
10470 |
|
10471 } |
|
10472 |
|
10473 ERROR; |
|
10474 } |
|
10475 |
|
10476 }/*function_word_to_dt*/ |
|
10477 break; |
|
10478 |
|
10479 /**** |
|
10480 *WORD_TO_STRING |
|
10481 */ |
|
10482 case function_word_to_string : |
|
10483 { |
|
10484 symbol_c *last_type_symbol = NULL; |
|
10485 |
|
10486 { |
|
10487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10488 symbol_c *IN_param_value = &this->default_variable_name; |
|
10489 |
|
10490 symbol_c *IN_type_symbol = param_data_type; |
|
10491 last_type_symbol = param_data_type; |
|
10492 |
|
10493 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10494 { |
|
10495 |
|
10496 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
10497 s4o.print("("); |
|
10498 return_type_symbol->accept(*this); |
|
10499 s4o.print(")__bit_to_string("); |
|
10500 IN_param_value->accept(*this); |
|
10501 s4o.print(")"); |
|
10502 return NULL; |
|
10503 |
|
10504 } |
|
10505 |
|
10506 ERROR; |
|
10507 } |
|
10508 |
|
10509 }/*function_word_to_string*/ |
|
10510 break; |
|
10511 |
|
10512 /**** |
|
10513 *WORD_TO_BYTE |
|
10514 */ |
|
10515 case function_word_to_byte : |
|
10516 { |
|
10517 symbol_c *last_type_symbol = NULL; |
|
10518 |
|
10519 { |
|
10520 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10521 symbol_c *IN_param_value = &this->default_variable_name; |
|
10522 |
|
10523 symbol_c *IN_type_symbol = param_data_type; |
|
10524 last_type_symbol = param_data_type; |
|
10525 |
|
10526 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10527 { |
|
10528 |
|
10529 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
10530 s4o.print("("); |
|
10531 return_type_symbol->accept(*this); |
|
10532 s4o.print(")"); |
|
10533 IN_param_value->accept(*this); |
|
10534 return NULL; |
|
10535 |
|
10536 } |
|
10537 |
|
10538 ERROR; |
|
10539 } |
|
10540 |
|
10541 }/*function_word_to_byte*/ |
|
10542 break; |
|
10543 |
|
10544 /**** |
|
10545 *WORD_TO_DWORD |
|
10546 */ |
|
10547 case function_word_to_dword : |
|
10548 { |
|
10549 symbol_c *last_type_symbol = NULL; |
|
10550 |
|
10551 { |
|
10552 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10553 symbol_c *IN_param_value = &this->default_variable_name; |
|
10554 |
|
10555 symbol_c *IN_type_symbol = param_data_type; |
|
10556 last_type_symbol = param_data_type; |
|
10557 |
|
10558 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10559 { |
|
10560 |
|
10561 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
10562 s4o.print("("); |
|
10563 return_type_symbol->accept(*this); |
|
10564 s4o.print(")"); |
|
10565 IN_param_value->accept(*this); |
|
10566 return NULL; |
|
10567 |
|
10568 } |
|
10569 |
|
10570 ERROR; |
|
10571 } |
|
10572 |
|
10573 }/*function_word_to_dword*/ |
|
10574 break; |
|
10575 |
|
10576 /**** |
|
10577 *WORD_TO_LWORD |
|
10578 */ |
|
10579 case function_word_to_lword : |
|
10580 { |
|
10581 symbol_c *last_type_symbol = NULL; |
|
10582 |
|
10583 { |
|
10584 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10585 symbol_c *IN_param_value = &this->default_variable_name; |
|
10586 |
|
10587 symbol_c *IN_type_symbol = param_data_type; |
|
10588 last_type_symbol = param_data_type; |
|
10589 |
|
10590 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
10591 { |
|
10592 |
|
10593 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
10594 s4o.print("("); |
|
10595 return_type_symbol->accept(*this); |
|
10596 s4o.print(")"); |
|
10597 IN_param_value->accept(*this); |
|
10598 return NULL; |
|
10599 |
|
10600 } |
|
10601 |
|
10602 ERROR; |
|
10603 } |
|
10604 |
|
10605 }/*function_word_to_lword*/ |
|
10606 break; |
|
10607 |
|
10608 /**** |
|
10609 *DWORD_TO_BOOL |
|
10610 */ |
|
10611 case function_dword_to_bool : |
|
10612 { |
|
10613 symbol_c *last_type_symbol = NULL; |
|
10614 |
|
10615 { |
|
10616 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10617 symbol_c *IN_param_value = &this->default_variable_name; |
|
10618 |
|
10619 symbol_c *IN_type_symbol = param_data_type; |
|
10620 last_type_symbol = param_data_type; |
|
10621 |
|
10622 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10623 { |
|
10624 |
|
10625 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
10626 s4o.print("("); |
|
10627 return_type_symbol->accept(*this); |
|
10628 s4o.print(")"); |
|
10629 IN_param_value->accept(*this); |
|
10630 return NULL; |
|
10631 |
|
10632 } |
|
10633 |
|
10634 ERROR; |
|
10635 } |
|
10636 |
|
10637 }/*function_dword_to_bool*/ |
|
10638 break; |
|
10639 |
|
10640 /**** |
|
10641 *DWORD_TO_SINT |
|
10642 */ |
|
10643 case function_dword_to_sint : |
|
10644 { |
|
10645 symbol_c *last_type_symbol = NULL; |
|
10646 |
|
10647 { |
|
10648 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10649 symbol_c *IN_param_value = &this->default_variable_name; |
|
10650 |
|
10651 symbol_c *IN_type_symbol = param_data_type; |
|
10652 last_type_symbol = param_data_type; |
|
10653 |
|
10654 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10655 { |
|
10656 |
|
10657 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
10658 s4o.print("("); |
|
10659 return_type_symbol->accept(*this); |
|
10660 s4o.print(")"); |
|
10661 IN_param_value->accept(*this); |
|
10662 return NULL; |
|
10663 |
|
10664 } |
|
10665 |
|
10666 ERROR; |
|
10667 } |
|
10668 |
|
10669 }/*function_dword_to_sint*/ |
|
10670 break; |
|
10671 |
|
10672 /**** |
|
10673 *DWORD_TO_INT |
|
10674 */ |
|
10675 case function_dword_to_int : |
|
10676 { |
|
10677 symbol_c *last_type_symbol = NULL; |
|
10678 |
|
10679 { |
|
10680 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10681 symbol_c *IN_param_value = &this->default_variable_name; |
|
10682 |
|
10683 symbol_c *IN_type_symbol = param_data_type; |
|
10684 last_type_symbol = param_data_type; |
|
10685 |
|
10686 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10687 { |
|
10688 |
|
10689 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
10690 s4o.print("("); |
|
10691 return_type_symbol->accept(*this); |
|
10692 s4o.print(")"); |
|
10693 IN_param_value->accept(*this); |
|
10694 return NULL; |
|
10695 |
|
10696 } |
|
10697 |
|
10698 ERROR; |
|
10699 } |
|
10700 |
|
10701 }/*function_dword_to_int*/ |
|
10702 break; |
|
10703 |
|
10704 /**** |
|
10705 *DWORD_TO_DINT |
|
10706 */ |
|
10707 case function_dword_to_dint : |
|
10708 { |
|
10709 symbol_c *last_type_symbol = NULL; |
|
10710 |
|
10711 { |
|
10712 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10713 symbol_c *IN_param_value = &this->default_variable_name; |
|
10714 |
|
10715 symbol_c *IN_type_symbol = param_data_type; |
|
10716 last_type_symbol = param_data_type; |
|
10717 |
|
10718 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10719 { |
|
10720 |
|
10721 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
10722 s4o.print("("); |
|
10723 return_type_symbol->accept(*this); |
|
10724 s4o.print(")"); |
|
10725 IN_param_value->accept(*this); |
|
10726 return NULL; |
|
10727 |
|
10728 } |
|
10729 |
|
10730 ERROR; |
|
10731 } |
|
10732 |
|
10733 }/*function_dword_to_dint*/ |
|
10734 break; |
|
10735 |
|
10736 /**** |
|
10737 *DWORD_TO_LINT |
|
10738 */ |
|
10739 case function_dword_to_lint : |
|
10740 { |
|
10741 symbol_c *last_type_symbol = NULL; |
|
10742 |
|
10743 { |
|
10744 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10745 symbol_c *IN_param_value = &this->default_variable_name; |
|
10746 |
|
10747 symbol_c *IN_type_symbol = param_data_type; |
|
10748 last_type_symbol = param_data_type; |
|
10749 |
|
10750 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10751 { |
|
10752 |
|
10753 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
10754 s4o.print("("); |
|
10755 return_type_symbol->accept(*this); |
|
10756 s4o.print(")"); |
|
10757 IN_param_value->accept(*this); |
|
10758 return NULL; |
|
10759 |
|
10760 } |
|
10761 |
|
10762 ERROR; |
|
10763 } |
|
10764 |
|
10765 }/*function_dword_to_lint*/ |
|
10766 break; |
|
10767 |
|
10768 /**** |
|
10769 *DWORD_TO_USINT |
|
10770 */ |
|
10771 case function_dword_to_usint : |
|
10772 { |
|
10773 symbol_c *last_type_symbol = NULL; |
|
10774 |
|
10775 { |
|
10776 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10777 symbol_c *IN_param_value = &this->default_variable_name; |
|
10778 |
|
10779 symbol_c *IN_type_symbol = param_data_type; |
|
10780 last_type_symbol = param_data_type; |
|
10781 |
|
10782 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10783 { |
|
10784 |
|
10785 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
10786 s4o.print("("); |
|
10787 return_type_symbol->accept(*this); |
|
10788 s4o.print(")"); |
|
10789 IN_param_value->accept(*this); |
|
10790 return NULL; |
|
10791 |
|
10792 } |
|
10793 |
|
10794 ERROR; |
|
10795 } |
|
10796 |
|
10797 }/*function_dword_to_usint*/ |
|
10798 break; |
|
10799 |
|
10800 /**** |
|
10801 *DWORD_TO_UINT |
|
10802 */ |
|
10803 case function_dword_to_uint : |
|
10804 { |
|
10805 symbol_c *last_type_symbol = NULL; |
|
10806 |
|
10807 { |
|
10808 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10809 symbol_c *IN_param_value = &this->default_variable_name; |
|
10810 |
|
10811 symbol_c *IN_type_symbol = param_data_type; |
|
10812 last_type_symbol = param_data_type; |
|
10813 |
|
10814 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10815 { |
|
10816 |
|
10817 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
10818 s4o.print("("); |
|
10819 return_type_symbol->accept(*this); |
|
10820 s4o.print(")"); |
|
10821 IN_param_value->accept(*this); |
|
10822 return NULL; |
|
10823 |
|
10824 } |
|
10825 |
|
10826 ERROR; |
|
10827 } |
|
10828 |
|
10829 }/*function_dword_to_uint*/ |
|
10830 break; |
|
10831 |
|
10832 /**** |
|
10833 *DWORD_TO_UDINT |
|
10834 */ |
|
10835 case function_dword_to_udint : |
|
10836 { |
|
10837 symbol_c *last_type_symbol = NULL; |
|
10838 |
|
10839 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10847 { |
|
10848 |
|
10849 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
10850 s4o.print("("); |
|
10851 return_type_symbol->accept(*this); |
|
10852 s4o.print(")"); |
|
10853 IN_param_value->accept(*this); |
|
10854 return NULL; |
|
10855 |
|
10856 } |
|
10857 |
|
10858 ERROR; |
|
10859 } |
|
10860 |
|
10861 }/*function_dword_to_udint*/ |
|
10862 break; |
|
10863 |
|
10864 /**** |
|
10865 *DWORD_TO_ULINT |
|
10866 */ |
|
10867 case function_dword_to_ulint : |
|
10868 { |
|
10869 symbol_c *last_type_symbol = NULL; |
|
10870 |
|
10871 { |
|
10872 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10873 symbol_c *IN_param_value = &this->default_variable_name; |
|
10874 |
|
10875 symbol_c *IN_type_symbol = param_data_type; |
|
10876 last_type_symbol = param_data_type; |
|
10877 |
|
10878 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10879 { |
|
10880 |
|
10881 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
10882 s4o.print("("); |
|
10883 return_type_symbol->accept(*this); |
|
10884 s4o.print(")"); |
|
10885 IN_param_value->accept(*this); |
|
10886 return NULL; |
|
10887 |
|
10888 } |
|
10889 |
|
10890 ERROR; |
|
10891 } |
|
10892 |
|
10893 }/*function_dword_to_ulint*/ |
|
10894 break; |
|
10895 |
|
10896 /**** |
|
10897 *DWORD_TO_REAL |
|
10898 */ |
|
10899 case function_dword_to_real : |
|
10900 { |
|
10901 symbol_c *last_type_symbol = NULL; |
|
10902 |
|
10903 { |
|
10904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10905 symbol_c *IN_param_value = &this->default_variable_name; |
|
10906 |
|
10907 symbol_c *IN_type_symbol = param_data_type; |
|
10908 last_type_symbol = param_data_type; |
|
10909 |
|
10910 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10911 { |
|
10912 |
|
10913 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
10914 s4o.print("("); |
|
10915 return_type_symbol->accept(*this); |
|
10916 s4o.print(")"); |
|
10917 IN_param_value->accept(*this); |
|
10918 return NULL; |
|
10919 |
|
10920 } |
|
10921 |
|
10922 ERROR; |
|
10923 } |
|
10924 |
|
10925 }/*function_dword_to_real*/ |
|
10926 break; |
|
10927 |
|
10928 /**** |
|
10929 *DWORD_TO_LREAL |
|
10930 */ |
|
10931 case function_dword_to_lreal : |
|
10932 { |
|
10933 symbol_c *last_type_symbol = NULL; |
|
10934 |
|
10935 { |
|
10936 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10937 symbol_c *IN_param_value = &this->default_variable_name; |
|
10938 |
|
10939 symbol_c *IN_type_symbol = param_data_type; |
|
10940 last_type_symbol = param_data_type; |
|
10941 |
|
10942 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10943 { |
|
10944 |
|
10945 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
10946 s4o.print("("); |
|
10947 return_type_symbol->accept(*this); |
|
10948 s4o.print(")"); |
|
10949 IN_param_value->accept(*this); |
|
10950 return NULL; |
|
10951 |
|
10952 } |
|
10953 |
|
10954 ERROR; |
|
10955 } |
|
10956 |
|
10957 }/*function_dword_to_lreal*/ |
|
10958 break; |
|
10959 |
|
10960 /**** |
|
10961 *DWORD_TO_TIME |
|
10962 */ |
|
10963 case function_dword_to_time : |
|
10964 { |
|
10965 symbol_c *last_type_symbol = NULL; |
|
10966 |
|
10967 { |
|
10968 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
10969 symbol_c *IN_param_value = &this->default_variable_name; |
|
10970 |
|
10971 symbol_c *IN_type_symbol = param_data_type; |
|
10972 last_type_symbol = param_data_type; |
|
10973 |
|
10974 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
10975 { |
|
10976 |
|
10977 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
10978 s4o.print("("); |
|
10979 return_type_symbol->accept(*this); |
|
10980 s4o.print(")__int_to_time("); |
|
10981 IN_param_value->accept(*this); |
|
10982 s4o.print(")"); |
|
10983 return NULL; |
|
10984 |
|
10985 } |
|
10986 |
|
10987 ERROR; |
|
10988 } |
|
10989 |
|
10990 }/*function_dword_to_time*/ |
|
10991 break; |
|
10992 |
|
10993 /**** |
|
10994 *DWORD_TO_DATE |
|
10995 */ |
|
10996 case function_dword_to_date : |
|
10997 { |
|
10998 symbol_c *last_type_symbol = NULL; |
|
10999 |
|
11000 { |
|
11001 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11002 symbol_c *IN_param_value = &this->default_variable_name; |
|
11003 |
|
11004 symbol_c *IN_type_symbol = param_data_type; |
|
11005 last_type_symbol = param_data_type; |
|
11006 |
|
11007 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11008 { |
|
11009 |
|
11010 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11011 s4o.print("("); |
|
11012 return_type_symbol->accept(*this); |
|
11013 s4o.print(")__int_to_time("); |
|
11014 IN_param_value->accept(*this); |
|
11015 s4o.print(")"); |
|
11016 return NULL; |
|
11017 |
|
11018 } |
|
11019 |
|
11020 ERROR; |
|
11021 } |
|
11022 |
|
11023 }/*function_dword_to_date*/ |
|
11024 break; |
|
11025 |
|
11026 /**** |
|
11027 *DWORD_TO_TOD |
|
11028 */ |
|
11029 case function_dword_to_tod : |
|
11030 { |
|
11031 symbol_c *last_type_symbol = NULL; |
|
11032 |
|
11033 { |
|
11034 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11035 symbol_c *IN_param_value = &this->default_variable_name; |
|
11036 |
|
11037 symbol_c *IN_type_symbol = param_data_type; |
|
11038 last_type_symbol = param_data_type; |
|
11039 |
|
11040 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11041 { |
|
11042 |
|
11043 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11044 s4o.print("("); |
|
11045 return_type_symbol->accept(*this); |
|
11046 s4o.print(")__int_to_time("); |
|
11047 IN_param_value->accept(*this); |
|
11048 s4o.print(")"); |
|
11049 return NULL; |
|
11050 |
|
11051 } |
|
11052 |
|
11053 ERROR; |
|
11054 } |
|
11055 |
|
11056 }/*function_dword_to_tod*/ |
|
11057 break; |
|
11058 |
|
11059 /**** |
|
11060 *DWORD_TO_DT |
|
11061 */ |
|
11062 case function_dword_to_dt : |
|
11063 { |
|
11064 symbol_c *last_type_symbol = NULL; |
|
11065 |
|
11066 { |
|
11067 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11068 symbol_c *IN_param_value = &this->default_variable_name; |
|
11069 |
|
11070 symbol_c *IN_type_symbol = param_data_type; |
|
11071 last_type_symbol = param_data_type; |
|
11072 |
|
11073 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11074 { |
|
11075 |
|
11076 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11077 s4o.print("("); |
|
11078 return_type_symbol->accept(*this); |
|
11079 s4o.print(")__int_to_time("); |
|
11080 IN_param_value->accept(*this); |
|
11081 s4o.print(")"); |
|
11082 return NULL; |
|
11083 |
|
11084 } |
|
11085 |
|
11086 ERROR; |
|
11087 } |
|
11088 |
|
11089 }/*function_dword_to_dt*/ |
|
11090 break; |
|
11091 |
|
11092 /**** |
|
11093 *DWORD_TO_STRING |
|
11094 */ |
|
11095 case function_dword_to_string : |
|
11096 { |
|
11097 symbol_c *last_type_symbol = NULL; |
|
11098 |
|
11099 { |
|
11100 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11101 symbol_c *IN_param_value = &this->default_variable_name; |
|
11102 |
|
11103 symbol_c *IN_type_symbol = param_data_type; |
|
11104 last_type_symbol = param_data_type; |
|
11105 |
|
11106 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11107 { |
|
11108 |
|
11109 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11110 s4o.print("("); |
|
11111 return_type_symbol->accept(*this); |
|
11112 s4o.print(")__bit_to_string("); |
|
11113 IN_param_value->accept(*this); |
|
11114 s4o.print(")"); |
|
11115 return NULL; |
|
11116 |
|
11117 } |
|
11118 |
|
11119 ERROR; |
|
11120 } |
|
11121 |
|
11122 }/*function_dword_to_string*/ |
|
11123 break; |
|
11124 |
|
11125 /**** |
|
11126 *DWORD_TO_BYTE |
|
11127 */ |
|
11128 case function_dword_to_byte : |
|
11129 { |
|
11130 symbol_c *last_type_symbol = NULL; |
|
11131 |
|
11132 { |
|
11133 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11134 symbol_c *IN_param_value = &this->default_variable_name; |
|
11135 |
|
11136 symbol_c *IN_type_symbol = param_data_type; |
|
11137 last_type_symbol = param_data_type; |
|
11138 |
|
11139 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11140 { |
|
11141 |
|
11142 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11143 s4o.print("("); |
|
11144 return_type_symbol->accept(*this); |
|
11145 s4o.print(")"); |
|
11146 IN_param_value->accept(*this); |
|
11147 return NULL; |
|
11148 |
|
11149 } |
|
11150 |
|
11151 ERROR; |
|
11152 } |
|
11153 |
|
11154 }/*function_dword_to_byte*/ |
|
11155 break; |
|
11156 |
|
11157 /**** |
|
11158 *DWORD_TO_WORD |
|
11159 */ |
|
11160 case function_dword_to_word : |
|
11161 { |
|
11162 symbol_c *last_type_symbol = NULL; |
|
11163 |
|
11164 { |
|
11165 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11166 symbol_c *IN_param_value = &this->default_variable_name; |
|
11167 |
|
11168 symbol_c *IN_type_symbol = param_data_type; |
|
11169 last_type_symbol = param_data_type; |
|
11170 |
|
11171 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11172 { |
|
11173 |
|
11174 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11175 s4o.print("("); |
|
11176 return_type_symbol->accept(*this); |
|
11177 s4o.print(")"); |
|
11178 IN_param_value->accept(*this); |
|
11179 return NULL; |
|
11180 |
|
11181 } |
|
11182 |
|
11183 ERROR; |
|
11184 } |
|
11185 |
|
11186 }/*function_dword_to_word*/ |
|
11187 break; |
|
11188 |
|
11189 /**** |
|
11190 *DWORD_TO_LWORD |
|
11191 */ |
|
11192 case function_dword_to_lword : |
|
11193 { |
|
11194 symbol_c *last_type_symbol = NULL; |
|
11195 |
|
11196 { |
|
11197 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11198 symbol_c *IN_param_value = &this->default_variable_name; |
|
11199 |
|
11200 symbol_c *IN_type_symbol = param_data_type; |
|
11201 last_type_symbol = param_data_type; |
|
11202 |
|
11203 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
11204 { |
|
11205 |
|
11206 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
|
11207 s4o.print("("); |
|
11208 return_type_symbol->accept(*this); |
|
11209 s4o.print(")"); |
|
11210 IN_param_value->accept(*this); |
|
11211 return NULL; |
|
11212 |
|
11213 } |
|
11214 |
|
11215 ERROR; |
|
11216 } |
|
11217 |
|
11218 }/*function_dword_to_lword*/ |
|
11219 break; |
|
11220 |
|
11221 /**** |
|
11222 *LWORD_TO_BOOL |
|
11223 */ |
|
11224 case function_lword_to_bool : |
|
11225 { |
|
11226 symbol_c *last_type_symbol = NULL; |
|
11227 |
|
11228 { |
|
11229 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11230 symbol_c *IN_param_value = &this->default_variable_name; |
|
11231 |
|
11232 symbol_c *IN_type_symbol = param_data_type; |
|
11233 last_type_symbol = param_data_type; |
|
11234 |
|
11235 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11236 { |
|
11237 |
|
11238 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
|
11239 s4o.print("("); |
|
11240 return_type_symbol->accept(*this); |
|
11241 s4o.print(")"); |
|
11242 IN_param_value->accept(*this); |
|
11243 return NULL; |
|
11244 |
|
11245 } |
|
11246 |
|
11247 ERROR; |
|
11248 } |
|
11249 |
|
11250 }/*function_lword_to_bool*/ |
|
11251 break; |
|
11252 |
|
11253 /**** |
|
11254 *LWORD_TO_SINT |
|
11255 */ |
|
11256 case function_lword_to_sint : |
|
11257 { |
|
11258 symbol_c *last_type_symbol = NULL; |
|
11259 |
|
11260 { |
|
11261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11262 symbol_c *IN_param_value = &this->default_variable_name; |
|
11263 |
|
11264 symbol_c *IN_type_symbol = param_data_type; |
|
11265 last_type_symbol = param_data_type; |
|
11266 |
|
11267 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11268 { |
|
11269 |
|
11270 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
|
11271 s4o.print("("); |
|
11272 return_type_symbol->accept(*this); |
|
11273 s4o.print(")"); |
|
11274 IN_param_value->accept(*this); |
|
11275 return NULL; |
|
11276 |
|
11277 } |
|
11278 |
|
11279 ERROR; |
|
11280 } |
|
11281 |
|
11282 }/*function_lword_to_sint*/ |
|
11283 break; |
|
11284 |
|
11285 /**** |
|
11286 *LWORD_TO_INT |
|
11287 */ |
|
11288 case function_lword_to_int : |
|
11289 { |
|
11290 symbol_c *last_type_symbol = NULL; |
|
11291 |
|
11292 { |
|
11293 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11294 symbol_c *IN_param_value = &this->default_variable_name; |
|
11295 |
|
11296 symbol_c *IN_type_symbol = param_data_type; |
|
11297 last_type_symbol = param_data_type; |
|
11298 |
|
11299 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11300 { |
|
11301 |
|
11302 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
|
11303 s4o.print("("); |
|
11304 return_type_symbol->accept(*this); |
|
11305 s4o.print(")"); |
|
11306 IN_param_value->accept(*this); |
|
11307 return NULL; |
|
11308 |
|
11309 } |
|
11310 |
|
11311 ERROR; |
|
11312 } |
|
11313 |
|
11314 }/*function_lword_to_int*/ |
|
11315 break; |
|
11316 |
|
11317 /**** |
|
11318 *LWORD_TO_DINT |
|
11319 */ |
|
11320 case function_lword_to_dint : |
|
11321 { |
|
11322 symbol_c *last_type_symbol = NULL; |
|
11323 |
|
11324 { |
|
11325 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11326 symbol_c *IN_param_value = &this->default_variable_name; |
|
11327 |
|
11328 symbol_c *IN_type_symbol = param_data_type; |
|
11329 last_type_symbol = param_data_type; |
|
11330 |
|
11331 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11332 { |
|
11333 |
|
11334 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
|
11335 s4o.print("("); |
|
11336 return_type_symbol->accept(*this); |
|
11337 s4o.print(")"); |
|
11338 IN_param_value->accept(*this); |
|
11339 return NULL; |
|
11340 |
|
11341 } |
|
11342 |
|
11343 ERROR; |
|
11344 } |
|
11345 |
|
11346 }/*function_lword_to_dint*/ |
|
11347 break; |
|
11348 |
|
11349 /**** |
|
11350 *LWORD_TO_LINT |
|
11351 */ |
|
11352 case function_lword_to_lint : |
|
11353 { |
|
11354 symbol_c *last_type_symbol = NULL; |
|
11355 |
|
11356 { |
|
11357 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11358 symbol_c *IN_param_value = &this->default_variable_name; |
|
11359 |
|
11360 symbol_c *IN_type_symbol = param_data_type; |
|
11361 last_type_symbol = param_data_type; |
|
11362 |
|
11363 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11364 { |
|
11365 |
|
11366 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
|
11367 s4o.print("("); |
|
11368 return_type_symbol->accept(*this); |
|
11369 s4o.print(")"); |
|
11370 IN_param_value->accept(*this); |
|
11371 return NULL; |
|
11372 |
|
11373 } |
|
11374 |
|
11375 ERROR; |
|
11376 } |
|
11377 |
|
11378 }/*function_lword_to_lint*/ |
|
11379 break; |
|
11380 |
|
11381 /**** |
|
11382 *LWORD_TO_USINT |
|
11383 */ |
|
11384 case function_lword_to_usint : |
|
11385 { |
|
11386 symbol_c *last_type_symbol = NULL; |
|
11387 |
|
11388 { |
|
11389 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11390 symbol_c *IN_param_value = &this->default_variable_name; |
|
11391 |
|
11392 symbol_c *IN_type_symbol = param_data_type; |
|
11393 last_type_symbol = param_data_type; |
|
11394 |
|
11395 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11396 { |
|
11397 |
|
11398 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
|
11399 s4o.print("("); |
|
11400 return_type_symbol->accept(*this); |
|
11401 s4o.print(")"); |
|
11402 IN_param_value->accept(*this); |
|
11403 return NULL; |
|
11404 |
|
11405 } |
|
11406 |
|
11407 ERROR; |
|
11408 } |
|
11409 |
|
11410 }/*function_lword_to_usint*/ |
|
11411 break; |
|
11412 |
|
11413 /**** |
|
11414 *LWORD_TO_UINT |
|
11415 */ |
|
11416 case function_lword_to_uint : |
|
11417 { |
|
11418 symbol_c *last_type_symbol = NULL; |
|
11419 |
|
11420 { |
|
11421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11422 symbol_c *IN_param_value = &this->default_variable_name; |
|
11423 |
|
11424 symbol_c *IN_type_symbol = param_data_type; |
|
11425 last_type_symbol = param_data_type; |
|
11426 |
|
11427 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11428 { |
|
11429 |
|
11430 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
|
11431 s4o.print("("); |
|
11432 return_type_symbol->accept(*this); |
|
11433 s4o.print(")"); |
|
11434 IN_param_value->accept(*this); |
|
11435 return NULL; |
|
11436 |
|
11437 } |
|
11438 |
|
11439 ERROR; |
|
11440 } |
|
11441 |
|
11442 }/*function_lword_to_uint*/ |
|
11443 break; |
|
11444 |
|
11445 /**** |
|
11446 *LWORD_TO_UDINT |
|
11447 */ |
|
11448 case function_lword_to_udint : |
|
11449 { |
|
11450 symbol_c *last_type_symbol = NULL; |
|
11451 |
|
11452 { |
|
11453 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11454 symbol_c *IN_param_value = &this->default_variable_name; |
|
11455 |
|
11456 symbol_c *IN_type_symbol = param_data_type; |
|
11457 last_type_symbol = param_data_type; |
|
11458 |
|
11459 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11460 { |
|
11461 |
|
11462 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
|
11463 s4o.print("("); |
|
11464 return_type_symbol->accept(*this); |
|
11465 s4o.print(")"); |
|
11466 IN_param_value->accept(*this); |
|
11467 return NULL; |
|
11468 |
|
11469 } |
|
11470 |
|
11471 ERROR; |
|
11472 } |
|
11473 |
|
11474 }/*function_lword_to_udint*/ |
|
11475 break; |
|
11476 |
|
11477 /**** |
|
11478 *LWORD_TO_ULINT |
|
11479 */ |
|
11480 case function_lword_to_ulint : |
|
11481 { |
|
11482 symbol_c *last_type_symbol = NULL; |
|
11483 |
|
11484 { |
|
11485 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11486 symbol_c *IN_param_value = &this->default_variable_name; |
|
11487 |
|
11488 symbol_c *IN_type_symbol = param_data_type; |
|
11489 last_type_symbol = param_data_type; |
|
11490 |
|
11491 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11492 { |
|
11493 |
|
11494 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
|
11495 s4o.print("("); |
|
11496 return_type_symbol->accept(*this); |
|
11497 s4o.print(")"); |
|
11498 IN_param_value->accept(*this); |
|
11499 return NULL; |
|
11500 |
|
11501 } |
|
11502 |
|
11503 ERROR; |
|
11504 } |
|
11505 |
|
11506 }/*function_lword_to_ulint*/ |
|
11507 break; |
|
11508 |
|
11509 /**** |
|
11510 *LWORD_TO_REAL |
|
11511 */ |
|
11512 case function_lword_to_real : |
|
11513 { |
|
11514 symbol_c *last_type_symbol = NULL; |
|
11515 |
|
11516 { |
|
11517 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11518 symbol_c *IN_param_value = &this->default_variable_name; |
|
11519 |
|
11520 symbol_c *IN_type_symbol = param_data_type; |
|
11521 last_type_symbol = param_data_type; |
|
11522 |
|
11523 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11524 { |
|
11525 |
|
11526 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
|
11527 s4o.print("("); |
|
11528 return_type_symbol->accept(*this); |
|
11529 s4o.print(")"); |
|
11530 IN_param_value->accept(*this); |
|
11531 return NULL; |
|
11532 |
|
11533 } |
|
11534 |
|
11535 ERROR; |
|
11536 } |
|
11537 |
|
11538 }/*function_lword_to_real*/ |
|
11539 break; |
|
11540 |
|
11541 /**** |
|
11542 *LWORD_TO_LREAL |
|
11543 */ |
|
11544 case function_lword_to_lreal : |
|
11545 { |
|
11546 symbol_c *last_type_symbol = NULL; |
|
11547 |
|
11548 { |
|
11549 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11550 symbol_c *IN_param_value = &this->default_variable_name; |
|
11551 |
|
11552 symbol_c *IN_type_symbol = param_data_type; |
|
11553 last_type_symbol = param_data_type; |
|
11554 |
|
11555 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11556 { |
|
11557 |
|
11558 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
|
11559 s4o.print("("); |
|
11560 return_type_symbol->accept(*this); |
|
11561 s4o.print(")"); |
|
11562 IN_param_value->accept(*this); |
|
11563 return NULL; |
|
11564 |
|
11565 } |
|
11566 |
|
11567 ERROR; |
|
11568 } |
|
11569 |
|
11570 }/*function_lword_to_lreal*/ |
|
11571 break; |
|
11572 |
|
11573 /**** |
|
11574 *LWORD_TO_TIME |
|
11575 */ |
|
11576 case function_lword_to_time : |
|
11577 { |
|
11578 symbol_c *last_type_symbol = NULL; |
|
11579 |
|
11580 { |
|
11581 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11582 symbol_c *IN_param_value = &this->default_variable_name; |
|
11583 |
|
11584 symbol_c *IN_type_symbol = param_data_type; |
|
11585 last_type_symbol = param_data_type; |
|
11586 |
|
11587 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11588 { |
|
11589 |
|
11590 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
|
11591 s4o.print("("); |
|
11592 return_type_symbol->accept(*this); |
|
11593 s4o.print(")__int_to_time("); |
|
11594 IN_param_value->accept(*this); |
|
11595 s4o.print(")"); |
|
11596 return NULL; |
|
11597 |
|
11598 } |
|
11599 |
|
11600 ERROR; |
|
11601 } |
|
11602 |
|
11603 }/*function_lword_to_time*/ |
|
11604 break; |
|
11605 |
|
11606 /**** |
|
11607 *LWORD_TO_DATE |
|
11608 */ |
|
11609 case function_lword_to_date : |
|
11610 { |
|
11611 symbol_c *last_type_symbol = NULL; |
|
11612 |
|
11613 { |
|
11614 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11615 symbol_c *IN_param_value = &this->default_variable_name; |
|
11616 |
|
11617 symbol_c *IN_type_symbol = param_data_type; |
|
11618 last_type_symbol = param_data_type; |
|
11619 |
|
11620 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11621 { |
|
11622 |
|
11623 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
|
11624 s4o.print("("); |
|
11625 return_type_symbol->accept(*this); |
|
11626 s4o.print(")__int_to_time("); |
|
11627 IN_param_value->accept(*this); |
|
11628 s4o.print(")"); |
|
11629 return NULL; |
|
11630 |
|
11631 } |
|
11632 |
|
11633 ERROR; |
|
11634 } |
|
11635 |
|
11636 }/*function_lword_to_date*/ |
|
11637 break; |
|
11638 |
|
11639 /**** |
|
11640 *LWORD_TO_TOD |
|
11641 */ |
|
11642 case function_lword_to_tod : |
|
11643 { |
|
11644 symbol_c *last_type_symbol = NULL; |
|
11645 |
|
11646 { |
|
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(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11654 { |
|
11655 |
|
11656 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
|
11657 s4o.print("("); |
|
11658 return_type_symbol->accept(*this); |
|
11659 s4o.print(")__int_to_time("); |
|
11660 IN_param_value->accept(*this); |
|
11661 s4o.print(")"); |
|
11662 return NULL; |
|
11663 |
|
11664 } |
|
11665 |
|
11666 ERROR; |
|
11667 } |
|
11668 |
|
11669 }/*function_lword_to_tod*/ |
|
11670 break; |
|
11671 |
|
11672 /**** |
|
11673 *LWORD_TO_DT |
|
11674 */ |
|
11675 case function_lword_to_dt : |
|
11676 { |
|
11677 symbol_c *last_type_symbol = NULL; |
|
11678 |
|
11679 { |
|
11680 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11681 symbol_c *IN_param_value = &this->default_variable_name; |
|
11682 |
|
11683 symbol_c *IN_type_symbol = param_data_type; |
|
11684 last_type_symbol = param_data_type; |
|
11685 |
|
11686 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11687 { |
|
11688 |
|
11689 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
|
11690 s4o.print("("); |
|
11691 return_type_symbol->accept(*this); |
|
11692 s4o.print(")__int_to_time("); |
|
11693 IN_param_value->accept(*this); |
|
11694 s4o.print(")"); |
|
11695 return NULL; |
|
11696 |
|
11697 } |
|
11698 |
|
11699 ERROR; |
|
11700 } |
|
11701 |
|
11702 }/*function_lword_to_dt*/ |
|
11703 break; |
|
11704 |
|
11705 /**** |
|
11706 *LWORD_TO_STRING |
|
11707 */ |
|
11708 case function_lword_to_string : |
|
11709 { |
|
11710 symbol_c *last_type_symbol = NULL; |
|
11711 |
|
11712 { |
|
11713 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11714 symbol_c *IN_param_value = &this->default_variable_name; |
|
11715 |
|
11716 symbol_c *IN_type_symbol = param_data_type; |
|
11717 last_type_symbol = param_data_type; |
|
11718 |
|
11719 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11720 { |
|
11721 |
|
11722 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
|
11723 s4o.print("("); |
|
11724 return_type_symbol->accept(*this); |
|
11725 s4o.print(")__bit_to_string("); |
|
11726 IN_param_value->accept(*this); |
|
11727 s4o.print(")"); |
|
11728 return NULL; |
|
11729 |
|
11730 } |
|
11731 |
|
11732 ERROR; |
|
11733 } |
|
11734 |
|
11735 }/*function_lword_to_string*/ |
|
11736 break; |
|
11737 |
|
11738 /**** |
|
11739 *LWORD_TO_BYTE |
|
11740 */ |
|
11741 case function_lword_to_byte : |
|
11742 { |
|
11743 symbol_c *last_type_symbol = NULL; |
|
11744 |
|
11745 { |
|
11746 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11747 symbol_c *IN_param_value = &this->default_variable_name; |
|
11748 |
|
11749 symbol_c *IN_type_symbol = param_data_type; |
|
11750 last_type_symbol = param_data_type; |
|
11751 |
|
11752 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11753 { |
|
11754 |
|
11755 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
|
11756 s4o.print("("); |
|
11757 return_type_symbol->accept(*this); |
|
11758 s4o.print(")"); |
|
11759 IN_param_value->accept(*this); |
|
11760 return NULL; |
|
11761 |
|
11762 } |
|
11763 |
|
11764 ERROR; |
|
11765 } |
|
11766 |
|
11767 }/*function_lword_to_byte*/ |
|
11768 break; |
|
11769 |
|
11770 /**** |
|
11771 *LWORD_TO_WORD |
|
11772 */ |
|
11773 case function_lword_to_word : |
|
11774 { |
|
11775 symbol_c *last_type_symbol = NULL; |
|
11776 |
|
11777 { |
|
11778 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11779 symbol_c *IN_param_value = &this->default_variable_name; |
|
11780 |
|
11781 symbol_c *IN_type_symbol = param_data_type; |
|
11782 last_type_symbol = param_data_type; |
|
11783 |
|
11784 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11785 { |
|
11786 |
|
11787 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
|
11788 s4o.print("("); |
|
11789 return_type_symbol->accept(*this); |
|
11790 s4o.print(")"); |
|
11791 IN_param_value->accept(*this); |
|
11792 return NULL; |
|
11793 |
|
11794 } |
|
11795 |
|
11796 ERROR; |
|
11797 } |
|
11798 |
|
11799 }/*function_lword_to_word*/ |
|
11800 break; |
|
11801 |
|
11802 /**** |
|
11803 *LWORD_TO_DWORD |
|
11804 */ |
|
11805 case function_lword_to_dword : |
|
11806 { |
|
11807 symbol_c *last_type_symbol = NULL; |
|
11808 |
|
11809 { |
|
11810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
|
11811 symbol_c *IN_param_value = &this->default_variable_name; |
|
11812 |
|
11813 symbol_c *IN_type_symbol = param_data_type; |
|
11814 last_type_symbol = param_data_type; |
|
11815 |
|
11816 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
11817 { |
|
11818 |
|
11819 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
|
11820 s4o.print("("); |
|
11821 return_type_symbol->accept(*this); |
|
11822 s4o.print(")"); |
|
11823 IN_param_value->accept(*this); |
|
11824 return NULL; |
|
11825 |
|
11826 } |
|
11827 |
|
11828 ERROR; |
|
11829 } |
|
11830 |
|
11831 }/*function_lword_to_dword*/ |
|
11832 break; |
|
11833 |
|
11834 /**** |
|
11835 *TRUNC |
|
11836 */ |
|
11837 case function_trunc : |
|
11838 { |
11856 { |
11839 symbol_c *last_type_symbol = NULL; |
11857 symbol_c *last_type_symbol = NULL; |
11840 |
11858 |
11841 { |
11859 { |
11842 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11860 /* Get the value from a foo(<param_name> = <param_value>) style call */ |