The measured contact hole positions are compared and, when there is a positional deviation larger than a constant value, the contact hole is determined as defective.
Therewith, the position is stored in a memory.