Home » Developing U++ » U++ Developers corner » What does !! in e.g. FtpClient class mean?
Re: What does !! in e.g. FtpClient class mean? [message #39624 is a reply to message #39623] |
Wed, 10 April 2013 14:39 |
|
NilaT wrote on Wed, 10 April 2013 13:57 | I just got a very noobish question.
What is the following Statement good for?
!!FtpDelete(path, ftpconn);
(This example is from the FtpClient class, but there maybe others)
!! = not not? Why use it then anyway?
|
Hi NilaT,
This question appears here regulary, and it's not really noobish What it in fact does is a cast to bool The first negation causes imlicit cast to bool and the second one just returns the value to the original. Same as if you wrote (bool)FtpDelete(path, ftpconn);
I'm not exactly sure why Mirek prefers writing it this way, but I strongly suspect the reason is that it is faster to write You can find it on many places in U++ sources...
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Sun May 12 14:00:06 CEST 2024
Total time taken to generate the page: 0.02449 seconds
|