About 108,000 results
Open links in new tab
  1. What is the difference between a function and a subroutine?

    a. A subroutine is a logical construct used in writing Algorithms (or flowcharts) to designate processing functionality in one place. The subroutine provides some output based on input where the processing may remain unchanged. b. A function is a realization of the Subroutine concept in the programming language

  2. terminology - What is the difference between subroutine, co …

    Nov 11, 2023 · A subroutine and a function are essentially the same thing, with one difference: A function returns some sort of value (usually via the stack or CPU register), while a subroutine does not. Whether subroutine or function, it is a block of …

  3. Java: What is the difference between subroutine and methods?

    May 26, 2017 · Technically a (pure) function must always return the same result for a given set of parameters. This was good for non-oo languages as a replacement for "Subroutine", it is a clearer term than subroutine because it specifies how values are passed and implies you aren't just accessing arbitrary memory, technically it's probably still a subroutine ...

  4. functional programming - Difference between function, method, …

    Jul 5, 2021 · Routine and subroutine. Those words have mostly disappeared in modern languages. They were used in older programming languages. See also this related question: What's the technical definition for "routine"? Subprogram. A subprogram is a part of a program that could be consider a program on its own.

  5. Are "subroutine" and "routine" the same concept?

    In the context of the Programming Language Pragmatics example you provided, the subroutine appears to be the call stack of actions to be executed and each item of the stack are routines that launch their own self-contained stack. After all of the processes are performed, the routine exits and the subroutine moves down to the next routine.

  6. What is the difference between a subroutine and a function?

    The most common definition of subroutine is a function that does not return anything and normally does not accept anything. It is only a piece of code with a name. Actually in most languages functions do not differ in the way you declare them. So a subroutine may be called a function, but a function not necessarily may be called a subroutine.

  7. function - Subroutines in C# - Stack Overflow

    Jun 10, 2011 · Example private void AnotherMethod() { // Call whatever subroutine you like MyRutine(); } Second. If its not in the same class you need to create instance of the class which contains routine and than you can use that object to call you routine. Example MyClass c = new MyClass(); c.MyRutine();

  8. Purpose of using sub routines over functions - Stack Overflow

    Jul 3, 2020 · Subroutines modify the variables in the calling code and functions leave them intact. So a subroutine can provide several modified pieces of information to the calling code (as many changes as there are variables, including arrays) but a function can only provide one answer at a time for the values that are passed to it.

  9. How does interrupt differ from subroutine calls? - Stack Overflow

    May 7, 2021 · From a logical perspective, a subroutine or function call suspends the currently executing caller and transfers control to the sub/func. When that sub/func is finished, it returns control to the caller and it resumes after the call it made.

  10. Subroutine vs functions in python - Stack Overflow

    Aug 29, 2022 · But, no where in the Glossary a subroutine is defined. From my understanding, in Python, there's no difference between a function and a subroutine. But, I could not find this exactly in official documentation. So, can anyone confirm …