0

Is a function considered a subroutine?

A subroutine is defined as a set of instructions designed to perform a frequently used operation within a program

29th Sep 2019, 2:39 PM
Nicholas Jaikeran
Nicholas Jaikeran - avatar
1 Answer
+ 2
Are you asking a question or are you sharing what you wrote in Description? because this forum is meant for Q&A's. What you wrote in Description seems to describe a function. As we know functions are written to avoid rewriting instructions, as we can call the function in a loop. Reminiscing the days when I learned and used BASIC language, what distinct a subroutine and a function is that functions return something, but subroutines don't. A subroutine in BASIC is pretty much like a void function in C/C++ or some other syntactically similar languages. It consists of instructions to be executed, but not necessarily process anything, and optionally return the result. What is the relevance of 'basepointer' you put in Relevant Tags with the question?
29th Sep 2019, 3:32 PM
Ipang