For two months, D.C. Superior Court Judge Steffen W. Graae had delayed sentencing Reginald Crowder, to enable the convicted drug peddler to find a drug treatment program for his heroin addiction rather than go to prison.

When Crowder and his lawyer, Brian Lietch, walked into courtroom No. 18 on July 27, 1984, they had bad news. Crowder, 29, could not find a program with room for him.

Lietch had even arranged for deputy U.S. marshals to drive Crowder from Lorton Reformatory, where he was being held pending sentencing, to the Comprehensive Alcohol and Drug Abuse Center on the grounds of St. Elizabeths Hospital in Southeast Washington, but CADAC already had too many addicts. So Lietch asked the judge to release Crowder on probation so he could find a job and sign up for outpatient drug counseling.

"I think I made it really very clear to you at the beginning of the various continuances that we had in this case," Graae answered, "that the only kind of program that I would consider would be an inpatient program." He instead sentenced Crowder to 15 to 45 months at Lorton.

Such scenes happen almost daily in D.C. Superior Court. Judges who apply the city's mandatory sentencing law for drug crimes are allowed to make exceptions for narcotic addicts who need treatment, but often the judges cannot find any place to send addicts except prison. Addicts awaiting sentencing spend their time in jail writing to drug programs. But months often go by before their applications receive even a cursory review.

"You spend more time trying to get somebody into a program than you do on any other thing in the case," said attorney Alfred J. Merlie. "It's almost impossible to get somebody in."

"The problem is an obvious one. There just aren't enough facilities for inpatient drug treatment," said Judge Graae.

"I don't perceive anybody taking a rational, coherent approach to the whole question of mandatory minimum sentencing, drug addiction and overcrowding in the prison facility," he added.

In 1981, when City Council member John Ray (D-At Large) first proposed mandatory sentencing, there were 989 inmates being held on drug charges in the city. Last June, there were 1,673, or 25.7 percent of the 6,500 inmates in the city's prisons. An additional 500 persons convicted of drug crimes are housed in federal facilities.

Corrections officials project that the inmate population in the city's prisons will climb to nearly 7,600 by the year 1990 if current trends hold true -- far more than enough to fill the 700-bed prison and drug treatment facility recently proposed by Mayor Marion Barry for construction near the D.C. Jail.

Precisely how drug arrests and convictions have affected the District's prisons is difficult to gauge from sometimes unreliable Corrections Department figures. But corrections officials cite drug enforcement as the main reason for the overcrowding that has plagued city prisons.

"I don't feel that being in here is going to help me more than a drug program because everything I did only hurt me," said Charles Thornton, a 25-year-old former Woodson High School basketball star serving a minimum of three years at Lorton's Occoquan camp for possession with intent to distribute $40 worth of heroin. "Just Hurting Myself"

"I didn't rob anybody. I wasn't committing any violent crimes or anything," Thornton said. "I was just using drugs and basically just hurting myself."

In the past five years, the average time served by drug offenders leaving prison has increased 84 percent, according to the Corrections Department, from nearly 12 months in 1981 to 21 months in 1985, meaning those already in prison are tying up space needed for others coming in behind them. Ray said he thought the prison population would initially expand after mandatory sentencing went into effect but then shrink as drug dealers became aware of the consequences.

Ray also said during his campaign for the law that the city would need effective drug treatment as a companion to "swift and sure" punishment. However, voters who punched "Yes" on the sentencing initiative ballot on Sept. 14, 1982, did not know the sorry shape the city's drug treatment agency was in at the time.

A 1983 city-sponsored study of the D.C. Alcohol and Drug Abuse Services Administration found that some public drug clinics for counseling, testing and methadone maintenance were falling apart. Files for many of the thousands of patients who passed through annually were scattered in waiting rooms or dumped in closets and couldn't be found.

Addicts were placed haphazardly on methadone maintenance with little effort to track their progress. Treatment plans received scant review. Those ordered to enroll in three-week urine testing programs were usually gone again before anyone knew if they were using drugs, because test results took a month or more to return from the laboratory. Methadone doses were low, and sometimes addicts were punished for missing appointments by having their doses cut still further.

Mostly, though, clients served by the city drug agency had to wait: wait to get an appointment, wait to be enrolled, wait to be assigned a counselor, wait to be tested.

