Checking the form of an option
- To: mathgroup at smc.vnet.net
- Subject: [mg20982] Checking the form of an option
- From: "DIAMOND Mark" <noname at noname.com>
- Date: Wed, 1 Dec 1999 01:50:54 -0500 (EST)
- Organization: The University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
I want to check whether option "K" to a function is an integer, a list of single numbers, or neither of these, and then to execute one of three different statements. If these K were a simple parameter, I could do it with f[k_Integer] := functionBody; f[k:{_Integer}..] := functionBody; f[k_] := functionBody but I cannot see how to check for similar conditions on an *option* inside one function. Can anyone help?