A pistol might be fine for shooting injured moose along the Alaska Railroad, but it just won't do in a Senate office building in Washington.

That, anyway, is the position of the U.S. attorney's office here in the case of Richard D. Whiteside, a 51-year-old railroad conductor. On a recent visit to his U.S. senator, Whiteside tried to check his .44-caliber Ruger at the door of the Hart Office Building and was summarily arrested and prosecuted for carrying a pistol without a license.

A sympathetic judge, who sentenced Whiteside on Thursday to two months' unsupervised probation for the misdemeanor, had ordered Capitol Hill Police to accompany Whiteside to National Airport on his way home and give him back his gun.

But prosecutors who first agreed to the idea objected, and got the judge to reverse himself and send Whiteside on his way unarmed.

Sen. Ted Stevens (R-Alaska), whose office Whiteside was going to visit, was described yesterday by an aide as feeling "concern and definitely regret."

According to congressional aides, Whiteside is just the latest example of constituents from the South and far West who come to visit their members of Congress here and get caught by stiff antigun measures they know nohing about.

Recently a 75-year-old woman from a southern state was also arrested on the Hill and prosecutethe gun that her local sheriff had urged her to carry in the big city.

What makes Whiteside's case unusual is that the request by prosecutors to keep and destroy the gun--given to him by his wife and daughter 12 years ago and used to put away animals injured by the train--struck D.C. Superior Court Judge Geoffrey Alprin as "the law making an ass out of itself."

Whiteside, wintment last week with a Stevens staff member, had announced to a Senate guard that his unloaded pistol was iny he pleaded guilty in court to a misdemeanor charge.

That was when Whiteside asked for his gun back and asttorney Michael Kaplan told Alprin that "one of the Capitol Police officers will be happy to take the gun to thours later, in a second hastily convened court hearing, Kaplan said such a gesture would violate police regulict law.

It would "create the unseemly spectacle of local law enforcement officers ushering a convicted pere line and returning to him the contraband property for possession of which he was convicted . . . " Kaplan saered Capitol Police to give the gun back anyway, but yesterday stayed his own order and gave himself two weeksistrict law prohibits the possession of unlicensed firearms, except when carried by people in transit to othere, who had planned to take the gun to his son's home in Illinois for target practice, apparently did not qualieside was en route to Illinois yesterday, and could not be reached for comment.