to the tool movement length along each axis it is possible to shorten the machining time and to reduce the tool abrasion and thereby the height difference on the tool surface with the result that the tool cost can be economized in addition since it is unnecessary to record the optimum spindle revolution number commands s commands in the machining program the machining program can be shortened as compared with when the optimum spindle revolution number commands s commands are described in the machining program therefore it is possible to shorten the machining program reduce the memory for storing the machining program and decrease the communication speed during the remote buffer operation further in general there exists such a tendency that the acceleration or deceleration time of the spindle is longer than that of the tool axial movement to overcome this problem it is preferable to match the timing of the tool axial movement with that of the spindle by providing a delay buffer 26 at the output stage of the tool axial movement command fig3 is a block diagram showing a third embodiment of the numerical control apparatus according to the present invention in this third embodiment any command values of the spindle revolution numbers are not described in the processing program first a machining program 5 is analyzed by an analyzing section 31 of the numerical control apparatus 30 that is the analyzing section 31 extracts a character string of x codes.