Author Topic: parsing problem with Print #n statement  (Read 11516 times)

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
parsing problem with Print #n statement
« on: September 28, 2016, 08:47:54 PM »
The following statement will compile

print #3 1;2;3
[/font][/color]

This statement will not compile the leading "-" is not correctly parsed as part of a valid integer or as an arithmetic expresion:

print #3 1;-2;3
[/font][/color]

The following statement will compile. The expression "0-2" is recognized and is evaluated as "-1".  The code runs correctly with the simulator.

print #3 1;0-2;3
[/font][/color]

Just add it to the list of things that are not quite right.

Best regards,

Gary D*ckinson