Re: Signature in Oberon/F

Alan Freed (al@sarah.lerc.nasa.gov)
Sat, 15 Jun 1996 11:37:15 -0400 (EDT)

Hi Bruno and Stan,

>>There does not seem to be a precise definition of "signature" in
>>the Oberon/F documentation. Nor does there seem to be an explanation
>>of how the framework uses signatures to make implicit calls to
>>exported procedures. Specifically, in MODULE Dialog the documentation
>>states:
>>
>>TYPE NotifyProc = PROCEDURE (op, from, to: LONGINT)
>>Control notification commands must have this signature.
>>
>>Then, in MODULE ObxDialog there is the procedure:
>>
>>PROCEDURE SelNotify* (op, from, to: LONGINT);
>>
>>which apparently has the required signature. What does it take for
>>a procedure to have the right signature:
>>(a) Must the formal parameters match in number and type exactly?
>>(b) Must the formal parameters have the same names?
>>(c) Must the procedure have some common substring in its name,
>> e.g. "Notify" in the above example.
>>(d) What are the Framework rules for determining when a procedure
>> is called by the framework?
>
>Signature as understood in the Oberon programming language means only (a),
>I haven't tried if the Oberon/L compiler also checks if (b) matches since
>I'm usually to lazy to give my own names so I used the copied ones, but if
>the compiler doesn't explicitly check this (i.e. if it's the only Oberon
>compiler that checks this) than I'd say no.

I use procedure types quite often and names of the formal parameters can
be what ever one likes - only types are checked.

All the best,

Al