8.12 RETURN

...
ENTITY e IS
    ...
BEGIN
    ...
END e ;

...
ARCHITECTURE a OF e IS
    ...
BEGIN
    ...
END a ;

...
CONFIGURATION c
        OF e IS
    ...
    ...
    ...
END

...
PACKAGE pkg IS
    ...
    ...
    ...
END pkg ;


return_statement ::=
[ label : ]
return [ expression ] ;

..
PACKAGE BODY pck
        IS
    ...
    ...
    ...
END pck ;

...
b: BLOCK IS
    ...
BEGIN
    ...
END BLOCK b ;

FUNCTION f (...)
    RETURN r IS
    ...
BEGIN
    ...
END f ;

PROCEDURE p (...) IS
    ...
BEGIN
    ...
END p ;

p : PROCESS
    ...
BEGIN
    ...
END PROCESS p ;

8.12.1 Further definitions

label ::= identifier

expression ::=
    relation { and relation }
    | relation { or relation }
    | relation { xor relation }
    | relation [ nand relation ]
    | relation [ nor relation ]

8.12.2 Comment

A function body must contain a RETURN -statement.

8.12.3 Examples

RETURN ;

No value is returned.

RETURN value ;

The return value is that of value .

RETURN my_function( data, 5 pF ) ;

The return value is the result of the function my_function .

RETURN a + b + 5 ns ;

The return value is the sum a + b + 5 ns .

RETURN "author name : " & name ;

The return value is a chained string.