Changes between Initial Version and Version 1 of Ticket #1675


Ignore:
Timestamp:
2015-03-06T10:27:05Z (10 years ago)
Author:
Mahder Alemseged Gebremedhin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1675

    • Property ComponentBackend
  • Ticket #1675 – Description

    initial v1  
    11the parameter passing for records does not work: if you have a model which contains records or an array of records as parameters and you want to set them to other values while creating an instance in another model, the new values are not passed!
    22
    3 {{{package testOM
     3{{{
     4package testOM
    45
    56record GenericData
    6 
    77  parameter Integer dataOne = 1;
    88  parameter Integer dataTwo = 1;
    9 
    109end GenericData;
    1110
     
    1413
    1514model HasRecordAsParameter
    16 
    1715  parameter GenericData data;
    1816  Integer variable;
    19 
    2017equation
    21 
    2218  variable = data.dataOne;
    23 
    2419end HasRecordAsParameter;
    2520
     
    2722
    2823model PassesRecordAsParameter
    29 
    3024  parameter DataSetOne data;
    3125  HasRecordAsParameter parameterReceiver(data = data);
    3226  Integer variable;
    33 
    3427equation
    35 
    3628  variable = parameterReceiver.variable;
    37 
    3829end PassesRecordAsParameter;
    3930
    4031
    41 
    4232model PassesRecordArrayAsParameter
    43 
    4433  parameter DataSetOne data1;
    4534  parameter DataSetTwo data2;
     
    4736  HasRecordAsParameter parameterReceiver[2](data = data);
    4837  Integer variable;
    49 
    5038equation
    51 
    5239  variable = parameterReceiver[1].variable;
    53 
    5440end PassesRecordArrayAsParameter;
    5541
    56 end testOM;}}}
     42end testOM;
     43}}}
    5744
    5845in the cases above, the "variable" value after simulating is always "1" , although it should be "5".