.

Thursday, March 28, 2019

Procedures, Parameters & Sub-programs :: essays research papers

Procedures, Parameters & Sub-ProgramsIn any modern platformming language, operations play a vital role in theconstruction of any new softw be. These days, procedures are used instead ofthe old constructs of GOTO and GOSUB, which have since become obsolete.Procedures provide a number of important features for the modern softwareengineer-Programs are easier to write. Procedures redeem a large amount of quantify duringsoftware development as the political platformmer only call out for to code a procedure once, and cease use it a number of times. Procedures are especially efficacious in recursivealgorithms where the same piece of code has to be kill over and over again.The use of procedures furnishs a large and complex course of instruction to be broken up into anumber of much littler parts, each accomplished by a procedure. Procedures alsoprovide a form of abstraction as all the programmer has to do is whap how to assure a procedure and what it does, not how it accomplishe s the task.Programs are easier to read. Procedures help to wee-wee programs shorter, and thuseasier to read, by replacing long sequences of statements with 1 simpleprocedure call. By choosing goo procedure names, even the names of theprocedures help to archive the program and make it easier to understand.Programs are easier to modify. When repeated actions are step ind by oneprocedure call, it becomes much easier to modify the code at a ulterior stage, andalso correct any errors. By building up the program in a modular fashion viaprocedures it becomes much easier to update and replace sections of the programat a later date, if all the code for the specialized section is in a particularmodule.Programs take little time to compile. Replacing a sequence of statements withonce simple procedure call usually reduces the compilation time of the program,so long as the program contains more than one reference to the procedureObject programs require less memory. Procedures reduce the me mory consumptionof the program in two ways. first they reduce code duplication as the codeonly needs to be stored once, but the procedure can be called many times.Secondly, procedures allow more efficient storage of data, because storage for aprocedures variables is allocated when the procedure is called and deallocatedwhen it returns.We can divide procedures into two groups-Function procedures, are procedures which compute a sensation value and whose callsappear in expressionsFor example, the procedure ABS is a function procedure, when given(p) a number x,ABS computes the absolute value of x a call of ABS appears in an expression,

No comments:

Post a Comment