Jump to content
OMRON Forums

Switch/Case negative constants not supported?


Ian Nicholson
 Share

Recommended Posts

It appears PPMAC originally did not support negative case constants in switch structures. However, the firmware update history for V2.5 Release Updates (August 2018) includes the following note:

Quote

17. Corrected operation of switch() structure when argument evaluates to negative
number, permitting case branches specifying negative integers. Negative values had
gone to case 0: branch.

But when I try to use code such as the following, I get a Syntax Error on the minus sign:

image.png.03baa38cc68d0c1bf30bbc40923bc503.png

Has the IDE just not been updated to support this change yet? Is there a different syntax I should use here? Or am I misreading the history note and this is actually not supported?

Edited by Ian Nicholson
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...