Functions and procedures differ mainly in their purpose. Functions are designed to return a value to the main program based on the input parameters passed, while procedures are designed to execute a set of statements but do not return any value. Functions are used to perform calculations, manipulate data, and perform various other tasks before returning a result, while procedures are used to perform a specific task or set of tasks in a structured and organized manner. Functions can be called in an expression and their result used in the evaluation of expressions, while procedures are called and executed, but their result cannot be used in expressions.
This mind map was published on 16 May 2023 and has been viewed 124 times.