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 use of optional parameters
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Louisa  
View profile  
 More options Apr 7 2012, 11:35 am
Newsgroups: comp.lang.fortran
From: Louisa <louisa.hu...@gmail.com>
Date: Sat, 7 Apr 2012 08:35:23 -0700 (PDT)
Local: Sat, Apr 7 2012 11:35 am
Subject: Re: use of optional parameters
On Apr 8, 12:45 am, hel...@astro.multiCLOTHESvax.de (Phillip Helbig---

undress to reply) wrote:
> In article
> <1c75384d-c73a-436f-850b-a46b7eb1a...@h20g2000yqd.googlegroups.com>,

> Michael <michael.caracots...@gmail.com> writes:
> > What is exactly that you are trying to accomplish? speed, clarity,
> > robustness?

> All three.

> The idea is a very general routine which calculates many things.  It
> isn't a good idea to have IF (PRESENT(X)) in the code since a) the
> calculation is rather quick and b) some things are needed internally
> even if the user doesn't want them returned.  I want to avoid a long
> parameter list; the user should just specify what he wants, maybe just
> one parameter from, say, 20.  I don't like the idea of global variables.

> > why would you use GOTO statements? You can avoid a large
> > list of arguments in a subroutine by using structures..

> Not sure what you mean here.  For the user, it should be easy to use,
> just CALL SUB(input1=x,input2=y,output1=a,output2=b) etc where the user
> needs to declare just these arguments.

Another possibility is to use generic procedures to deal with the
different numbers of arguments.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.