But surely in this case Isvor and IsLoc are only going to be used as booleans - what other types of calculation would they be used in? Their purpose is to determine if a bit is set or not.
Any other types for sure. For example this (pseudocode):
Code:
<Select>
<Value>(A:NAV CODES:1, flags) 128 &</Value>
<Case Value="0">
<Image "IsVor.bmp">
etc
<Case Value="1">
<Image "IsILS.bmp">
etc
etc
Quote:
What seems to work but is a false presumption, is (A:NAV CODES:1, flags) 128 and (remember & is NOT the same as and)
I don't think it does work. It should return 1 (true) if any bits or combination of bits in A:NAV CODES are set, and 0 (false) only if no bits are set.
But it works -apparently-, as long as the VOR being checked is out of range (returns 0). That's the reason I stated "it seems to work".
Joao, et. al,
Apologies in advance if I am not correctly following the discussion, but why can't this be used to tell if a Nav radio is tuned to and receiving a localizer?:
Code:(A:NAV1 CODES, flags) 128 >= if{ 1 (>L:NavReceivingLocalizer, bool) }
You can use it Bob, but this approach would be valid only for a VOR/LOC flag inspection; the idea is to find a method that can be applied to the whole set.
Tom




