Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extended KotD #1: _ANDALSO
#5
(05-06-2024, 06:39 PM)DSMan195276 Wrote: `_AndAlso` has 'short circuiting' behavior, so if the left side evaluates to false then the right side is not evaluated _at all_, since the result will always be false anyway. Additionally the evaluation order is guaranteed, the left side is always evaluated first before the right side. The combination means that you can use `_AndAlso` to completely avoid the 'invalid handle' error while still only using a single `IF` statement.
For me, this is the most compelling reason.  One thing that almost always gets me from using other languages is that QB by default does not short circuit conditions.

Nice addition.
Reply


Messages In This Thread
Extended KotD #1: _ANDALSO - by SMcNeill - 05-05-2024, 09:20 PM
RE: Extended KotD #1: _ANDALSO - by PhilOfPerth - 05-05-2024, 11:05 PM
RE: Extended KotD #1: _ANDALSO - by Dimster - 05-06-2024, 01:28 PM
RE: Extended KotD #1: _ANDALSO - by DSMan195276 - 05-06-2024, 06:39 PM
RE: Extended KotD #1: _ANDALSO - by dbox - 05-06-2024, 07:10 PM



Users browsing this thread: 1 Guest(s)