From owner-freebsd-hackers Wed Oct 15 02:38:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA05808 for hackers-outgoing; Wed, 15 Oct 1997 02:38:03 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from trifork.gu.net (trifork.gu.net [194.93.190.194]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA05797 for ; Wed, 15 Oct 1997 02:37:55 -0700 (PDT) (envelope-from stesin@gu.net) Received: from localhost (localhost.gu.kiev.ua [127.0.0.1]) by trifork.gu.net (8.8.6/8.8.6) with SMTP id MAA01390; Wed, 15 Oct 1997 12:37:26 +0300 (EEST) Date: Wed, 15 Oct 1997 12:37:25 +0300 (EEST) From: Andrew Stesin Reply-To: stesin@gu.net To: Mike Smith cc: hackers@FreeBSD.ORG Subject: Re: Call for Fortran assistance. In-Reply-To: <199710150751.RAA02149@word.smith.net.au> Message-ID: X-NCC-RegID: ua.gu MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 15 Oct 1997, Mike Smith wrote: > Our second design threw the data through a FIFO, but Fortran has funny > formatting requirements for sequential-access data that have stymied us. What was so strange there with the formatting? > We tried converting to ASCII and then parsing it back in, but that's > too slow. As far as I recall, Fortran is able to handle "binary" input records (in a way like one do read(2)/write(2) of a memory buffer containig a C struct foo { ... }; or some kind of an array) without a formatting and conversion overhead. But that was some 10-12 years ago I was doing this daily, so my memory may serve me wrong (?) Anyway you will be able to fill a Fortran array with bytes from an input stream without any conversion and use the buffer' content in any way you like then, using Fortran' equivalent of C union xxx { ... }; that is a COMMON construct. > We've offered to write a Fortran-callable C procedure that can manage > reading the FIFO, but they don't use procedures much (!) and want an > all-fortran solution. Oh damn... Best regards, Andrew Stesin nic-hdl: ST73-RIPE