Relevance Not Quite Doing What's Expected - Not Equal To

What am I missing here :smiley: I just can’t seem to get this to play nice at all no matter how I mess with it

Q: addresses of dns servers of network
A: 10.1.9.4
A: 10.2.8.9
A: 192.168.0.1
T: 36725

Q: exists addresses whose (it as string = "10.1.9.4") of dns servers of network
A: True
T: 31302

Q: exists addresses whose (it as string != "10.1.9.4") of dns servers of network
A: True
T: 31182

Q: exists addresses whose (it as string != "10.1.9.4") of dns servers of network and exists addresses whose (it as string != "10.2.8.9") of dns servers of network and exists addresses whose (it as string != "192.168.0.1") of dns servers of network
A: True
T: 78531

Is my logic not logicing?

Each of these comparisons checks all three addresses. What I think you’re trying to do, is to return True if there are any DNS Servers other than these three defined?

The 10.2.8.9 and 192.168.0.1 make this comparison True.

Likewise, when comparing for the second address, the presence of the first and third servers makes it True; and on the third comparison, the presence of the first and second addresses makes that one True as well.

Instead what I think you need is to compare all three expected addresses against each found address - i.e.

exists addresses whose (it as string != "10.1.9.4" and it as string != "10.2.8.9" and it as string != "192.168.0.1") of dns servers of network

3 Likes

Exactly that :sweat_smile: thanks Jason, I knew it had to be something straight forward.

I think this may also work and be fractionally quicker (by about 10ms on my machine…bith approaches return true)

Q: exists addresses whose (it as string is not contained by (set of ("10.1.9.4";"10.2.8.9";"192.168.0.1"))) of dns servers of network
A: True
T: 12.603 ms
I: singular boolean

EDIT*** Though both of those of my machine would be incorrect as I do have a DNS server for 192.168.0.1

1 Like

Essentially my aim was to mark it false if “10.1.9.4” and “10.2.8.9” were found anywhere in the DNS entries, even if the loop back was there.

So how about

Q: not exists addresses whose (it as string is contained by (set of ("10.1.9.4";"10.2.8.9";"192.168.0.1"))) of dns servers of network
A: False
T: 26.264 ms
I: singular boolean