Genetic Programming (GP), a method of evolutionary computation, is used in producing a variety of programs. In order to generate a procedural program, handling variables is required. It increases the number of combinations of generated programs. This paper proposes a method including the automatic initialization of variables and decreasing the number of combinations of them. For this propose, two major revisions are introduced. One is the introduction of new parameters, the maximum depth and the minimum depth of the height of a program tree. These make programs easy to have a specific structure. The other is the addition of genetic operations. These are for avoiding convergence of programs. Owing to these revisions, it is possible to improve the success rate of the generation of program that includes all of requirement.