3.12
Calling Procedures Part 1
A procedure is a named group of programming instructions that may have parameters and return values Procedures are referred to by different names, such as method or function, depending on the programming language. Parameters are input values of a procedure. A procedure call interupts the sequential execution A procedure call interrupts the sequential execution of statements causing the program to execute the statements withing the procedure before continuing. On the last statement in the procedure has executied, flow or control, and control
calling Procedures Part 2
Whe calling procedures, it’s important to take notice to whetehr it returns data, ora block of statements, If the procedure just returns a block of statements, you call the procedure by referring to the procedure nae and inputting
result <- procName (arg1, arg2, …)
Developing Procedures
2 differint tyeps. value, and block of statements Pic a descriptive name in case you revisit Pick name, think of parameters, flowchart, execute
Procedural Abstraction
ONe type is prcedural which provides a name for a process and bee used onl knowing what it does and not how it works good in complexity
Subdivision into a separate subprograms is calld modularity
Procedurla abstracton may extract shared features to generalize funtionality instead of duplicating code. allows for reuse.