Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Mathematica question (another one)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5737] Mathematica question (another one)
  • From: Gadi Oron <oron at tremois.pmmh.espci.fr>
  • Date: Sat, 11 Jan 1997 14:29:22 -0500
  • Organization: Acces regional Ile-de-France (Univ. Paris VI/VII) - France
  • Sender: owner-wri-mathgroup at wolfram.com

Hi again guys,

I've got another question about MM.

How should i define a function that has an optional argument with certain 
form, let me explain:

Suppose that a function has to receive an OPTIONAL list of rules that 
takes the deafault value {}.

I've tried :

func[sub:{___Rule}:{}]:=...

But it does not work.

I know i can do it by giving another definition style :

func[sub:{___Rule}]:= ...

and

func[]:=func[{}]

But well, it isn't pretty.

 
Thanx again.
/\/\/\/\/\/\/\/\/\/\/\/>> Gadi ORON <<\/\/\/\/\/\/\/\/\/\/\/\/\
| EMAIL :  oron at pmmh.espci.fr   ::::     oron at clipper.ens.fr  |
| Homepage : http://pmmh.espci.fr/home/oron/WWW/personal.html |
| fido : 2:325/302.8                                          |
| 		  Soyez braves - be brave.                    |
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/





  • Prev by Date: Block vs Module unde Mathematica.
  • Next by Date: Re: Data handling in mathematica 2.2 and 3.0
  • Previous by thread: Block vs Module unde Mathematica.
  • Next by thread: Re: Mathematica question (another one)