Article View: ab.software.developers
Article #1313Skipping an if statement
From: spectre
Date: Mon, 16 Feb 1998 00:00
Date: Mon, 16 Feb 1998 00:00
46 lines
1588 bytes
1588 bytes
I have a very curious event occuring within a Member Function.
the function presented below.....
DWORD CFormatData::GetOutputFormat(void)
{
DWORD dwFormatInfo = DISP_EMPTY; /* = 0x00000000*/
TRACE3("\n---dwFormatInfo b1:%d b2:%d b3:%d\n",
m_dwTimeStamp, m_dwDateStamp, m_dwNameStamp);
TRACE3("\n---dwFormatInfo b1:%d b2:%d b3:%d\n",
m_dwOneLine, m_dwWrapNext, m_dwWrapBelow);
ASSERT(m_dwNameStamp);// | DISP_ADD_NAME;
if(m_dwNameStamp)
{
dwFormatInfo | DISP_ADD_NAME;
}
return dwFormatInfo;
}
The trace output is
---dwFormatInfo b1:0 b2:0 b3:1 --where b3 is the m_dwNameStamp value
(clearly not zero)
---dwFormatInfo b1:0 b2:1 b3:0
The compiler is MS VC++ ver 5.0
The problem is that the if statement gets skipped regardless of the value of
any member vars that I check on.
If I set a break point the ASSERT will evaluate to TRUE but the If
statement acts as if it is not even there.
Does anyone have any idea why I might be experiencing this odd behavior???
Please let me know
Thanks
seanb@oneworld.owt.com
Peace
Technical Details
Message-ID:
<6cao8j$3kh$1@gte2.gte.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f2ee,d2bf007723730467,start X-Google-Attributes: gid10f2ee,public From: "spectre" <seanb@owt.com> Subject: Skipping an if statement Date: 1998/02/16 Message-ID: <6cao8j$3kh$1@gte2.gte.net> X-Deja-AN: 325718377 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: gte.net X-Auth: C206931D5D9CCDC04BC88491 Newsgroups: ab.software.developers