reusablesubroutine

noun
UK /ˌriːˈjuːzəbl ˈsʌbruːtiːn/
US /ˌriˈjuzəbl ˈsʌbruˌtin/

A reusable subroutine is a small set of computer instructions you can use again and again.

The programmer wrote a reusable subroutine to check passwords so she wouldn't have to write the same code twice.


OTHER MEANINGS

2. A block of code stored in a library that many programs can call.

The team added the sorting routine to their shared library as a reusable subroutine.

3. A named section of a program that performs one task and can be invoked from many places.

Instead of copying the print logic, he made it a reusable subroutine.

4. A teaching example in programming classes showing how to avoid repeated code.

The lesson introduced a reusable subroutine to demonstrate good coding habits.