       Re: multivariable functins with variable number of arguments

• To: mathgroup at smc.vnet.net
• Subject: [mg13025] Re: [mg12960] multivariable functins with variable number of arguments
• From: "Jrgen Tischer" <jtischer at col2.telecom.com.co>
• Date: Tue, 30 Jun 1998 00:26:23 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```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

Jrgen

-----Original Message-----
From: Tatyana Polenova <tatyana at chem.columbia.edu> To:
mathgroup at smc.vnet.net
Subject: [mg13025] [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: multivariable functins with variable number of arguments
• Next by Date: Re: How to declare Integers?
• Previous by thread: Re: multivariable functins with variable number of arguments
• Next by thread: Re: multivariable functins with variable number of arguments