Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Function questions?

Received: by 10.180.88.195 with SMTP id bi3mr2402356wib.3.1346158902485;
        Tue, 28 Aug 2012 06:01:42 -0700 (PDT)
Path: e9ni56730611wia.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: Wolfgang Kilian <see...@domain.invalid>
Newsgroups: comp.lang.fortran
Subject: Re: Function questions?
Date: Tue, 28 Aug 2012 15:01:43 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <k1iffm$vdj$1@dont-email.me>
References: <a0d9e5e5-7e03-465f-9dce-0303e0bbbe79@googlegroups.com> <1kpfr0o.ykzota1bisho8N%nospam@see.signature> <ron-shepard-CE8DCF.19024926082012@news60.forteinc.com> <72447d00-0531-4d64-9f5d-b65dccec07df@j9g2000pbg.googlegroups.com> <aa06vrFvddU1@mid.individual.net> <k1fdqr$dvo$1@dont-email.me> <ron-shepard-FFDBCF.07374327082012@news60.forteinc.com> <k1ft77$7k3$1@dont-email.me> <k1h2bt$sdm$1@dont-email.me> <k1hplm$77b$1@dont-email.me> <k1ie4g$l44$1@dont-email.me>
Mime-Version: 1.0
Injection-Date: Tue, 28 Aug 2012 13:01:42 +0000 (UTC)
Injection-Info: mx04.eternal-september.org; posting-host="2c5cce36bb074a0b801a610298736e6a";
	logging-data="32179"; mail-complaints-to="ab...@eternal-september.org";	posting-account="U2FsdGVkX1+46HY4wyGYtjqWwcD1CDG1R4+CvMcOaN4="
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8
In-Reply-To: <k1ie4g$l44$1@dont-email.me>
Cancel-Lock: sha1:yejQKh1BmgCmo6fIdRlNTGKAyxw=
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 08/28/2012 02:38 PM, Gary Scott wrote:
> On 8/28/2012 1:49 AM, Wolfgang Kilian wrote:
>> On 08/28/2012 02:11 AM, Gary Scott wrote:
>> [...]
>> I understand that Fortran is used predominantly in scientific computing,
>> where the main purpose of programs is to calculate numbers, and the
>> underlying mathematics is expressible in terms of functions (in the
>> mathematical sense). Most of this can and should be done without side
>> effects or INTENT(OUT) arguments. Otherwise, use subroutines.
>>
>> -- Wolfgang
>>
>
> Fortran is a general purpose programming language. It is used for a wide
> variety and type of applications. The majority of those need to call C
> APIs which don't abide by the restricted use of functions as only for
> calculating a return value (they nearly all have side effects with the
> return value being an error code).

This is true, but also tends to be system-dependent, so Fortran wrapper 
(sub)routines are likely to be present that localize the system 
dependencies.  For OpenMP, MPI, Lapack, etc. there are native Fortran 
interfaces, which have their own conventions anyway.

-- Wolfgang


-- 
E-mail: firstnameinitial.lastn...@domain.de
Domain: yahoo