[TRNSYS-users] Read Write function

Gehad Azmy gehadrabee24 at aucegypt.edu
Wed Nov 23 00:54:28 PST 2022


Good morning I'm working on making a new component and I have a problem in
understanding Read Function, Now I calculate some variables which will be
used in the second iteration as inputs, so I make a Read Function
j=100
If  (current_time_step > 1) Then
  open(109, file = 'm_new.dat', status='old')
  Do i = j,0
      start_element=(0.5*(i**2-i))+1
      end_element=start_element+(i-1)
      Read(109,*)  m_pb(start_element:end_element)
end do
the function is working well, what I do not understand is, how does the do
loop work from 100 to 0? And when I reverse it from 0 to 100, or from 1 to
100, it doesn't read anything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20221123/5e3f62b2/attachment.htm>


More information about the TRNSYS-users mailing list