MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: multivariable functins with variable number of arguments

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13027] Re: [mg12960] multivariable functins with variable number of arguments
  • From: Tatyana Polenova <tatyana at chem.columbia.edu>
  • Date: Tue, 30 Jun 1998 00:26:24 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Jurgen,
thank you very much- this is really helpful, and indeed, all of the
above works.
Tatyana

On Sun, 28 Jun 1998, [iso-8859-1] Jrgen Tischer wrote:

> Hi Tatyana,
> I can think of the following solutions:
>
> 1. If your classes are of different types say Integer and Real, you could
> use f[a__Integer,b__Real].
>
> 2. Use f[{a__},{b__}], of course you will have to write the brackets later.
>
> 3. Use f[a__,x,b__] where x is a symbol you don't use otherwise.
>      (By the way if you define f[a__,x,b__]:=a/b, you get an amusing
> result.)
>
> 3.a) (Variant of 3.) f[a__,x_Symbol,b__]
>
> 4. f[a__][b__]
>
> Of course one could go on for a while,but I think there should be something
> for you. Pick your choice.
>
> Jrgen
>
> -----Original Message-----
> From: Tatyana Polenova <tatyana at chem.columbia.edu>
> To: mathgroup at smc.vnet.net <mathgroup at smc.vnet.net>
> Date: Sunday, June 28, 1998 7:53 AM
> Subject: [mg13027] [mg12960] multivariable functins with variable number of arguments
>
>
> >Hi,
> >I need to define a function like f[x__, y__] which would have two
> >classes of arguments x and y, each class containing a variable number
> >of arguments. I need to use this function later for making something
> >like multiplication tables between the arguments. What would be the
> >correct syntax for being able to later distinguish between the class x
> >and class y of arguments?
> >thank you very much
> >Tatyana Polenova
> >
> >
>
>



  • Prev by Date: Re: Protection against some Front end problems and crashes
  • Next by Date: Re: multivariable functins with variable number of arguments
  • Previous by thread: multivariable functins with variable number of arguments
  • Next by thread: Re: multivariable functins with variable number of arguments