Maximum distance q -nary codes

A q -nary error-correcting code with N = q^{k} code words of length n = k + r can have no greater minimum distance d than r+1 . The class of codes for which d = r+1 is studied first in general, then with the restriction that the codes be linear. Examples and construction methods are given to show that these codes exist for a number of values of q, k , and r .