• 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.

and or? How..

Messages
10,163
Country
us-arizona
Hey guys,

We know that | means 'or'
and that || means 'this OR that'

Would || also mean 'and-or'?

If I have 2 'conditions' that I want as and-or, would || or even | be appropriate. so that 'both' can be 'true' as well as just 'one'.



Bill
 
The single character "|" means... nothing at all!

The two chacters "||" means "or"

Just like "&&" means "and" and "&&" also means "and"

This form is correct for your stipulated condition
Code:
(L:this,bool)
(L:that,bool)
or
and is precisely the same as...
Code:
(L:this,bool)
(L:that,bool)
||

The above will evalutate as TRUE if either or both of the conditions are TRUE. It will only be FALSE if both conditions are FALSE...

It really is just that simple!
 
Last edited:
| is bitwise OR, and
& is bitwise AND.

<speaking s l o w l y...>

Yes, but there's no need to confuse Bill further on this. Very, very few folks even know what "bitwise" means, much less how to use these... :rotfl:
 
Many thanks guys.

Yes, Chris, I knew that | was also or as it was in Bill Leamings cool little sheet of what all the symbols mean in Schema code. But....! || is fine. Most greatful.

Very cool to know that we can write 'or'. I have already started writing 'and' instead of &amp;&amp;

Dommo arrigatto
<--- bows humbly
 
Oh come on! Surely not. They are first brought up in chapter 2 of K&R, even before if...else in Chapter 3. :eek:

Kernighan and Ritchie would be my first choice of bedtime reading if I suffered from insomnia, which I thankfully don't... Bill O, on the other hand, doesn't seem to sleep at all! :rotfl:
 
Oh come on! Surely not. They are first brought up in chapter 2 of K&R, even before if...else in Chapter 3. :eek:

Well yes, but why would an "XML Script Cobbler" be reading K&R to begin with?

Over the years, many have asked "Why aren't there any books about XML Gauge Programming," to which is answer has always been, "...because XML isn't a programming language!" :D

For the most part, MS/ACES kludge at XML gauge scripting is weirdly idiosyncratic, and not really well suited to logical exposition in a structured presentation.

I do know that ACES developers themselves realized the problem, and had already begun work to completely replace XML Scripting with Lua for FSvNext.

I sincerely hope that effort will be carried forward into "Flight..."
 
not really well suited to logical exposition in a structured presentation.

Aaaagh!

You should be shot for a phrase like that!

I'm of the opinion that xml is vaguely similar to C, just RPN'd. Mind you, it's 'vaguely' similar to basic, fortran and most anything else with if then else constructs and case statements. You must admit that a forth programmer would have no problems with FS xml, some <Value> strings look just like a forth hieraglyph...:D
 
Last edited:
Aaaagh!

You should be shot for a phrase like that!

Why, is the bald truth so painful? :D

As just one example of "weirdly idiosyncratic" vis-a-vis XML syntax, consider the different syntax structure of the humble if/else construct:

if{ xxx } els{ zzz } in a "regular" XML conditional

%{if} xxx %{else} yyy %{end} in a "script" XML conditional

That's just so unfair! :rotfl:
 
Back
Top