Quick Question on Test Expressions

Forgive me if this seems amatuerish (I've never had to do this kind of test expression before), but is there any limit to operators? For example, could I say "!bx & by & bz"? Also, would "!bx & (ba | bb | bc | bd)" cause any problems? Logic says that they should work, but I'd like to double check.

I'd check on Nova but I technically don't have a copy.

This post has been edited by theneofrenchmen : 14 July 2005 - 12:19 PM

The game-engine's test expression parser is relatively simple-minded. It can only deal with two terms at a time. So parentheses need to be used to keep within that bound. Your first example "!bx & by & bz" would have to be written as:

!bx & (by & bz)
(!bx & by) & bz

Your second example "!bx & (ba | bb | bc | bd)" would likewise need to be wriiten as:

!bx & (ba | (bb | (bc | bd)))

The only upper limit on the number of operators is the 255 character limitation of a resource text block.

Arturo, on Jul 14 2005, 02:29 PM, said:

!bx & (ba | (bb | (bc | bd)))

Actually, you could write it as:

!b & ((ba | bb) | (bc | bd))

which is a bit easier to understand.

I would like to point out that the 255 character limit was imposed by Matt. He could have easily raised it to 511 or even 1023. hell, he could have made it unlimited. It is a limitation of the text block, but this limitation was set by mcb.

Don't forget that, the way the resources that contain such expressions have been set up, each and every field actually takes up 256 byte (don't forget the terminating NUL), and for each resource, even if there is no or little text. This already makes purely data resources (i.e. no PICT, rlë or sounds) take up more space than usual in, say, EVO. Doubling this character limit could have easily almost doubled the size of this data. Not that they really take up space in the Nova distribution, but in memory it can become significant.