In AP Computer Science Principles, a procedure call executes a named group of instructions (a procedure) by interrupting the program's sequential flow, passing arguments to the procedure's parameters, running its statements, and then returning control (and possibly a value) to where the call happened.
A procedure call is the moment your program actually uses a procedure. Defining a procedure just writes the recipe; calling it is when someone actually cooks. When the call happens, the program pauses its normal top-to-bottom execution, jumps into the procedure, runs its statements, and then picks back up right where it left off (EK AAP-3.A.4 in the CED).
Calls often hand the procedure some data. The values you pass in are arguments, and they fill in the procedure's parameters, which are just input variables (EK AAP-3.A.3). So in total ← calculateTotal(price, quantity, taxRate), the three values in parentheses are arguments, and the procedure runs with those values plugged in. If the procedure has a RETURN statement, the call hands back a value you can store in a variable or use in an expression. One more naming note from the CED (EK AAP-3.A.2): depending on the language, procedures get called methods or functions, so "function call" and "method invocation" mean the same thing on this exam.
Procedure calls live in Topic 3.12 (Calling Procedures) in Unit 3: Algorithms and Programming, under learning objective AP Comp Sci P 3.12.A, which asks you to do two things. First, write statements that call procedures correctly. Second, determine the result or effect of a procedure call. That second skill is where most exam points hide, because it means tracing what actually happens when control jumps into the procedure and back out. Procedure calls are also the backbone of abstraction in CSP. Every time you call a procedure instead of rewriting its code, you're managing complexity, which is one of the big ideas the whole course is built around. And on the Create performance task, your Personalized Project Reference includes a Procedure section, so you will be writing about a procedure you defined and called in your own program.
Procedure (Unit 3)
A procedure is the named block of code itself; a procedure call is what makes it run. You can define a procedure that never executes, but the moment you call it, the program jumps in and runs those instructions. Definition is the recipe, the call is dinner.
Parameters (Unit 3)
Parameters are the procedure's input variables, and arguments are the actual values you supply in the call. In mystery(7), the 7 is the argument that fills the parameter n. Mixing these two words up is one of the most common CSP vocabulary slips.
return value (Unit 3)
A call doesn't just run code, it can hand back a result. Writing finalAmount ← calculateTotal(...) only works because the call evaluates to the returned value, which you can store or feed straight into another expression.
flow of control (Unit 3)
Sequencing, selection, and iteration describe how a program normally flows. A procedure call is the fourth move in that playbook. It interrupts sequential execution, detours into the procedure, then snaps control right back to the line after the call.
Multiple-choice questions test both halves of 3.12.A. Some ask you to pick the correctly written call, like choosing which statement properly assigns a return value to a variable (finalAmount ← calculateTotal(...)). Others make you trace effects, such as counting how many total calls execute in a segment like sum ← add(x, y) followed by product ← multiply(sum, z) (that's two), or evaluating a recursive call like mystery(7), where you have to follow each call until the base case hits and then add the results back up the chain. The Written Response questions tied to the Create task also lean on this term. The 2024 Written Response Q2 asked about the Procedure section of the Personalized Project Reference, so you need to be able to explain what your own procedure does when it's called, including its parameters and its effect on the program.
Defining a procedure and calling it are different events. The definition (PROCEDURE name(parameters) { ... }) creates the named block of code but runs nothing. The call (name(arguments)) is what actually executes those statements. On trace-the-code questions, code inside a procedure that is never called contributes nothing to the output, no matter what it says.
A procedure call interrupts the sequential execution of a program, runs the procedure's statements, and then returns control to the point right after the call.
Arguments are the actual values in the call; parameters are the input variables in the procedure definition that those arguments fill.
If a procedure returns a value, the call itself evaluates to that value, so you can assign it to a variable or use it inside another expression.
Defining a procedure does nothing on its own; the code only runs when the procedure is actually called.
On the AP exam, you must both write correct call statements and trace what a call does, including nested calls and recursive calls.
Function call, method invocation, and procedure call all mean the same thing; the name just depends on the programming language.
It's a statement that executes a named group of instructions (a procedure), passing arguments to fill its parameters. Per EK AAP-3.A.4, the call interrupts sequential execution, runs the procedure, then continues from where the call happened.
Yes, for AP CSP purposes. EK AAP-3.A.2 says procedures go by different names like method or function depending on the language, so function calls and method invocations are the same idea on the exam.
Parameters are the input variables listed in the procedure definition; arguments are the actual values you supply when you call it. In calculateTotal(5, 3, 0.08), the numbers are arguments filling parameters like price, quantity, and taxRate.
No. A procedure definition is just stored instructions, and nothing executes until a call statement invokes it. Trace questions love to include defined-but-never-called procedures whose code never affects the output.
Follow each call down until you hit the base case, then add up the returns on the way back. For mystery(7) with RETURN n + mystery(n - 2) and a base case of 1, you get 7 + 5 + 3 + 1 = 16.