|
From: | Michael D Godfrey |
Subject: | Re: Question about short circuit operators |
Date: | Fri, 25 Feb 2011 09:30:41 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 |
On 02/25/2011 01:17 AM, CdeMills wrote:
Well, OK. To the extent that the warning reminds people of the weirdNo, no. If you explicitly want short circuit test, use the appropriate form if some_cond && some_other_cond do_something endif (x > 0) || warning('Log(x) will return complex result') and so on. Regards Pascal Matlab behavior I guess it is OK. But, in the quoted cases of no side-effect the warning is otherwise meaningless. Michael |
[Prev in Thread] | Current Thread | [Next in Thread] |