This is an old revision of the document!
Out statement
An agent can communicate with its outside world using ports. Each port can be used both as an input or an output one. The current role of a port is determined by two factors:
- Connections to the port in the corresponding communication diagram – e.g. if a port
p
is used only as an input port for an one-way connection, it cannot be used as an output port. - Statements used in the code layer – e.g. if a port
p
is used only as an argument of the in statement, it is an input port even if all its connections are two-way ones.
Any communication through a port can be a pure communication or a value passing combination.
In case of a pure communication, the out statement sends a signal (without specified value) through the statement port.
In case of a value passing communication, the out statement sends a value of the statement parameter (or a literal) through the statement port.
The out statement is a single-step statement.
out p; out p x; out p v;
Listing 1. In statement syntax: p
stands for a port name, x
stands for a parameter name anv v stands for a literal value