I've been trying to figure it out, to no avail. In reading someone else's code, I come across a function definition, where it says something like this
UserDefinedFunction[a_Integer, b_Integer, c_Integer, d_, k_:Automatic]/;Abs[a]>b:=0;
I understand that it means the function should return 0 if Abs[a] > b, but what does the tag Automatic
in k_:Automatic
mean? What is it broader usage? How does it relate to when I plot something and tell Mathematica to assign PlotRange -> Automatic
?
k_
. e.g. if you call UserDefinedFunction[1,2,3,4], thenk
will be considered asAutomatic
. As for whatAutomatic
really means depends on the definition of the function, it could be used likePlot[...,PlotRange->k]
which means that by default the resulting plot will have automatic plot range, or you might use it just as a symbol, e.g.k+1
, which returnsAutomatic+1
if nothing is assigned tok
. $\endgroup$