Pipe Character in Relevance

Can anyone tell me how this statement works:

value of setting "_BESClient_Download_LimitBytesPerSecond" of client | "-1" != "0"

And does it equal the same thing as this statement?

(not exists setting "_BESClient_Download_LimitBytesPerSecond" of client) OR (not exists value of it OR value of it != "0") of setting "_BESClient_Download_LimitBytesPerSecond" of client

This starts with:

value of setting "_BESClient_Download_LimitBytesPerSecond" of client

Which gets the value of that client setting.

value of setting "_BESClient_Download_LimitBytesPerSecond" of client | "-1"

Adds | "-1" which provides error handling. Essentially it means if whatever to the left produces an error, use the value to the right (in this case -1).

The reason why this is useful is because value of <setting> will produce an error if the setting does not exist.

Finally:

value of setting "_BESClient_Download_LimitBytesPerSecond" of client | "-1" != "0"

Returns true if the left hand side of != does not equal the right hand side.

It appears to be equivalent to the first version.

According to the relevance documentation, the pipe character was implemented in version 8.x of Bigfix. In the documentation, the pipe character is used to trap errors.

In this case, it is being used for more that trapping an error. It is saying, if there is an error then -1 else does it equal 0. I have not seen where this form of syntax has been documented. Has anyone else? Or, does it just happen to work and wasn’t really intended? I wonder how many equations can be put after the pipe character?

I think i see where your confusion is – the pipe character is higher in the order of operators than a rational or comparison operator.

value of setting "_BESClient_Download_LimitBytesPerSecond" of client | "-1" != "0"

Is the same as this:

(value of setting "_BESClient_Download_LimitBytesPerSecond" of client | "-1") != "0"

So there isnt any special pipe comparison logic being used here.

Ah, that is very helpful. I wonder if there should be a syntax improvement to require the parenthesis? I really does clear things up. Thanks.