Call

A call is the invocation of a function or method.

Related concepts:  FunctionMethodReturn

Closest Wikipedia entry:  Subroutine — In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times. Callable units provide a powerful programming tool. The primary purpose is to allow for the decomposition of a large and/or complicated problem into chunks that have relatively low cognitive load and to assign the chunks meaningful names (unless they are anonymous).

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Call is based on principled authoritative sources such as:

Misconceptions about Call
52 documented Misconceptions

Check Yourself
Misconception
BaseCaseNotNeededJava
Recursive computations do not necessarily need a base case
Misconception
BaseCaseNotNeededScratch
Recursive computations do not necessarily need a base case
Misconception
BaseCaseSelfRecursiveJava
The base case of a structural recursion consists of a recursive self-call
Misconception
CallNotStaticallyCheckedJava
A method invocation on a reference of a type that does not have that method won't compile
Misconception
CallOnPrimitiveJava
One can invoke a method on primitive values
Misconception
CallRequiresVariableJava
One needs a variable to invoke a method
Misconception
CallWithoutFrameJava
A method invocation does not necessarily allocate a stack frame
Misconception
CallbackParametersInCallerJavaScript
Parameters of a callback function may be written as parameters of the caller function
Misconception
CallerFrameContainsCalleeFormalJava
Stack frame of caller includes variables for callee's formal parameters
Misconception
CannotChainAttributeToObjectInstantiationPython
Method calls, and attribute accesses in general, cannot be chained to a constructor invocation.
Misconception
CannotChainMemberAccessesJava
Member accesses cannot be chained together
Misconception
CannotChainMemberToConstructorJava
Method calls or field accesses cannot be chained to a constructor invocation
Misconception
ChainedMethodsNotCalledFromOutsideJava
Chained methods are all called on the object at the beginning of the chain
Misconception
ConstructorAllocatesJava
The constructor allocates the object
Misconception
ConstructorReturnsObjectJava
Constructors need to return objects
Misconception
ConstructorWithoutNewJava
One can write the constructor name, without new, to instantiate a class
Misconception
DeferredReturnJava
A return statement in the middle of a method doesn't return immediately
Misconception
DeferredReturnPython
A return statement in the middle of a function doesn't return immediately
Misconception
FrameIsClassInstanceJava
A stack frame is the same as an instance of a class
Misconception
FunctionAsValueWithParenthesesJavaScript
To use a function as a value, one needs to have parentheses after its name
Misconception
FunctionsCannotBeImmediatelyInvokedJavaScript
Functions cannot be called in the expression in which they are defined
Misconception
InitCreatesPython
__init__ must create a new object
Misconception
InitReturnsObjectPython
__init__ needs to return an object
Misconception
InlineCallInExpressionTreeJava
The expression tree of an expression involving a call inlines the call's computation of the returned value
Misconception
InterproceduralEdgeJava
In an intra-procedural control-flow graph, method call nodes point to the called method
Misconception
NoCallOnStringLiteralJava
One cannot invoke methods on String literals
Misconception
NoFunctionCallsChainingJavaScript
It is not allowed to chain function calls
Misconception
NoInsideMethodCallInConstructorJava
It is foirbidden to call other methods on the same object while inside its constructor
Misconception
NoStringToStringJava
One cannot invoke toString() on a String
Misconception
NumberOfParametersMatchArgumentsJavaScript
Functions must be called with the same number of arguments as defined in their signature
Misconception
ObjectLabeledWithConstructorSignatureJava
In stack and heap diagrams, an object on the heap is labeled like a stack frame of a constructor call
Misconception
ObjectsMustBeNamedJava
A variable is needed to instantiate an object
Misconception
ObjectsMustBeNamedPython
A variable is needed to instantiate an object
Misconception
OutsideInFunctionNestingPython
Nested function calls are invoked outside in
Misconception
OutsideInMethodNestingJava
Nested method calls are invoked outside in
Misconception
ParenthesesOnlyIfArgumentJava
() are optional for method calls without arguments
Misconception
ParenthesesOnlyIfArgumentPython
() are optional for function calls without arguments
Misconception
RecursiveCallSiteNoReturnJava
Tail-recursive call sites have no continuation
Misconception
ReturnCallJava
Return statements need () around the return value
Misconception
ReturnCallPython
Return statements need () around the return value
Misconception
ReturnUnwindsMultipleFramesJava
A return statement can unwind multiple call stack frames
Misconception
ReturnUnwindsMultipleFramesPython
A return statement can unwind multiple call stack frames
Misconception
RightToLeftChainingJava
Chained accesses are invoked from right to left
Misconception
RightToLeftChainingPython
Chained accesses are invoked from right to left
Misconception
SetTimeout0IsSynchronousJavaScript
Scheduling the execution of a function after 0 milliseconds with setTimeout is equivalent to a synchronous call
Misconception
StackTraceIsCallHistoryJava
A stack trace is the sequence of previously called methods
Misconception
StaticCallPolymorphicJava
A static method call is dispatched polymorphically at runtime based on the argument types
Misconception
StaticDispatchJava
The method to be called is determined by the static type
Misconception
StaticFrameInGlobalsJava
Stack frame of static method calls lives in the global memory area
Misconception
SuperAlwaysHasParenthesesJava
To call a method on a superclass, parentheses are needed after the keyword super
Misconception
SuperNotFirstStatementJava
super() can be called anywhere in the constructor of a subclass
Misconception
ThisChildInCallExpressionJava
Instance method or constructor call nodes in expression trees have a child labeled "this"

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.