An external procedure can serve as the implementation of a program unit other than an anonymous block. In other words, a call specification can appear in a top-level procedure or function, a packaged procedure or function, or an object method. What’s more, you can define the call spec in either the specification or the body of packaged program units (or in either the spec or body of object types). Here are some schematic examples:
You should recognize the form shown here as that of the shell( ) function shown earlier in the chapter. You can also create a procedure:
In this case, the corresponding C function would be typed void.
The next form shows a packaged function that does not need a package body:
However, when the time comes to modify the package, you would have to recompile the specification. Depending on the change you need to make, you may considerably reduce the recompilation ripple effect by moving the call spec into the package body:
name; END; CREATE PACKAGE BODY
Unpublished or private program units inside packages can also be implemented as external procedures. Using a call spec in an object type method is quite similar to using it in a package; that is, you can put the call spec in the object type ...