Re: arguments/realtime3d
- To: mathgroup at smc.vnet.net
- Subject: [mg32283] Re: [mg32246] arguments/realtime3d
- From: BobHanlon at aol.com
- Date: Wed, 9 Jan 2002 23:38:12 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 1/9/02 4:13:08 AM, 6.6e-34 at gmx.de writes: >Is there a way to obtain the number of arguments with wich >the function was called as in >f[x___?OptionQ]:=Module ...? >I would like to check if x contains only valid options of f (defined with >Options[f,a->1]) > Use the standard add-on package Utilities`FilterOptions` To count the options, before or after filtering, use Length[{}] Clear[f] ; f[x_, opt___?OptionQ] := Length[{opt}]; f[x] 0 f[x, a->b, c->d] 2 Bob Hanlon Chantilly, VA USA