Skip to content
← Back to glossary

メインルーチンMain Routine

Learn in the textbookCoding Conventions and Structuring

DefinitionA main routine (メインルーチン) is the central processing that starts first when a program runs and directs the flow of the whole program.

ExplanationIt leaves individual detailed tasks to lower-level processing that it calls, then moves on to the next step once that processing returns. Reading the main routine therefore tells you what the whole program does and in what order.

AnalogyIt resembles a site supervisor who sets the order of the work, hands each stage to the right tradesperson, and moves to the next stage after hearing that one is done.