Maximum

Category: VC/MFC -> Foundation Classes Author: easy2003LUOZHI Date: 2010-10-23 19:37:34
 
easy2003LUOZHI
2010-10-23 19:37:34
[helpstring("method max")]Max([[in] long l1,[in] long l2,[out,retval] long *pResult); 

STDMETHODIMP CA::Max(long l1,long l2,long *pResult) 

    *pResult=(l1?l1>l2);//  ? 
    return S_OK; 
}
liuzhou132
2010-10-23 19:54:59
l1 > l2 l1: l2
equivalent
if (l1   >   l2)
?     return   l1;
else
    return   l2;
dnitfk001
2010-10-23 20:04:12
[helpstring("method max")]Max([[in] long l1,[in] long l2,[out,retval] long *pResult); 

STDMETHODIMP CA::Max(long l1,long l2,long *pResult) 

    *pResult=(l1>l2?l1:l2);//  ? 
    return S_OK; 
}