void main() { ULong EnterNum, Result; //EnterNum - would be entered from keyboard //Result - would be calculated by the least significant Zero bit cout<<"Please, enter unsigned lond integer number: "; cin >> EnterNum; //Entering number Result = LeastZeroBit(EnterNum); ShowBinary(EnterNum); //show entered number in binary system ShowBinary(Result); //show result in binary system cout<<endl<<"Result: "<<Result<<endl; system("pause"); }
void main() { SLong EnterNum, Result; //EnterNum - would be entered from keyboard //Result - null or x cout<<"Please, enter signed lond integer number: "; cin >> EnterNum; //Entering number Result = NullMax(EnterNum); //call function and return Null or Number ShowBinary(EnterNum); //show result in binary system cout<<endl<<"Result: "<<Result<<endl; system("pause"); }
wyBool BlobMgmt::ShowData(wyBool setsave) { wyString blobdata, buttontext; if(m_piub->m_isblob && IsDataBinary(m_piub->m_data, m_piub->m_datasize )) { SendMessage(m_hwndedit, SCI_SETTEXT, 0,(LPARAM)""); if(setsave) SendMessage(m_hwndedit, SCI_SETSAVEPOINT, FALSE, 0); //post 8.01 painting. Paint the window with image VERIFY(InvalidateRect(m_hwndimage, NULL, TRUE)); ShowBinary(); TabCtrl_SetCurSel(m_hwndtab, 1); } else { if(ExamineData() == wyFalse && m_piub->m_data) m_blobdata.SetAs(m_piub->m_data); if(m_piub->m_data) SendMessage(m_hwndedit, SCI_SETTEXT, m_blobdata.GetLength(),(LPARAM)m_blobdata.GetString()); if(setsave) SendMessage(m_hwndedit, SCI_SETSAVEPOINT, FALSE, 0); ShowText(); SetFocus(m_hwndedit); TabCtrl_SetCurSel(m_hwndtab, 0); } ShowBlobSize(m_piub->m_datasize); //SendMessage(m_hwndedit, SCI_EMPTYUNDOBUFFER, 0, 0); return wyTrue; }
// Function to process various things when the tab changes. wyBool BlobMgmt::OnTabSelChange() { wyInt32 index; index = TabCtrl_GetCurSel(m_hwndtab); switch(index) { case zero: if(IsDataBinary(m_piub->m_data, m_piub->m_datasize) && m_edit == wyFalse) SendMessage(m_hwndedit, SCI_SETREADONLY, TRUE, 0); else SendMessage(m_hwndedit, SCI_SETREADONLY, FALSE, 0); ShowText(); break; case one: ShowBinary(); break; } return wyTrue; }