ThomasBP Posted January 11, 2021 Report Share Posted January 11, 2021 Hi if I have 2 conditions A and B but I want to make and IF Else And, how is the syntax then. If only A is filled then do... If only B is filles then do... If both A and B is filles then do... How Will this syntax looks like ? Link to comment Share on other sites More sharing options...
Ingolme Posted January 15, 2021 Report Share Posted January 15, 2021 If only A is filled, it means that B has to not be filled. The structure would like similar to the following, assuming A and B are booleans: if(A && !B) { // Only A } else if(B && !A) { // Only B } else if(A && B) { // Both A and B } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now