newntui/discovermdi/src/qaparams.cpp
//---------------------------------------------------------------------------------------
// This private function will check if the string specified is a digit.
//---------------------------------------------------------------------------------------
This private function will check if the string specified is a digit.
This private function will check if the string specified is a digit .
BOOL CQAParams::IsDigit(CString& token) {
	for(int i=0;i<token.GetLength();i++) {
		if(token[i]!='0' && token[i]!='1' && token[i]!='2' && token[i]!='3'&&
           token[i]!='4' && token[i]!='5' && token[i]!='6' && token[i]!='7' &&
		   token[i]!='8' && token[i]!='9' && token[i]!='.') return FALSE;
	}
	int dotCount=0;
	for(i=0;i<token.GetLength();i++) {
		if(token[i]=='.')  {
			if(dotCount>0)  return FALSE;
			dotCount++;
		}
	}
	return TRUE;
}
BOOL CQAParams :: IsDigit ( CString & token ) { for ( int i = 0 ; i < token . GetLength ( ) ; i ++ ) { if ( token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' && token [ i ] != ' ' ) return FALSE ; } int dotCount = 0 ; for ( i = 0 ; i < token . GetLength ( ) ; i ++ ) { if ( token [ i ] == ' ' ) { if ( dotCount > 0 ) return FALSE ; dotCount ++ ; } } return TRUE ; }
This private function will check if the string specified is a digit.
This private function will check if the string specified is a digit .