Tag: optional-arguments

67 How to avoid collision between optional arguments and options 2012-02-10T06:23:54.750

44 Can I make a default for an optional argument the value of another argument? 2012-12-04T20:36:20.120

33 How to Combine Pattern Constraints and Default Values for Function Arguments? 2012-05-01T02:06:15.383

32 Is there any way to define pure functions with optional arguments? 2013-07-26T07:44:31.670

26 Version inconsistency with optional arguments: what if the default value doesn't match the pattern? 2016-02-29T10:58:25.647

20 How do I override options with my own defaults? 2014-11-12T19:25:27.890

20 Skipping "middle" Optional Arguments 2015-09-24T20:29:21.800

19 Confused by the opts : OptionsPattern[ ] pattern 2015-06-06T22:26:31.490

18 Unexpected pattern matching behaviour: PatternSequence vs. Optional 2015-01-22T15:14:00.340

17 How to make a function with its own options as well as passing options to other functions 2014-02-27T23:26:38.277

15 How to test if optional argument has been given? 2012-03-16T18:07:35.703

14 Which methods are available for NMinimize? 2013-11-06T11:22:41.737

14 Pattern matching with List and Optional 2016-08-25T16:07:07.753

13 Is it possible to use Compile on a function with optional arguments? 2013-02-15T21:29:32.170

12 Specifying optional arguments with variables 2013-07-22T20:40:28.063

12 Is it possible to separately call the default value of a variable which isn't at the end of the sequence? 2013-07-26T08:39:00.753

12 Optional throws error when called from a package. Workaround? 2015-12-30T17:43:51.293

12 Optional argument that can be completely omitted? 2016-09-09T11:10:38.797

11 How to speed up the plotting of B-spline curve? 2015-01-15T12:38:29.317

10 Define function that behaves almost identically to Mathematica function 2019-02-20T14:28:55.893

9 How to add Optional Sequence 2016-01-19T00:28:08.007

9 Why is this syntax for patterns with Optional values not supported? 2016-08-07T14:13:12.867

9 define a function with optional arguments 2017-02-26T00:21:09.500

9 Except @ OptionsPattern[] affects OptionValue 2017-08-03T11:53:42.710

9 Why Optional in Set is not held by the HoldFirst attribute? 2020-02-29T13:45:16.417

8 Is it possible to use PatternTest and Optional value on one Pattern simultaneously? 2013-01-13T14:08:57.333

8 Optional arguments with lists as function parameter 2015-04-17T06:52:24.840

8 Option inheritance: setting new defaults and private context 2015-11-06T13:47:50.483

8 Functions with both optional arguments and options 2016-08-18T09:22:12.343

8 How to write a `HeldOptional` variant of `Optional` that does not evaluate its second argument? 2016-08-18T16:32:37.880

8 Are Mathematica commands always supposed to check that Method -> name is valid? 2018-03-16T02:22:22.883

7 Change some option of a function when calling it 2013-05-28T14:28:24.580

7 A question about two ways to use Default 2014-04-10T05:46:13.890

7 How to find the options available for a function? 2014-11-05T09:54:13.840

6 Evaluating function only when its optional argument is numeric 2013-08-07T09:30:04.173

6 How to make a customized plot function that can plot functions with optional parameter? 2016-08-10T09:17:06.720

6 Examples of the single dot form of Optional? 2016-08-31T03:28:27.493

6 OptionsPattern[] Vs. opt___ 2018-06-04T01:19:45.193

5 Add options to upvalues 2014-02-14T11:07:57.023

5 SyntaxInformation and Options 2015-12-16T10:14:23.843

5 An unexpected match when using Condition, Optional and passing a Sequence 2016-02-18T15:18:27.843

5 Optional in MatchQ 2017-05-30T10:52:28.620

5 What is the difference between the second argument of ToString and its option FormatType? 2017-07-27T20:15:29.453

5 Why is { } interpreted as an option in my function? 2019-02-01T14:13:48.613

4 How to use Optional as an omissible parameter in pattern-match? 2012-12-10T06:03:56.660

4 How can I define a function taking two distinguishable sets of options? 2013-07-21T01:55:12.630

4 How to define an option or an argument whose values are confined 2017-07-10T13:12:58.147

