forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
- From: Rob <spamrefuse@yahoo.com>
- To: abinit <forum@abinit.org>
- Subject: [abinit-forum] Re: Reading header of binary file: Fortran code question...
- Date: Tue, 2 Jun 2009 06:15:13 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=nruoh5GDMpMI+BYSER/lAypMfmx310RyNraEyoqRM5RFyeP60atCbSg1dHFwo8B6zGYLhzO8MDj4fBJ/Ng2ANPLEbLNJ8Irctux08CrcADHoLQ/nPjYJ/Y01N7kotBlecsAJUDli2ZiGfY/4Q+uPuOOXKEUG9W1+k2BHTe2SEvY=;
Anglade Pierre-Matthieu wrote:
>
> A "%" in fortran is more or less equivalent to the "->" operator in C.
> Moreover, in fortran it is possible to avoid using a do (C for) loop
> for output by using the shortcut (table(i),i=1,n). Does this make the
> documentation any clearer ?
Hmm, let me try to convert one fortran snippet into C, and please
correct me if I'm wrong:
write(unit=unit)(pawrhoij(iatom)%nrhoijsel(1:nspden),iatom=1,natom)
for (iatom = 1; iatom <= natom; ++iatom) {
for(i = 1; i <= nspden; ++i) {
printf("%g", pawrhoij [iatom] -> nrhoijsel [i]);
}
}
Rob.
- [abinit-forum] Re: Reading header of binary file: Fortran code question..., Rob, 06/02/2009
- Re: [abinit-forum] Re: Reading header of binary file: Fortran code question..., Anglade Pierre-Matthieu, 06/02/2009
- Re: [abinit-forum] Reading header of binary file: Fortran code question..., Josef Zwanziger, 06/02/2009
Archive powered by MHonArc 2.6.15.