answersLogoWhite

0

Procedures and functions are exactly the same in Pascal, the only difference is that a function must return a value to its caller while a procedure does not. A procedure is essentially the same as a function returning void in C. We use procedures and functions to avoid writing duplicate or repeated sections of code and thus reduce maintenance costs. With well-named procedures and functions our code also becomes self-documenting, making the code much easier to read (and maintain).

User Avatar

Wiki User

8y ago

What else can I help you with?

Related Questions

What is a term used as a synonym for module in any programming language?

subroutines procedures functions or methods


What similarities and differences do you see between the function and linear equations?

Linear equations are a tiny subset of functions. Linear equations are simple, continuous functions.


What are some similarities and differences between quartic and cubic functions?

The similarities are that they are polynomial functions and therefore continuous and differentiable.A real cubic will has an odd number of roots (and so must have a solution), a quartic has an even number of roots and so may have no solutions.


What do API?

An API (Application Programming Interface) is a set of functions and procedures which allow applications to access the features or data of another application, operating system or service.


Explain the similarities and differences in the scientific management and administrative management approaches to management?

Differences: Scientific focuses on the job Administrative focuses on the work of the manager Similarity: Both theoies share planning functions.


Can you pass argument to procedures?

Yes. Procedures are otherwise known as functions, and functions can accept arguments.


What programming languages contain statements that can be used to delete and rename files?

BASIC, perhaps. In other languages (C, Pascal, PHP etc) it can be done via functions or procedures.


What are the similarities between the two object people subjects or concepts list as many difference that you thinks of.?

The similarities between the two objects, people, subjects, or concepts are often related to their characteristics, functions, or purposes. Differences can include unique features, behaviors, origins, or effects that distinguish one from the other. It's important to identify both similarities and differences to understand the relationship or contrast between them effectively.


What is a prodecural programming language?

A procedural programming language is one where programs are organized into blocks of code called variously "subroutines", "functions", or "procedures", each of which handles one particular task. The main function of the program (often actually called "main") then makes a series of calls to these procedures in order to archive its goal.


What are the different modes of C programming language and how are they used in software development?

The main modes of C programming language are procedural, functional, and object-oriented. Procedural programming focuses on functions and procedures to organize code. Functional programming emphasizes the use of functions as first-class citizens. Object-oriented programming involves creating objects that encapsulate data and behavior. These modes are used in software development to provide different approaches to structuring and organizing code, allowing developers to choose the most suitable method based on the requirements of the project.


When deciding whether a set of programming steps should be placed in a sub procedure or a function procedures what are three questions you should ask?

I don't understand your question. In C, all called routines are functions.


What has the author Garth P McCormick written?

Garth P. McCormick has written: 'On weakly analytic and faithfully convex functions in convex programming' -- subject(s): Convex functions, Convex programming, Programming (Mathematics)