if Condition expression can't have function?

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 25 04:57:08 PDT 2014


On Friday, 25 April 2014 at 07:14:48 UTC, FrankLike wrote:
> Hi,everyone,
> Here has a error after run: " main.exe 11 " or " main.exe 10 ":
> […]
> Why?

size_t (the return type of your find()) is always non-negative, 
hence the if condition is never false.

In the future, you might want to consider posting questions such 
as this to the digitalmars.D.learn mailing list/forums.

David


More information about the Digitalmars-d mailing list