Function declaration


SYNTAX:
function_decl = function_head [ algorithm_head ] stmt { stmt }  END_FUNCTION ';' .
function_head = FUNCTION function_id  [ '(' formal_parameter { ';' formal_parameter } ')' ]   ':' parameter_type ';' .
formal_parameter = parameter_id { ',' parameter_id } ':' parameter_type .
parameter_type = generalized_types | named_types | simple_types .
algorithm_head = { declaration } [ local_decl ] .
declaraton = constant_decl | function_decl | procedure_decl .
Except for a change in the algorithm head, a function declaration in EDMexpressX is similar to a function declaration in the EXPRESS language. ENTITY and TYPE declarations are not supported in EDMexpressX. More than one constant declaration is allowed, and the constant declarations are not restricted to be the first declarations in the algorithm head.
The scope of a function identifier is the schema, function, procedure, map, statements or compose declaration in which the function declaration occurs.