This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Programming / Assignments  /
DivideBy

  • x /= c divides x by c and returns the new value of x.
  • DivideBy has the attribute HoldFirst.
  • x /= c is equivalent to x = x / c.
  • See the Mathematica book: Section 2.4.4.
  • See also: TimesBy, SubtractFrom, Set.

    Further Examples

    This gives x a value, divides by 4, and shows that x has been changed.

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    In[3]:=

    Out[3]=

    In[4]:=