From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7882 invoked by alias); 3 Nov 2002 13:41:16 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 7549 invoked from network); 3 Nov 2002 13:41:14 -0000 Received: from unknown (HELO web15003.mail.bjs.yahoo.com) (61.135.128.6) by sources.redhat.com with SMTP; 3 Nov 2002 13:41:14 -0000 Message-ID: <20021103134107.29122.qmail@web15003.mail.bjs.yahoo.com> Received: from [61.179.39.119] by web15003.mail.bjs.yahoo.com via HTTP; Sun, 03 Nov 2002 21:41:07 CST Date: Sun, 03 Nov 2002 05:41:00 -0000 From: =?gb2312?q?Zhong=20Wang?= Subject: A question about g77's OPEN & WRITE To: gcc-help@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-11/txt/msg00011.txt.bz2 Hello, everybody I am using g77 for programing now. But I found that g77 is somewhat different to Visual Fortran in I/O. In visual fortran, the following code is legal: >>>>> REAL a(10) OPEN(10,file='aaa.dat',form='binary') WRITE(10)a CLOSE(10) <<<<< You can see that in file aaa.dat there's not anything between the integer and real numbers. But in g77, if I use: >>>>> REAL a(10) OPEN(10,file='aaa.dat',form='unformatted') WRITE(10)a CLOSE(10) <<<<< With "hexedit aaa.dat", you can find there's a length value before and after each record. You know, sometimes we have to make more efforts to deal with those length values when we use other softwares to open these data files. For example, when I use matlab to open the file, I have to read off those length values. It's very convinient. Can you recommend me a possible method with g77 to generate data file which contains no extra bytes in it? Or can the developers add some new features like form='direct' to g77? Thank you very much, Yours, mili _________________________________________________________ Do You Yahoo!? "ÊÇIT¾«Ó¢Âð£¿Ð¡ÊÔÅ£µ¶»ñʱÉд󽱣¡" http://cn.promo.yahoo.com/cgi-bin/udb/u