AT EXACTLY 5:18 p.m. the dinner train to Strasbourg heaved a hydraulic sigh of relief and began straining out of the soaring glass-and-girder Gare de Lyon in the heart of Paris. The conductor, who sold us our $15-dollar dinner tickets on the platform, said he didn't know what was on the menu, but as we squeezed through the train looking for seats we thought we spied a clue: there, blocking the aisles, were two crates of thick purple grapes, three crates of blood-red tomatoes and a heavy burlap bag of potatoes.

"This is for tonight?" we asked a crewman in a white cooking smock, as he began carting the tomatoes away. "Of course," he said. Then he saw our surprise. "The first dinner service isn't for another hour. We have plenty of time to peel the potatoes."

France is one of the few countries left where the grand tradition of dining on the rails survives--with real food, white linens and waiters who pride themselves on their art. French railroad officials will tell you proudly that this year is the 101st anniversary of the first dining car, or wagon-restaurant, in France.

Some of the restaurants and their chefs have become legendary, such as those on the Train Bleu that ferried the rich from Paris to the Riviera.

But while the tradition of the dining car is surviving, it is not exactly thriving. Until 10 years ago, there was fine dining on every major line in France. But now economics is strangling the grand old style of dining in France just as it did years ago in the United States.

"I don't think you'll find any more restaurants like these, the restaurants classiques, by the end of the decade," said Jean-Paul Caracalla, spokesman for the French railroad food system, the International Company of Sleeping Cars and Tourism. "The restaurants classique, the restaurants of nostalgia, will survive only on special trains." The French rail system, he said, is phasing out the dining cars and replacing them with fast-food "bar-grills" and precooked airline-type meals on trays.

"Am I sad? Of course. But it does not mean we'll have mauvaise cuisine, bad cooking," Caracalla said. "It just means the food will be different."

So we bought first-class tickets and reserved a table for two on Car Number 9. We also made advance reservations for the return trip to Paris on the new supertrain, the TGV--for, as Caracalla told us, the TGV represents the state-of-the-art of cuisine moderne, the new assembly-line food that's taking over on the trains in France.

At 5:30 the gray industrial outskirts of Paris were far behind and the train was threading along a river and cow pastures. We joined Michele Pissy, chief of the cooking "brigade," in the kitchen. Since the train had left the station, Pissy had started four large copper pots on the stove--one with 12 fat turbot filets poaching with cut-up lemons in fish broth, another with whole baby mushrooms saute'eing in butter, a third with potatoes carved in octagons simmering in water ("I peeled them with a knife," Pissy said) and the fourth hissing with chunks of pork and peas ("Yes, the peas are fresh," Pissy said, "But we shelled them ahead of the time in the station.") The car jolted suddenly as the train grabbed a curve and a wave of fish broth crashed onto the stove, sending yellow sparks flying from the burner.

"Our menu tonight," Pissy said, nonchalantly mopping it up, "is turbot au beurre fondu, clarified butter, and veal with mushrooms and cre me frai che."

Pissy's kitchen is an art deco relic, sculpted in stainless steel. It's about 20 feet long, divided by an aisle that's wide enough for two people to pass if they suck in their stomachs and squeeze against the shiny smooth counters. On one side: a dishwasher (it was broken) and two large sinks (a kitchen aide was washing dishes by hand), a beaten-up rack with half a dozen chef's knives, and a small work space, where Pissy was dipping 30 veal scaloppine in flour. On the other side: a large cooler, a six-foot restaurant stove with eight burners, storage cabinets, and a window for passing platters to the dining car.

"I've been cooking on the trains for 13 years, since I was 17," Pissy said. "I cooked for five years in a restaurant before that, but never again." He scrunched his face in a French look of disgust. Outside the window, hills carved into farmfields floated past. "The train is a special kind of life." Pissy reached for some stale bread, sliced the crust into large chunks, threw some butter and peanut oil into a huge black cast iron pan on the stove, and tossed in the bread with a splatter. "Croutons for the salad," he said.

"Of course, things have been changing on the trains," Pissy said. "Five years ago, the cooks had more influence. I could say, 'I want to prepare this, I want to serve that'--I could help plan the menu. Now it's all dictated to us, including the recipes. And the trains go faster--so we have to work faster."

