Opened 12 years ago

Closed 12 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, 12 years ago

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

comment:2 by Adeel Asghar, 12 years ago

Owner: changed from Adeel Asghar to Willi Braun
Status: acceptedassigned

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

Owner: changed from Willi Braun to Adrian Pop

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

Resolution: fixed
Status: assignedclosed
Summary: Returning array as an output from Modelica functionReturning 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.