4 How to prevent an Optional parameter from taking an OptionsPattern parameter without multiple function definitions? 2017-12-08T19:13:18.703

4 Type safety and scoping in OptionsPattern arguments 2020-12-18T20:13:39.257

3 How to specify optional arguments that take functional values 2013-06-04T04:32:07.603

3 Plot graphs with direction and numbered in Mathematica 2014-08-12T12:19:03.960

3 Function of arguments given in non-fixed order 2014-10-11T22:01:03.123

3 Is there a shorthand for Optional with Condition? 2015-04-09T09:56:12.387

3 How to speed up accidental large output? 2016-08-07T20:45:17.780

3 How to define a function with an optional value related to the arguments? 2016-09-10T00:04:20.650

3 Using other functions' replacement rules 2017-12-02T22:17:25.207

3 Setting nested optional argument with a default when unpacking from a given Head 2020-03-23T09:42:04.023

2 How can this function's options be used in different places? 2013-01-05T22:53:52.590

2 How to combine multiple functions into a single function, indexed bya new argument 2014-03-07T22:09:20.153

2 How do I make my function behave more like Plot? 2014-08-01T12:38:47.317

2 Plot does not take range with OptionValue and PlotRange option 2015-07-04T13:43:58.307

2 Documentation on the attribute OneIdentity 2015-07-20T11:54:57.157

2 Determining Automatic Parameters used by Mathematica 2015-09-28T17:53:44.377

2 Make a function with Optional arguments Listable 2016-03-18T15:57:25.617

2 Evaluation of FilterRules inside a Module 2016-04-13T11:20:30.750

2 Is this the correct method for using optional arguments? 2016-08-24T17:22:01.507

2 How to create a function with option that shows dropdownlist like ( for example ) Manipulate with ControlPlacement? 2016-08-29T10:58:42.680

2 Anonymous Function And Optional Arguments 2016-11-01T01:46:15.523

2 Scoping of OptionValue for inner functions in closures 2018-01-04T09:38:06.303

2 OptionValue and OptionPattern not Changing Values 2018-12-14T23:38:37.417

2 Issue using optional argument before options 2020-02-24T06:08:11.920

2 Help understanding options on ContourPlot3D 2020-11-05T23:10:48.500

2 Simplest way to check if optional parameter is omitted? 2020-12-01T17:04:02.503

1 How to define a Mathematica Function with varying number of input and output arguments 2013-11-28T00:46:40.633

1 How to deal with the condition that a function own many options? 2015-01-11T12:46:58.690

1 User-defined density plotting function with a functional argument: extracting variables from the function and plotting in a circular region 2016-05-02T20:56:14.797

1 How to pass arguments in NIntegrate and NDSolve 2016-06-12T06:09:52.570

1 Automatic is not always the default option 2017-03-01T08:42:20.107

1 What is the best way to pass on options? 2017-07-16T00:21:09.217

1 Why doesn't OptionValue cooperate with Map? 2017-09-08T16:29:25.770

1 Set absolute size of Axis or frame for a plot 2018-02-19T04:28:52.387

1 String arguments break optional argument default values? 2020-03-07T23:26:27.523

1 Default Options not working in user-defined function for SymbolName 2020-06-08T19:29:23.853

1 How to change behavior of Echo or turn it off without removing it from code? 2020-11-11T04:02:55.353

1 How to create custom NIntegrate with special option behavior? 2020-11-11T18:31:30.967

1 How to manually create options that can be entered as a sequence or list? 2020-12-01T17:56:01.307

0 How to make an index optional? 2013-10-04T06:20:16.600

0 Use Map with OptionValue 2014-02-16T23:42:27.673

0 How to use OptionValue inside a pure function 2016-06-15T11:25:09.537

0 Method option of function MatrixRank 2018-11-07T10:35:06.093

0 Optional argument in Set Function 2019-01-23T15:11:49.093

0 Parallelized FactorInteger 2020-07-17T08:16:22.757

0 Keep irrelevant variables outside function arguments 2020-08-06T21:38:18.600

0 passing splice instructions 2020-10-15T16:22:56.263

-1 OptionsPattern Confusion 2017-08-01T22:59:19.177