Opened 14 years ago

Closed 14 years ago

#1854 closed defect (fixed)

Returning array as an output from function

Reported by: Adeel Asghar Owned by: Adrian Pop
Priority: blocker Milestone: 1.9.0
Component: Code Generation Version:
Keywords: Cc: Willi Braun, Jens Frenkel

Description

If a Modelica function has two outputs then the code generation for returning an array is wrong. However, it works fine if the function just has one output,

For example this works fine,

Code highlighting:

function A
    input Integer len;
    output Real arr[len];
    external "C" A_external(len, arr) annotation(Library = {"externalLib"});
  end A;

But this does not work,

Code highlighting:

function A
    input Integer len;
    output Real arr[len];
    output Integer status;
    external "C" status = A_external(len, arr) annotation(Library = {"externalLib"});
  end A;

Change History (4)

comment:1 by Adeel Asghar, 14 years ago

Cc: Willi Braun Jens Frenkel added
Keywords: wbraun jfrenkel removed
Owner: changed from somebody to Adeel Asghar
Status: new → accepted

comment:2 by Adeel Asghar, 14 years ago

Owner: changed from Adeel Asghar to Willi Braun
Status: accepted → assigned

comment:3 by Martin Sjölund, 14 years ago

Owner: changed from Willi Braun to Adrian Pop

comment:4 by Martin Sjölund, 14 years ago

Resolution: → fixed
Status: assigned → closed
Summary: Returning array as an output from Modelica function → Returning array as an output from function

This was fixed when Adrian fixed record output in tuple-assignments.

Note: See TracTickets for help on using tickets.