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 #39667 is a reply to message #39659] Tue, 16 April 2013 19:39 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mirek wrote on Mon, 15 April 2013 12:42

I am not FtpClient author and brief review of code indicates that in that particular case, using !! is redundant.

Anyway, sometimes it can have same benefit, see Prompt:

int Prompt(Callback1<const String&> WhenLink,
           const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
           const char *button1, const char *button2, const char *button3,
		   int cx,
		   Image im1, Image im2, Image im3)
{
........
	int nbtn = !!button1 + !!button2 + !!button3;



I can be wrong, but it is not guarantied that true == 1. You can only be sure that false == 0.


Regards,
Novo
 
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 08:02:31 CEST 2024

Total time taken to generate the page: 0.01464 seconds