noun
subroutine
Standard computing term for a reusable block of code called from a main program.
このサブルーチンは、メインプログラムから呼び出されます。
This subroutine is called from the main program.
関数 (function) is a more general term in programming; サブルーチン specifically emphasizes a called block of code, often without a return value.
Borrowed from English 'subroutine'.