Three electronic notes sounded like a doorbell from the tinny train speakers overhead. "Mesdames et messieurs," the voice annouced, "We are about to commence the first dinner service in the wagon-restaurant. Merci."

At the entrance to the dining car stood a small table stacked with white china plates that leaned like the tower of Pisa, a tray with brown pears and oranges and limes and the fat purple grapes, and a bamboo mat under a melting-soft wheel of brie. Passengers began to sit at the tables, which were draped with crisp white tablecloths. The entire length of the car was covered with expansive windows; red-roofed farming villages passed by, as in a movie, and as the sun began to set the countryside glowed.

The mai tre d'ho tel, Thierry Dillet, began taking orders, including our own. "If you're going to start with the herring filets on blini, I'd suggest a half-bottle of Entre Deux Mers, a very nice one with a hint of fruit," Thierry said. "Then with the veal there's a very good bordeaux . . . "

A French businessman leaned across the aisle with confidential gesture. "You know, this kind of dining isn't so common any more," he said, shaking his head. "On more trains now they serve--you call it fast food? We don't like it. The French like to eat well, and when we don't, our trip is foutu, ruined.

Back in the kitchen, Pissy and Thiery, who had finished taking orders, were in hyper-gear. Pissy was tossing veal like frisbees into bubbling butter, while his mai tre d'ho tel assembled the hors d'oeuvres, laying slices of smoked salmon on triangles of white bread that Pissy had just toasted over the open burner flame.

Pissy reached overhead for a large pot and a whisk, "for the salad," he said; grabbed a bottle of red wine vinegar and poured, without measuring or faltering as the train started jerking in a wide turn, snapped five mammoth spoonfuls of dijon mustard from a jar, grabbed a handful of salt from a bowl that had started sliding toward the counter's edge, then madly whisked while he poured in two bottles of soybean oil. The train was lurching as it hit a bad stretch of track, and we could hardly keep our balance let alone scribble notes. But Pissy braced his feet like a sailor, calmly dipped his fingers like chopsticks into a carton of cre me frai che, and flicked four thick globs into the pan of veal. "We're used to this," he said, as a pile of dirty dishes fell crashing into the sink at the other end of the car. "Although, sometimes we have our problems. Just before dessert not long ago the cooler door popped open, and the entire tray of pastries went flying across the kitchen. No problem," he shrugged, "we served sherbet instead. And in the dining room, the waiter was just about to serve some sole meunie re to madame in a beautiful white dress when the train suddenly braked, and . . . " with gestures he showed the sole flipping into the cleavage of an ample bosom. "The train company paid for her dress."

The sun had set and in the dining car, the windows beside the tables had turned into shimmering black mirrors. The herring and salmon were delicious, the turbot was rich with butter and nicely cooked. The veal with mushrooms and cre me frai che was a little tough, but the salad was perfect, with some of the best croutons and vinaigrette we've ever had. Now the diners were eating the cheese course, and Pissy joined us at the table before preparing dessert. "What do you think of your cooking?" we asked. He thought a while before answering. "It's . . . correct, according to the book. To do something better, we'd need more ingredients, more time, more money--if I were going to do the veal my way I'd flame it with a bit of cognac. And I feel the plates aren't decorated nicely enough." he shrugged. "But with 40 people to feed, I don't have the time."

"But the TGV," added Thierry, who paused in midaisle with the cheese tray in his hands, "that food is de'gueulasse, disgusting. It's a fantastic train, very fast, but the food is truly terrible. They serve wine in plastic cups. Plastic! I find that unconscionable."

The mai tre d' excused himself, and began serving desserts--ice cream with fresh fruit, blackberry preserves and chantilly cream; walnuts and hazlenuts; nut cream cake; and of course pastries.

Two weeks later. Half an hour north of Lyon, on one of the daily trips to Paris, the TGV supertrain hit 160 mph. It is the fastest commercial train in the world. The French are even prouder of the TGV than they are of the Concorde, because unlike the controversial plane, this train has been a financial success. Where the traditional trains exude charm, the TGV shouts sleek. Everything is tapered, plastic and computer-controlled. And that spirit, many French people complain, has carried over to the food, which is mass-produced and frozen in an assembly line kitchen in Paris.

