Page 1 of 1

Functions in an if statement with AND

Posted: 13 Jun 2017, 22:01
by JnLlnd
Hi,

I'm pretty sure but I would like to confirm that, in the following example, FB will never ever get executed if FA returns false?

Code: Select all

if FA(1) and FB(2)
	MsgBox, true
return

FA(x)
{
	MsgBox, %x%
	return false
}

FB(x)
{
	MsgBox, %x%
	return true
}
Thanks.

Re: Functions in an if statement with AND

Posted: 13 Jun 2017, 22:53
by Cuadrix
That's correct. It would have been another story if you used an OR.

Re: Functions in an if statement with AND

Posted: 13 Jun 2017, 23:03
by JnLlnd
Of course. Thanks for confirming.

Jean

Re: Functions in an if statement with AND

Posted: 14 Jun 2017, 02:31
by just me

Re: Functions in an if statement with AND

Posted: 14 Jun 2017, 08:05
by JnLlnd
Thanks for the reference to this very well done explanation. I should have search more.

BTW, this whole page worth read or re-read...