If X in Y

Extending “If…Then” to allow “If X in Y” type expressions.

Or perhaps there is already an elegant way to do this? For example, "If buildtype in (release, debug)…"

Steve

Hi Steve,

I take it that you want “In” as in set membership?

If you get the latest test build, we slipped in a feature for “If X matches Regular Expression Y”. You can use this to get the kind of matching you want here, although you’ll need a small amount of RegExp knowledge to get it working.

https://www.finalbuilder.com/downloads/finalbuilder/500/FB500_72.exe

Regards,


Angus

Yes, set membership - the term I couldn’t think of.

Funnily enough I did notice the regex matching, and it’s true that you can do it that way: if %buildtype% matches “release|debug”.

That’s probably actually sufficient, now that I think about it. Are there any gotchas, where something might unexpectedly match? Not sure…

(PS since this is the wish list forum, any chance of an “evaluate now” button to check whether you’ve got your regexp right? Or some kind of indicator on the current state of the IF?)

Steve

Hi Steve,

No gotchas with the regular expressions (apart from to make sure you escape any special characters in the list of strings to match, but if you use alphanumeric characters you’ll be fine.)

- Angus