To most students he's known affectionately as Officer Freddy or Freddy Flintstone or Shorty. To others, not many, he's "pig," an epithet accompanied by the hog call, "sooooo-eeee."

By any name, Officer Fred Miller of the Prince William County Police Department is a familiar and usually welcome sight to the 2,500 students at Woodbridge Senior High. In his jacket and tie, with a snub-nosed .38-caliber pistol and handcuffs at his side, Miller is Woodbridge's in-house cop. He's one of a growing number of police officers locally and nationwide who patrol schools full time with community blessings.

"We are agents of the taxpaying public," says Woodbridge principal Thomas Gaul. "We're here to teach, not to protect drug dealers and vandals. You can't teach a drugged-out kid."

Though Fred Miller is the law, he is also equal parts legal counselor, shoulder-to-cry-on, teacher and school cheerleader. He believes it's harder to be a teen-ager these days, because there are more temptations, more mobility, more parents working, more peer pressure.

"The school should be an oasis," Miller says. "That's what we try for. It's not easy. Heck, they can go home and see 12 murders on television in one afternoon."

Oases are rare these days, however, so Miller is also an intelligence gatherer, a kind of above-board double agent. He counsels the kids, and they supply him with tips on local crime. That's valuable information in a bedroom community like northern Prince William County, where 30 percent of the adults commute to Washington each day and what crime there is is often burglary and vandalism committed by high-school-age youths.

So far this year, Miller has arrested 12 students, most for having pills, beer or whiskey. He has confiscated "illegal substances" from students' pockets and lockers. He's used the cuffs more than once in the two years he's been a high-school officer; The gun not at all. But the accepted wisdom among faculty members is that when Miller talks, students listen.

Not too long ago an armed police officer walking the hallways of many public high schools would have raised the ire of students and parents. Not in Prince William.

"Every great once in a while a parent will call me to complain about 'police involvement' and his kid's rights," says Gaul. "I say, 'What about the rights of these kids to attend school without the threat of being pestered by drugs?' " Many students agree.

"Half want him to get out, the other half don't really mind that he's here," says Chris Scott, a junior. "He cools everybody down."

"He's a really nice guy. He's not like a cop," says senior Dale Finney. "You can joke around with him and call him short and he won't put the cuffs on you. I've never seen him make a bust. At one time this was a pretty loaded school. Since the crackdown, you don't have to worry about going into the bathroom and getting busted because they're using drugs."

Says junior Reginald Roseboro, "He makes it easier on everyone."

Some students and civil libertarians disagree. "They run this place like a prison," grouses a student sneaking a smoke in the parking lot one recent morning. "They won't let you smoke, they won't let you stay in your car in the morning and listen to the radio. On the other hand, there isn't as much vandalism anymore. People used to paint the walls, and tear the bathrooms apart."

Miller agrees that things have calmed down since his arrival at the school. He spends more time now giving classes warning against drug use and shoplifting than he does making arrests.

"When we warn a child, it's a threat," says Gaul. "When Fred does it, it's reality."

Prince William County has had juvenile officers visiting its schools since 1975, but this is only the second year all county high schools have had a police officer ensconced in his own office. Arlington has a similar program, and the District and other surrounding counties have officers who visit the public schools regularly. An estimated 20 percent of the nation's public high school's now use local police in these ways, according to the National Education Association.

That troubles civil libertarians in Virginia and elsewhere, who say having full-time police on duty in the schools is unusual. "Police should be in the school only to investigate a specific crime or to restore order, and then for the shortest time possible," says Chan Kendrick, director of the Virginia American Civil Liberties Union. "Having someone there as an intelligence officer . . . sabotages the normal judicial process."

"It seems extraordinary and unnecessary," says Dorothy Ehrlich, director of the Northern California ACLU, which has challenged police investigations in local schools. "The school is a place of learning, and that shouldn't be colored by feelings that there is intelligence being conducted . . . . Ordinarily you bring in a police officer when the law has been broken."

Woodbridge Senior High's cop is 25 years old, a bachelor who grew up in the Shenandoah Valley, spent high school in Greenwich, Conn. He frequently lapses into policespeak. Teen-agers are "juveniles," drug use is "substance abuse." Then there is the "Drug of the Week" -- whatever mind altering substance has made its way down Interstate 95 from New York to a local dealer. Last week, it was "whip-it," small metal canisters of the gas that puts the fluff in whipped cream.

"They sniff it," says Miller. "I take caffeine pills off of them all the time. A lot of kids take them. They've got sports in the afternoon, homework at night. They've been up since 6 to get here by 7:45. Some of them are just plain tired."

Miller's office is in the guidance wing, where counselors concentrate on getting children into college and easing adjustment pains. Miller's job, on the other hand, often falls into the gray area where student social and personal life runs into the law. Students come to him about everything from child abuse to drug problems to a fight between ex-sweethearts. He knows many students by name, and he makes it a point to inquire about test grades and basketball scores.

"How are you doing there, ladies?" he asks a group of sophomores idling near the gymnasium. "Are we going to win this afternoon?"

He is unabashed about his police intelligence work. "Part of my function is intelligence," he says. "Who's dealing drugs, for example. I usually don't solicit information, but if we have a really big case, and no leads, I'll go around and ask."

A recent rape in a nearby shopping center by someone believed to be of high school age is one such case. "If we don't have a lead on that rape by early next week, I'll make some inquiries. The kids are no dummies. They usually know what's going on, and they understand we're not out here to fry someone that doesn't deserve to be fried."

This does not seem to trouble most parents or school staff.

"I've never heard anyone complain," says Donna Brandstein, a mother active in the school's parent-teacher organization. "He doesn't con them. He knows the consequences. Kids will go to him because they're comfortable with him and because he knows the law."

Woodbridge has cracked down on everything from T-shirts adorned with drug-inspired decals to skipping class. There are hall monitors in every cinderblock passage, and teachers check incoming and outgoing cars at the parking lot all day long. It is virtually impossible to walk unnoticed anywhere.

"Our administrators are in the halls all the time," says principal Gaul. "They work the crowds like stand-up comics."

Some parents and administrators say that because of the new discipline, drug use has declined dramatically. Students say drugs haven't so much disappeared as gone underground. "I wouldn't say there's less," says one senior. "It's just more hidden."

Miller roams the school halls and parking lots, and by 1:45 on most afternoons he is busy waving the afternoon school buses out into the world. Fingers and arms dangle from the bus windows, and Miller staunchly receives his fond and not-so-fond farewells.

"Hey, Officer Freddy! Freddeeee!" they yell. Miller looks pleased, until one of those hands raises the wrong finger. "Verbal assault," says Miller, frowning. "She knows better than that. I'll have to talk to her tomorrow."