Functions with optional parameters
- To: mathgroup at smc.vnet.net
- Subject: [mg51886] Functions with optional parameters
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Thu, 4 Nov 2004 01:49:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hello everyone, How can I create functions with optional parameters? For example, a simple function to add two or three numbers: addThem[a_,b_,c_]:=If[c is not empty, Sum[a,b,c],Sum[a,b]] I'm not sure of the proper syntax to test whether c is null or empty. Greg
- Follow-Ups:
- Re: Functions with optional parameters
- From: Yasvir Tesiram <yat@omrf.ouhsc.edu>
- Re: Functions with optional parameters
- From: Tomas Garza <tgarza01@prodigy.net.mx>
- Re: Functions with optional parameters