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 |
Novo
Messages: 1363 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
|
|
|
Goto Forum:
Current Time: Sat Jun 15 23:22:08 CEST 2024
Total time taken to generate the page: 0.01534 seconds
|