Old-school summary statistics
If you do this
sysuse auto
sum price, detail
return list
you will see that Stata saves summary statistics in a few scalars with some rather apt names, like r(N) for count, r(mean) for mean, or r(p99) for the 99th percentile.
Those names used to be far less descriptive until a few years back. If you come across code written by people who learned their Stata prior to version 6 or so, you're bound to see things like _result(1) rather than r(N). For a full listing of the old-school names, do this after you've ran the code above:
forvalues i=1/20 {
di "_result(`i') is "_result(`i')
}
There are only 18 _result()-style results, but I couldn't remember the exact number. 20 was my first guess, based on the eyeballed length of the return list
output. Stata doesn't mind if you overshoot the loop size. It will just return missing scalars as, well, missing.