Jump to content
Sign in to follow this  
wasikhetmaar

compare string to empty inversed

Recommended Posts

Hello,

 

I'm trying to compare a string to an empty string. When the string is NOT empty, a counter should increment. First I tried to do this with a not contact between the compare and the increment, this gave the problem that it kept incrementing. It didn't stopped after one runtime it kept going. Does someone know a better inverse method?

 

One ugly solution that I have found is to increment before the compare and decrement if it is true. Does anyone have better options?

Share this post


Link to post
Share on other sites

Hi,

There is another way:

In one rung you will have a positive transition contact for test, then function "String length", then compare string length with 0, if length is bigger then zero, increment a tag.

 

Regards

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Sign in to follow this  

×
×
  • Create New...