I first learned to program in the early 70s, using ALGOL 60, on an Elliot 803. Since then I have used Dartmouth BASIC, Varian Extended BASIC, FORTRAN IV,Assember, FORTRAN V, MUMPS and M.
I am used to writing structured code with potentially re-useable segments - they were called sub-routines or procedures. I have learned the Aruino IDE language "on the fly", never having used C or C++ before (and with a gap of nearly 20 years in my programming, when I was "management"!).
I am quite happy to use constructions like:.
.
doSomething();
.
.
void doSomething()
{
//whatever
}
After all that preamble, my question is: What is the correct term for the segment of code:
void doSomething()
{
//whatever
}
Is it a subroutine, a function, a method, a procedure, or what?