What context can I use each word in?
Learn when and how to use these words with these examples!
subfunction
Example
The subfunction responsible for sorting the data was not working properly. [subfunction: noun]
Example
We need to create a subfunction to handle the error messages. [subfunction: verb]
subroutine
Example
The subroutine for calculating the average was not returning the correct value. [subroutine: noun]
Example
We can use a subroutine to simplify the code and make it easier to maintain. [subroutine: verb]
Good things to know
Which word is more common?
Subroutine is more commonly used than subfunction in everyday programming language. Subroutine is a widely recognized term in the programming community and is used across various programming languages and platforms.
What’s the difference in the tone of formality between subfunction and subroutine?
Both subfunction and subroutine are technical terms used in programming and are considered formal language. However, subroutine is more commonly used and has a broader range of applications, making it more versatile and suitable for both formal and informal contexts.