Subroutine condition?

Hi good folks,

I have several macros that use a subroutine and it's returned value in the control flow. In these macros I currently call the subroutine, store the retuned value in a variable, then use Variable condition in an IF statement.

Would it not be useful to have a Subroutine condition, in particular to be used in conjunction with IF statements, where one could define which subroutine and then specify the usual conditions (contains, is, is not etc.) to be performed on the returned value?

Apologies if this question is redundant or this exists already, I've searched and checked the wiki and I can't seem to find anything on the topic.

I'll note it down, but I'm not sure it'll happen, adding a subroutine, with all its possible parameters, as a condition might be too messy.

Thanks for the feedback.

Sounds good.

Just FYI, the subroutine in my case is a utility abstracting away some steps to read OS information. So it would be quite useful to quickly get a value back (in my case a boolean...).

I also understand that it would add some complexity, as subroutines can have an arbitrary number of inputs.

1 Like