Computing. A named sequence of instructions that performs a specific task and can be invoked from multiple points within a program, after which control returns to the calling code.
The data-validation logic was moved into a subroutine so that it could be reused throughout the application.