Click here to Skip to main content
15,917,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get another process Debug Registers of content Pin
notediy2-Jun-10 11:13
notediy2-Jun-10 11:13 
AnswerRe: How to get another process Debug Registers of content Pin
Garth J Lancaster2-Jun-10 12:46
professionalGarth J Lancaster2-Jun-10 12:46 
AnswerRe: How to get another process Debug Registers of content Pin
Stephen Hewitt2-Jun-10 17:05
Stephen Hewitt2-Jun-10 17:05 
QuestionGDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
vkinra2-Jun-10 10:49
vkinra2-Jun-10 10:49 
AnswerRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
John R. Shaw2-Jun-10 11:34
John R. Shaw2-Jun-10 11:34 
GeneralRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
vkinra2-Jun-10 11:57
vkinra2-Jun-10 11:57 
GeneralRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
John R. Shaw2-Jun-10 13:29
John R. Shaw2-Jun-10 13:29 
QuestionShort Circuit Evaluation Pin
bob169722-Jun-10 6:47
bob169722-Jun-10 6:47 
I always thought I had a good grip on short circuit evaluation for Logical AND and Logical OR but I'm mixing the two and the results are not intuitive. The specification does not suggest the behavior I'm seeing with VC++ 2003 so I thought I'd post the test and results and see if anyone can tell me why "Eval3" never gets evaluated.

void Test()
{
if (Eval1() || Eval2() && Eval3()) {
TRACE("Result = TRUE\n");

} else {
TRACE("Result = FALSE\n");
}
}

BOOL Eval1(void)
{
TRACE("Eval1\n");
return TRUE;
}

BOOL Eval2(void)
{
TRACE("Eval2\n");
return TRUE;
}

BOOL Eval3(void)
{
TRACE("Eval3\n");
return FALSE;
}


Output:

Eval1
Result = TRUE
AnswerRe: Short Circuit Evaluation PinPopular
Luc Pattyn2-Jun-10 7:39
sitebuilderLuc Pattyn2-Jun-10 7:39 
GeneralRe: Short Circuit Evaluation Pin
bob169722-Jun-10 9:57
bob169722-Jun-10 9:57 
GeneralRe: Short Circuit Evaluation Pin
Luc Pattyn2-Jun-10 10:00
sitebuilderLuc Pattyn2-Jun-10 10:00 
GeneralRe: Short Circuit Evaluation Pin
Tim Craig2-Jun-10 16:46
Tim Craig2-Jun-10 16:46 
GeneralRe: Short Circuit Evaluation Pin
Stephen Hewitt2-Jun-10 17:07
Stephen Hewitt2-Jun-10 17:07 
QuestionHow much Memory my App uses? Pin
Software20072-Jun-10 5:00
Software20072-Jun-10 5:00 
AnswerRe: use GetProcessMemoryInfo Pin
Software_Developer2-Jun-10 5:09
Software_Developer2-Jun-10 5:09 
AnswerRe: How much Memory my App uses? Pin
Maximilien2-Jun-10 5:09
Maximilien2-Jun-10 5:09 
AnswerRe: How much Memory my App uses? Pin
Nuri Ismail2-Jun-10 5:12
Nuri Ismail2-Jun-10 5:12 
GeneralRe: How much Memory my App uses? [modified] Pin
Software20073-Jun-10 6:01
Software20073-Jun-10 6:01 
QuestionRe: How much Memory my App uses? Pin
David Crow3-Jun-10 7:32
David Crow3-Jun-10 7:32 
GeneralRe: How much Memory my App uses? Pin
Nuri Ismail3-Jun-10 7:54
Nuri Ismail3-Jun-10 7:54 
GeneralRe: How much Memory my App uses? Pin
Software20073-Jun-10 9:56
Software20073-Jun-10 9:56 
GeneralRe: How much Memory my App uses? Pin
Nuri Ismail4-Jun-10 5:49
Nuri Ismail4-Jun-10 5:49 
Question(Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Maximilien2-Jun-10 4:13
Maximilien2-Jun-10 4:13 
AnswerRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Aescleal2-Jun-10 4:25
Aescleal2-Jun-10 4:25 
AnswerRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
David Crow2-Jun-10 5:52
David Crow2-Jun-10 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.