In a high-profile case that has embarrassed the Air Force, Lieut. Kelly Flinn, a single woman and the first female pilot of a B-52 bomber, is scheduled to go on trial on Tuesday for affairs with a married man and an enlisted soldier. Last week, the Army's top enlisted soldier, Sgt. Maj. Gene C. McKinney, was charged with adultery, among other offenses, relating to accusations that he harassed four servicewomen.

And, casting a shadow over the debate is the case of a 41-year-old Air Force lieutenant colonel, Karen Tew, who committed suicide in March after pleading guilty to having an affair with an enlisted man. A year shy of retirement, Colonel Tew had been dismissed from the service.

For the military, the issue of adultery is spelled out plainly as Article 134 of the Uniform Code of Military Justice: There are three elements to the crime, two of which seem perfectly clear: that a soldier had sex and that one of the parties was married to someone else.

The third element is more subjective: that the conduct harmed ''good order and discipline'' and was ''of a nature to bring discredit upon the armed forces.'' That condition, according to a Pentagon legal official, is crucial, even though he acknowledged that it created the impression that prosecution was selective.

''It's dangerous,'' said the official, who spoke on the condition of anonymity. ''You always leave yourself open to the kind of criticism the services are getting: Well, you treated this person differently from that person. The problem is all those circumstances that feed into individual judgment don't always get played out in the media.''

For example, the military has a strong interest in disciplining cases of adultery within a company because its cohesion is considered critical to life and death. It is also concerned with disciplining officers or ranking enlisted soldiers who must command the respect of the troops. Generally, officials say, an adultery case has proceeded only when it involved ''egregious'' conduct and was brought to a commander's attention, often by a wronged spouse.

But the standard -- which seeks not to pry too deeply into soldiers' private lives -- can create awkward imbalances, if an act of adultery is not considered a danger to morale. An encounter with a prostitute may be less likely to be prosecuted, though it is illegal in the United States, than a case like one involving Lieutenant Flinn, the bomber pilot, who considered her boyfriend her first serious romantic relationship.