A numerical controller having a learning control function executes
commands in an NC program, starts performing learning control from a
location where the same operation pattern starts occurring, and stops
performing learning control at a location where the same operation
pattern ends. Once a command that allows learning control is established
in the NC program, the section in which learning control is carried out
can be automatically determined.