Is it a special sign or it can be used as anything else? For creating variables for example.
$x=4
$
is probably the only non-alphanumeric ascii character without a special meaning in Mathematica and thus the only one you could use as a delimiter for various parts within a variable name.
A warning is due: Because it is so unique, it is also used internally for the same purpose, e.g. Module
and Unique
will generate variable names ending in $
+ an arbitrary integer:
Unique[]
Module[{x},x]
In some cases, also Function
will generate variable names ending in $
for its arguments. You can read more about this here. To stay out of potential problems I would not use variables ending in $
or $
+ integer.
Another case where $
seems to be used as some kind of internal convention are symbols which serve as global variables like $FrontEnd
,$Context
, $Path
..., but you can avoid conflicts by using a lowercase letter for the second letter of the variable name.
Other than the mentioned cases, I wouldn't expect problems when using $
within variable names. It should be mentioned that due to the possibility to use non-ascii letters within variable names, people often use such characters for similar purposes, e.g.:
long\[Bullet]name
which will look nicer in the frontend, but won't render nice in the Wolfram Workbench editor.
$
at the end of a name can cause problems: f = Function[{x}, Function[{y}, x + y]]; o2 = f[2 y$]; o1 = f[2 y]; {o1[a], o2[a]}
$\endgroup$
Function
using $
internally, causing confusion to the user: mathematica.stackexchange.com/q/25563/5
$\endgroup$
$MachineEpsilon
, but you can certainly start your variables with a dollar sign. $\endgroup$