Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Smile What it in fact does is a cast to bool Smile 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 Smile You can find it on many places in U++ sources...

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IML including on multiple headers/cpp files
Next Topic: What does SSE2 usage enhance?
Goto Forum:
  


Current Time: Sun May 12 14:00:06 CEST 2024

Total time taken to generate the page: 0.02449 seconds