But, if I type:
Options[func3] I get ‘{}’ as the response rather than (as I expected) ‘{$opt1->False}’
If I type:
Options[Plot] or any other system function
I get the options for the system function.
The docs for Options don’t mention any restrictions the function specified. But, I can’t get it to work for any of my (user) functions.
I’ve never used OptionsPattern that way. I always declare the options list for my function and then use OptionsPattern with no arguments (I also never see option symbols that have a $ in the name, that’s usually used to mark a constant or a setting you can reset):
Thanks much, your suggestion worked as advertised. Being a newbie to Mathematica, I suspect I will do a lot of things that you (and others) haven’t seen before.
Looking at the documentation to remind me, the OptionsPattern you used is for supplying an on-the-fly list of defaults, which I’ve seen used to implement “hidden options” (a.k.a. undocumented options), i.e. options that don’t show up when you evaluate Options[f].