On Sun, May 03, 2020 at 02:53:21PM +0000, Baby Beaker via Digitalmars-d-learn wrote:
> How can I assign a variable in “if” condition in Dlang?
if (auto obj = someFunction(...)) {
// use obj here, it's guaranteed to be
// true/non-null/etc.
}
T
--
EMACS = Extremely Massive And Cumbersome System