WRITE, FORMAT problem
- From: aborel@xxxxxxxxxxxxxxxxxxxx
- Date: 30 Jun 2006 01:10:57 -0700
Hello everybody
I have a problem with the formatting of a write statement.
I am manipulating large data arrays (matrices) and I try to write out
the data as being semicolon separated. Since the array dimensions are
input, the format statement can not be hard coded.
I tried (n_rows and n_columns are input):
do i=1,n_rows,1
do j=1, n_columns,1
write(unit=201,fmt="(<2*n_columns>a)"), &
trim(adjustl(arr_data(i,j))), char(59)
end do
end do
and I get as result
[Loadcase ID];
Time Step;
XTP;
YTP;
ZTP;
XTS;
YTS;
ZTS;
XBP;
YBP;
....
But what I want as a result is
[Loadcase ID];Time Step;XTP;YTP;ZTP;XTS;YTS;ZTS;XBP;YBP;...
....
I tried several other ways but either they did not compile or the
result was not what I wanted
[This does not work either:
write(unit=201,fmt="(<n_columns>(a, char(59)))"), &
trim(adjustl((arr_data(i,j), j=1,n_columns,1), i=1,n_rows_hea,1))]
Maybe somebody can help me. Thanks in advance for your help,
regards Alex
.
- Follow-Ups:
- Re: WRITE, FORMAT problem
- From: Richard E Maine
- Re: WRITE, FORMAT problem
- From: Ian Bush
- Re: WRITE, FORMAT problem
- From: R. MacDonald
- Re: WRITE, FORMAT problem
- Prev by Date: pass several filenames to the subroutine
- Next by Date: the hot key in CVF 6.6
- Previous by thread: pass several filenames to the subroutine
- Next by thread: Re: WRITE, FORMAT problem
- Index(es):
Relevant Pages
|