  A mechanism for determining fermion masses in four spacetime dimensions is
presented, which uses a scalar-field domain wall extending in a fifth spacelike
dimension and a special choice of Yukawa coupling constants. A bounded and
discrete fermion mass spectrum is obtained analytically for spinors localized
in the fifth dimension. These particular mass values depend on a combination of
the absolute value of the Yukawa coupling constant and the parameters of the
scalar potential. A similar mechanism for a finite mass spectrum may apply to
$(1+1)$--dimensional fermions relevant to condensed matter physics.
