Duguofu, 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: DOUBLE PRECISION myArray INTEGER maxArraySize PARAMETER (maxArraySize=100) DIMENSION myArray(maxArraySize) 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. David On 11/26/2013 04:49, fuguodu wrote:
-- *************************** 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 d.bradley@tess-inc.com http://www.tess-inc.com http://www.trnsys.com |