The title says it all.
What is the difference between a Function
and a Procedure
?
When should I use which?
algorithmicalgorithmicxalgorithmspseudocode
The title says it all.
What is the difference between a Function
and a Procedure
?
When should I use which?
Best Answer
According to
algpseudocode
, these two are structurally the same, apart from their name:From a programming perspective, the difference is embedded in the language and have the following commonly-used structure (in laymen's terms):
A minimal example indicating their typical usage: