Hello everyone, I want to define a function whose arguments or options can only be selected in a range. For example:
Options[TestFunction]={problemID->1};
TestFunction[x_, opts:OptionsPattern[]]:=Module[{},...];
Here, the problemID must one value of {1, 2, 3, 4}, and the default value is 1.
My question is how to define such argument or options. For example, that is the argument like the second argument of build-in function Import[], whose second argument can only be selected in {Element, Data, List, CSV, .... and so on}.
Thank you very much!