da Silva, Joe wrote:
Well, from memory, a procedure or function parameter in J&W looked something like the following example :
program test; .... procedure fred (function smith : integer); .... function one (x : boolean) : integer; .... function two (x, y : integer) : integer; .... begin {test} .... fred(one(true)); .... fred(two(1,2)); .... end. {test}
Notice how the formal parameter in procedure "fred" is a function ("smith") of known type (integer) but unknown parameters? Dr. Wirth later decided this was unsafe, so when the ISO-7185 standard was formalised, this was changed (now the formal parameter, function "smith", must show it's formal parameters too). This also applies to ISO-10206, of course.
Do you mean the parameters given to the inner function (one, two) are already specified when calling the outer one (fred)? In this case, it's not much different than making smith type Integer, and passing the function result to fred. (Sure, there could be a difference in when and whether at all one/two are called, but unless they have side-effects, the result will be the same.)
Frank