A U.S. District judge here yesterday upheld a new federal regulation that will prohibit the sale of soda, most candy, gum and frozen desserts to more than 30 million school children during lunch hours.

Judge Gerhard A. Gesell also ruled out an exemption to the regulation that would allow school children to buy such snacks at lunchtime if the foods had been specially fortified with a designated amount of nutrients.

In a 12-page decision, Gesell also directed the Secretary of Agriculture to conduct further study and present recommendations within a year on the health risks and benefits of the sale of snacks that contain saccharin.

Gesell's ruling was hailed as a victory by nutrition activists who have vigorously opposed the sale of such foods on school premises. The new regulation is tied to the National School Lunch and Breakfast programs.

The decision "will protect consumers from a flood of fortified junk food products that would have been allowed" under the department's regulations, said Ellen Haas, an official of the Community Nutrition Institute. The regulations are scheduled to go into effect July 1.

The regulations prohibit the sale of carbonated beverages, gum, candies and frozen desserts until the lunch hours are ended for the school day. With the proposed exemption, those items could have been sold at lunch if they were fortified with 5 per cent of the recommended daily allowance of eight specified nutrients.

The Nutrition Institute wanted the court to order tougher regulations, including limits on fat, salt and sugar content in certain foods available to school children. The National Soft Drink Association wanted the court to stop implementation of regulations completely. Gesell said the government's decision to restrict four categories of foods was a "reasonable first step" toward providing nutritious foods for school children.

In his opinion Gesell wrote that the secretary of agriculture concluded that sale of fortified snack foods should not be encouraged and that the Food and Drug Administration had also taken a strong stand against such fortified foods.

"The health risks associated with fortification are particularly acute when linked to the availability of soft drinks artificially sweetened with saccharin, a potential carcinogen in humans," Gesell wrote.

"The prospect of manufacturers being able to fortify saccharin soft drinks otherwise lacking in nutritional value so as to sell the product in schools was particularly alarming."

Gesell ruled that the agriculture secretary "failed to deal adequately" with the saccharin question and must further study that aspect of the regulations.

Determinations that saccharin is a cancer-causing agent and "the established scientific fact that its effects on the bladder are cumulative are positive factors which necessitate further studies," Gesell wrote.