История изменений
Исправление soomrack, (текущая версия) :
Ага, сайд эффекты могут быть и у функции, и у процедуры.
Вот определение из стандарта ISO/IEC 2382:2015(en) Information technology — Vocabulary
2122456
procedure
subroutine
subprogram that does not return a data value, except as part of the parameter mechanism
Note 1 to entry: In COBOL, a procedure is a paragraph, or a group of logically successive paragraphs, or a section (consisting of zero or more paragraphs) within the procedure division.
Note 2 to entry: In some programming languages (i.e., C and C++), the procedure language construct is not differentiated from the function language construct except that returned data values may be void or not used.
Note 3 to entry: procedure ; subroutine: terms and definition standardized by ISO/IEC [ISO/IEC 2382-15:1999].
Note 4 to entry: 15.06.11 (2382)
===
2122457
function
subprogram, usually with formal parameters, that produces a data value which it returns to the place of the invocation
Note 1 to entry: A function may also produce other changes through the use of parameters.
Note 2 to entry: function : term and definition standardized by ISO/IEC [ISO/IEC 2382-15:1999].
Note 3 to entry: 15.06.12 (2382)
PS: каких-то серьёзных различий у определений нет, и кмк, разделение существует исключительно по историческим причинам, поэтому акцентировать внимание на этом не стоит.
Исходная версия soomrack, :
Ага, сайд эффекты могут быть и у функции, и у процедуры.
Вот определение из стандарта ISO/IEC 2382:2015(en) Information technology — Vocabulary
2122456
procedure
subroutine
subprogram that does not return a data value, except as part of the parameter mechanism
Note 1 to entry: In COBOL, a procedure is a paragraph, or a group of logically successive paragraphs, or a section (consisting of zero or more paragraphs) within the procedure division.
Note 2 to entry: In some programming languages (i.e., C and C++), the procedure language construct is not differentiated from the function language construct except that returned data values may be void or not used.
Note 3 to entry: procedure ; subroutine: terms and definition standardized by ISO/IEC [ISO/IEC 2382-15:1999].
Note 4 to entry: 15.06.11 (2382)
===
2122457
function
subprogram, usually with formal parameters, that produces a data value which it returns to the place of the invocation
Note 1 to entry: A function may also produce other changes through the use of parameters.
Note 2 to entry: function : term and definition standardized by ISO/IEC [ISO/IEC 2382-15:1999].
Note 3 to entry: 15.06.12 (2382)