The supreme court of grain quality sits in a former hospital on the grounds of an Air Force base here, assuring foreign buyers that they get what they pay for when they purchase American wheat, corn, rice and other grains.

Under the law, all grain exports must be inspected by the federal government to make sure they are being shipped in clean, vermin-free vessels and that they meet contract specifications. The inspections, which safeguard the integrity of America's overseas grain sales in an increasingly competitive global market, are carried out by a corps of federal inspectors scattered around the country.

If there are disputes with the inspectors' findings, senior analysts sit here as a board of appeals and review. They serve as the supreme court of grain quality, settling disputes, running random checks on inspectors and setting the standards by which grain quality is measured.

The Federal Grain Inspection Service (FGIS) program costs $43 million a year, with 85 percent of it coming from U.S. grain shippers.

In a buyers' market, the quality of grain shipments has become increasingly important, and federal inspection reports are included with the shipment. If part of an order fails to meet contract specifications, grain shippers either can replace the below-grade portion or negotiate a lower price.

Quality includes the shape, maturity and color of individual grains, and the amount of broken grains, foreign materials, moisture and chaff that is included in the shipment. Excessive amounts of impurities can downgrade the classification of the shipment.

Inspectors take core samples, save half for a possible appeal or a routine check, and then do their analysis. They strain the grains to catch tiny bits of impurities, and make a precise examination of a sample selection of grains. The amount of poor-quality grains and impurities in a randomly selected sample is used to project the quality of the entire shipment.

Because of charges that the quality of U.S. grain exports was deteriorating, the Agriculture Department began publishing summations of its inspection results in 1984. In the second survey, the government reported that quality of export grain was higher last year than required to meet federal grade standards and, in most cases, was above contract specifications.

Nonetheless, a group from the Bangladesh Food Ministry complained that a recent shipment of U.S. wheat contained animal-feed pellets, which contained pig's blood -- a religious taboo in the Islamic nation.