"A man might get up and decide this is the day he's going to get into a methadone program. But he only goes up there to get on a waiting list," said William Briscoe, a 35-year-old heroin addict serving 18 to 54 months in prison for selling a $15 Preludin pill to an undercover officer. "You sit up there all day to get on a waiting list."

Judge Nicholas Nunzio had delayed for six months sentencing 37-year-old Leroy Clayborne, warning Clayborne he would be sent to jail if he didn't get his urine tested and show that he had stopped using drugs.

When the case came up for sentencing Sept. 20, 1984, attorney Paul Sloniowski, trying to explain why there were no test results, said drug agency employes "wouldn't give him one on Monday and Tuesday . . . . I had to beg and plead down there. On Wednesday, they finally gave him one. They would not give him one today. And then they said they would give him one tomorrow."

The city currently budgets about $6.5 million annually for drug treatment, including funds to contract for long-term care in privately run residential programs such as CADAC, RAP and Second Genesis. Drug offenders facing prison seek alternatives wherever they can find them, including programs such as Rubicon in Richmond and others as far away as San Francisco.

What defendants and judges cite as a severe shortage of beds in long-term residential facilities was the planned result of the 740-page, 1983 study on the city drug treatment agency. The report, prepared by Decision Information Systems Corp., a private consulting firm, recommended that the city cut back its funding of beds in those programs.

The DISC report outlined a new direction in treatment away from older addicts and residential programs toward drug prevention among youths. DISC suggested that too many of the city's drug treatment clients were coming from the courts.

The bottom line was money. The city, DISC said, simply could no longer afford to spend funds on long-term treatment programs that don't guarantee high success rates, and addicts, it said, are a bad risk.

About the same time that DISC's report was steering the city away from inpatient programs, D.C.'s mandatory sentencing law was creating new demand for such facilities. The law offered many addicts a chance to avoid prison -- if they could find a place at a treatment center. Jail Impact Ignored

Although DISC's analysis was commissioned after passage of the mandatory sentencing law, the report did not consider the likely impact of its recommendations on sentencing or the need for more prison space.

Lonnie E. Mitchell, director of the city's drug agency, said he was hired in 1983 largely to implement the DISC proposals. Since then, the city has let contracts for drug counseling in city schools and for new clinics to treat young PCP abusers. Officials at RAP and Second Genesis, meanwhile, said they have come under pressure from city officials to shorten their treatment regimens and move more addicts through more quickly, although they maintain that they can house offenders for about 60 percent of the $17,500 annual cost of keeping inmates at Lorton Reformatory.

RAP director Ron Clark said his program, which already had reduced the number of its beds from 80 to 52 in recent years because of funding problems, further cut back to 25 in October because it could no longer afford to underwrite the cost of treatment under RAP's contract with the city.

Officials at Second Genesis said they told Mitchell last year they would close their doors unless they got more money for the 65 beds for which the city has contracted. They said they proposed an expansion, but got no response from the city.

"As far as I can determine, it's always, 'I'm helpless. It's the person above me. The budgetary process. There is no funds.' It's that kind of thing," said Alan M. Rochlin, deputy executive director at Second Genesis.

The Rubicon program in Richmond had been popular with Superior Court judges. But Virginia officials, who had their own money troubles, forced a change in admissions policies at Rubicon around the time mandatory sentencing went into effect, and Rubicon stopped admitting D.C. inmates free.

"I know Rubicon is still a big name at the D.C. Jail, because we get lots of letters from the inmates," said Karen Barksdale, intake supervisor at Rubicon. "But once we tell them what the cost is $22 a day , we usually don't hear from them again." Because the District government has no contract with Rubicon, D.C. inmates must pay for their own treatment there.

Mitchell said he was unaware of a problem with Rubicon or that defendants wait in prison for treatment beds and sometimes must travel thousands of miles across the country to find a program that has room.

"There are services that need to be provided that haven't been provided. But they are not court services. They are community services," said Judge Frederick Weisberg in December 1983 before sentencing 32-year-old addict and D.C. government shuttle bus driver Eddie Buckner to up to eight years in prison for peddling heroin.

"And if the community doesn't want to pay for it," Weisberg said, "then they pay the price some other way with people selling drugs like you did or committing crimes to get drugs instead of treating people. This is extremely unfortunate."