subroutine

[/ˈsʌbruːtiːn/]
nounpl: subroutines
sub-rotina
1. A sequence of program instructions that performs a specific task, designed as a unit and usually incorporated into a program
The programmer wrote a subroutine to calculate the average of a list of numbers.
O programador escreveu uma sub-rotina para calcular a média de uma lista de números.
2. A separate section of a program that can be called from the main program or from other subroutines
We can call this subroutine multiple times from different parts of the code.
Podemos chamar esta sub-rotina várias vezes de diferentes partes do código.
3. In computing, a reusable block of code that performs a specific function and returns control to the calling program
The main program calls the subroutine whenever it needs to validate user input.
O programa principal chama a sub-rotina sempre que precisa validar a entrada do usuário.
The term 'subroutine' is fundamental in computer science education and programming practice in both Brazil and the USA. In modern programming languages, the concept has evolved into 'functions,' 'methods,' and 'procedures,' but the term 'subroutine' remains historically significant and is still used in legacy systems, academic contexts, and when discussing fundamental programming concepts. Brazilian tech professionals often use both 'sub-rotina' and the English term interchangeably in technical discussions.
Synonyms / Sinônimos
functionprocedureroutinemethodsubprogram
Antonyms / Antônimos
main programmainline code

Regional Variations

General Brazilian
sub-rotina
Standard term used in Brazilian Portuguese technical documentation and teaching
São Paulo
sub-rotina
Standard technical usage in the main tech hub
Rio de Janeiro
sub-rotina
Standard technical usage
Portugal
sub-rotina
Portuguese equivalent, though 'função' is often preferred in modern contexts

Related Words

functionprocedurealgorithmcode blockmoduleparameterreturn valuerecursive

Related Idioms & Phrases

call a subroutine
return from a subroutine
nested subroutines
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →