August Karlstrom
2017-02-12 15:02:39 UTC
To me it is not clear if assignments to value parameters of pointer or
procedure type are permitted. Section 9.1 says
"If a value parameter is structured (of array or record type), no
assignment to it or to its elements are permitted."
This indicates that structured value parameters of pointer or procedure
type may be assigned to. However, section 10.1 says
"A value parameter corresponds to an actual parameter that is an
expression, and it stands for its value, which cannot be changed by
assignment. However, if a value parameter is of a basic type, it
represents a local variable to which the value of the actual expression
is initially assigned."
This means that only value parameters of a basic type can be assigned
to. Thus, there is a contradiction between the two sections.
https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.Report.pdf
-- August
procedure type are permitted. Section 9.1 says
"If a value parameter is structured (of array or record type), no
assignment to it or to its elements are permitted."
This indicates that structured value parameters of pointer or procedure
type may be assigned to. However, section 10.1 says
"A value parameter corresponds to an actual parameter that is an
expression, and it stands for its value, which cannot be changed by
assignment. However, if a value parameter is of a basic type, it
represents a local variable to which the value of the actual expression
is initially assigned."
This means that only value parameters of a basic type can be assigned
to. Thus, there is a contradiction between the two sections.
https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon07.Report.pdf
-- August