• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Can I write 'and or'?

Messages
10,163
Country
us-arizona
Hey all,

If I have two different conditions and I want 'something' to happen with either or both, can I write 'and or' on that?


Example;
Code:
     (L:something rotating,bool) 1 ==
     (L:something sticking out,bool) 1 ==
     and or
        if{
           (>L:turn on blinky light,bool)
          }



Is that Schema Legal?

Speaking of legal, I guess the hard core version would be....

&amp ||

?
 
Last edited:
*Thud!* No, you only need "or" Bill. The "or" operator includes either one true, or both true...

Even if it would work, "and or" would be redundant.
 
Last edited:
as n4gix suggested ... you only need OR. In C++ it would be like this...

if (a==1 || a==11 || a==456 || a==23) do something

The inclusion of and is only if you want the OR stuff to execute when the and condition is true.....again in C++

if (systemIsReady && (a==1 || a==11 || a==456 || a==23)) do something

In reality, it is actually all common plain English ... you can't use AND or OR in certain senteces because it would not make any sense. The way you had it written...

If my mom is cool AND OR she makes dinner, I will be happy. <<< Improper English grammar.
 
In reality, it is actually all common plain English ... you can't use AND or OR in certain senteces because it would not make any sense. The way you had it written...

If my mom is cool AND OR she makes dinner, I will be happy. <<< Improper English grammar.

At least whatever she "is" or "makes" you would "always" be be Happy !!!

How about :-

If my mom is cool XOR she makes dinner, I will be happy.
 
Back
Top