<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Duguofu,<br>
      I have never found a very satisfactory way of making an adjustable
    array in a Type. It is possible but I have found that it is more
    trouble than it is worth. What is typically done instead is to
    define the array with a maximum size (set as a parameter in the
    Fortran code - NOTE that this is NOT a TRNSYS component parameter)
    and then only use what you need of the array. For example:<br>
    <br>
    DOUBLE PRECISION myArray<br>
    INTEGER maxArraySize<br>
    PARAMETER (maxArraySize=100)<br>
    DIMENSION myArray(maxArraySize)<br>
    <br>
     This method was used a lot in Trnsys16 for handling components that
    have a variable number of parameters, inputs or outputs. You can
    look at Type17 as an example. In Trnsys17 access to the parameters,
    inputs, and outputs is typically done through access functions like
    getParameterValue() so you don't need to worry so much about setting
    up the size of the PAR() array the ways you used to.<br>
     David<br>
    <br>
      <br>
    <br>
    <div class="moz-cite-prefix">On 11/26/2013 04:49, fuguodu wrote:<br>
    </div>
    <blockquote cite="mid:201311261849211716784@163.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <style>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: 宋体; COLOR: #000000; FONT-SIZE: 10.5pt
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
      <meta name="GENERATOR" content="MSHTML 8.00.6001.23536">
      <div>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">Dear all,<!--?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /--><o:p style="FONT-FAMILY:
              Times New Roman; FONT-SIZE: 16pt"></o:p></span></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">Good day!<o:p style="FONT-FAMILY: Times
              New Roman; FONT-SIZE: 16pt"></o:p></span></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">I met an problem when I want to program a
            new compoment.Since Trnsys cancel the type’s program
            arguments. So how to define adjustable array</span><font
            style="FONT-FAMILY: Times New Roman; FONT-SIZE: 16pt"
            face="" size="1">. I define adjustable array in new
            compement’s tmf and use file /export as /fortran. auto
            generated file ( .for ) does not contain any information
            about adjustable array. the name of array is just handled as
            a single variable.<o:p style="FONT-FAMILY: Times New Roman;
              FONT-SIZE: 16pt"></o:p></font></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">Did you meet this problem? How could you
            deal with it?<o:p style="FONT-FAMILY: Times New Roman;
              FONT-SIZE: 16pt"></o:p></span></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">Thank you, looking forward to your reply.<o:p
              style="FONT-FAMILY: Times New Roman; FONT-SIZE: 16pt"></o:p></span></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 12pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: Times New Roman;
            FONT-SIZE: 16pt; mso-bidi-font-family: 宋体; mso-font-kerning:
            0pt" lang="EN-US">Best Regards<o:p style="FONT-FAMILY: Times
              New Roman; FONT-SIZE: 16pt"></o:p></span></p>
        <p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt; BACKGROUND:
          white; mso-pagination: widow-orphan" class="MsoNormal"
          align="left"><span style="FONT-FAMILY: 宋体; FONT-SIZE: 12pt;
            mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"
            lang="EN-US"><span style="FONT-FAMILY: Times New Roman;
              FONT-SIZE: 16pt">Duguofu</span><o:p></o:p></span></p>
        <!--EndFragment--></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.cae.wisc.edu/listinfo/trnsys-users">https://mailman.cae.wisc.edu/listinfo/trnsys-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI  53703 USA

P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>

<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
  </body>
</html>