Skip to content

Passing component references from outside of the function in the external function call #3810

@henrikt-ma

Description

@henrikt-ma

I don't think it is clear what to do in this case:

constant Integer c = 5;

pure function extFun
  output Integer y;
external "C"
  y = extFun(c);
end extFun;

What makes me unsure is that I expected that all component references in the external function call would be possible to classify as either input, output, or protected.

Note that making c an array shows that this can not be understood as a way to pass a constant argument, since only scalar constant arguments are allowed:

constant Integer[1] c = {5};

pure function extFun
  output Integer y;
external "C"
  y = extFun(c);
end extFun;

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions