Jump to content
Macro Express Forums

A Simple If/else Question…i Think


koden
 Share

Recommended Posts

I have this macro:

 

IF T20 contains SDN

Variable set T21: A

Variable set T22: B

End if

IF T20 contains OPC

Variable set T21: C

Variable set T22: D

End IF

 

A.s.o……. 20 times with diff. T20 contains.

 

But if none of the conditions in T20 are true, I would like it to do this:

 

Variable set T21: 1

Variable set T22: 2

 

But where do I put the ELSE command…

My Brain is empty at the moment :

Link to comment
Share on other sites

It's worth the question I think:

IF T20 = SDN is not an option?

In that case you can use the Switch command.

 

 

 

If in your situation *contains* is appropriate, try the following:

 

N90=0

 

IF T20 contains SDN

Variable set T21: A

Variable set T22: B

Variable set N90: 1

End if

 

 

[20 times...]

 

 

//general Else statement

IF N90=0

//none of the above tests was true

Variable set T21: 1

Variable set T22: 2

End if

Link to comment
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.

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.

Loading...
 Share

×
×
  • Create New...