Dear Ivan,
In my opinion, such conditions should be warned or reported as an error
by the compiler. Including A in either lists, (in & out, in & inout or
out & inout) could be right, but the likelihood of being a test writer's
mistake. Anyway, it would be clearest to write "inout A" instead of "in
A, out B" (and then having to remember the rules).
Best regards,
David
Iván Navarro Azurmendi escribió:
> Hello,
>
> I have been reading the Core Languaje, *specifically* the point related to the port definition.
> Ports have three attributes, which determine the direction of the elements define*d*. However I do not find any restriction related to elements being defined in more than one list. For Example:
>
> type port MyPort {
> in A, B
> out A
> }
>
> ¿Is it correct? ¿Should A be declared in the list of elements inout? ¿Does A behaves as an inout element? ¿What is the direction of A?
>
> type port MyPort2 {
> in A
> inout A
> }
>
> ¿What is the direction of A? I suppose inout.
>
> Although it seems quite simple (am I correct?) to imagine that an element define*d* in both, the in and out list element will act as if it was define*d* in the inout list, and any element define*d* in the inout list is bidirectional, even if it is also define*d* in another list, however I do not find any documentation related to this topic. If there is any restriction, could anyone tell me?
>
> Best regards.
>
>
>
>
>
> cid:part1.00080408.01090205@mtp.es
>
>
>
> *Iván Navarro Azurmendi*
>
>
>
> cid:part2.03090808.07000509@mtp.es
>
>
>
> Pº de la Castellana, 182 - 10ª planta
>
> 28046 - Madrid
>
> Tel.: +34 913531564
>
> Fax: +34 913596179
>
> *www.mtp.es* <
www.mtp.es>
>
>
>