for(int i =0;i<28;i++) { char c = toupper(buffer[i]); if( !( (c>='0'&& c<='9') || (c>='A'&& c<='F') || c == ' ' ) ) { MSG("WARING:请检查输入是否符合要求... "); return; } }