French rail officials feel a bit defensive about the new TGV-style food that they're bringing to the trains, and so Jean-Paul Caracella took pains to justify it before we took the trip. "It's a simple matter of economics," he said. "The old-fashioned dining cars, the restaurants classiques, lost 70 million francs a year. Patrons pay only 50 percent of the true price of the meal." But with TGV-style dining, he said, they figure the food operations will make a profit. "Imagine," he said, "only two hostesses on the TGV can serve twice as many travelers with precooked meals on trays as a crew of seven can serve on a dining car." Carracala got excited as he talked about the challenge of developing a new creative, mass-produced cuisine. "It will take lots of work and research, especially imagination," he said. "We're hiring chefs, including one from a three-star restaurant in Paris, to help us out. And already," he said, "even if you don't get a great meal on the TGV, it's a very acceptable meal. Just last week I rode the TGV and ate some pasta. And you know what?" He beamed. "It was al dente."

If you're traveling second class on the TGV, you have to eat in the bar--physically much like an Amtrak cafe', although bigger, with plenty of room to stand along the windows while sipping mineral water or wine. But the menu is a step up from Amtrak--onion tarts and croque monsieurs (ham and cheese sandwiches encrusted with batter) and pizza crusts topped with saute'ed eggplant and onions--not microwaved but heated in a small oven. And you can order thick, crusty slices of peasant bread lathered with pa te' or salmon.

But in the first-class cars, where we reclined in polyester orange and green seats, the French crusade to make assembly-line food respectable is succeeding.

First, they've preserved a semblance of service. The hostess brings the menu and explains the "specials" of the day ("We plan the menus so a businessman can eat on the TGV 23 days in a row without ever having the same dish twice," Caracalla had said.) Then the aperitifs, then the hors d'oeuvres--on the TGV, the hostess serves the meal course by course, not crammed all at once on a tray, and she replaces your china--yes, china--as you go along. And the meal is served family-style from aluminum foil pans, so you can ask for seconds on the spinach or sauce.

As for the food: we've eaten in well-known restaurants at home in Washington and had worse. Salmon stuffed with white fish mousse, baby mushrooms that still crunch, buttery baked celery hearts, and thick, tender filet mignon--tender from aging, not tenderizing--that was amazingly juicy and rare. The goat cheese was utterly ripe, the orange tart was flaky and bittersweet, and the St. Emilion 1980 was, while not a bargain, very good.

We had boarded the TGV ready to hate modern train cuisine, and stepped off with grudging respect. But what the TGV meal lacked--what the new economics are robbing from the trains--are the intangibles. Dining on the rails in France is losing its charm.

The last morning in France. The 7:19 Trans Europe Express to Brussels. The sleek old dining car is cased in silver steel siding, like a highway diner. We sit at a table for two, in plush green armchairs, as three waiters in white jackets and black ties serve our final breakfast--a basket of crisp, warm brioche and croissants, the most perfect soft-boiled egg we've ever had, fried eggs with crisp whites like brown lace, and dark, French coffee in a white china pot. The flat countryside looks pale and heavy in the morning fog; our armchairs are equipped with electric buttons that raise or lower the venetian blinds.

"In a few years we'll be no more," says Raymond Marchat, a waiter for more than 20 years on the trains. "Progress," he says, lifting his eyebrows, "alas."

As the train pulls into the cavernous Brussels station, we walk past the dining-car kitchen where the brigade is preparing lunch; one cook is fileting whole fish, another is carrying a pan from the oven with 10 gold-crusted chickens. Marchat brings us two spotless white china cups, engraved with "TEE" in letters that look like they're rushing down the rails. "Keep them," he said proudly. "They'll guard your memories of how we used to dine on the trains in France."

The train station servicing the Paris-to-Strasbourg route was erroneously reported in the story on dining on French trains in the Sunday, Aug. 28, Food section. The train leaves from Gare de l'Est, not Gare de Lyon.