This is the story of two gamblers who urged the U.S. Tax Court to allow them to deduct most of their losses at race tracks on their federal income tax returns.

One of them, Herman S. Gazer of Philadelphia, was a compulsive gambler who in 1975 went to the track almost every day, bet every race, usually wagered at least $200 on each race, borrowed from relatives, siphoned money from his one profitable business, kept no records, wrote some bad checks and wound up flat broke.

As Tax Court Judge Howard A. Dawson observed, Glazer "was living in what he termed a 'dream world' concerned with gambling and nothing else."

The other man, Theodore L. Wolkomir of Exton, Pa., west of Philadelphia, was a meticulous gambler. He put his money exclusively on "trifecta" wagers, which required him to pick the first three horses in a race in order of their finish.

After returning home each night from the track, he added his losing tickets, wrote the total loss on a slip of paper, wrapped the tickets in a rubber band and placed them in a box. Day by day, month by month, Wolkomire kept a running summary of his losses.

Glazer, although represented by an attorney, lost his case. Wolkomire argued his own case and became an exception to the maxim that anyone who represents himself has a fool for a client. He defeated the Internal Revenue Service.

The critical difference: the records that Wolkomir kept.

Because tax laws allow gambling losses to be deducted up to the amount of gambling winnings, Wolkomir was permitted to deduct $23,990 -- the amount of his reported income from gambling -- on his 1977 return.

In Glazer's case, however, Dawson ruled that he was not entitled to an $11,268 deduction for his losses in 1975 and must pay $1,273 in taxes for unreported gambling winnings that year.