This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 MATHEMATICA GUIDE Functions »|More About »| Tutorials »
Mathematica Syntax
Mathematica has a rich syntax carefully designed for consistency and efficient, readable entry of Mathematica's many language, mathematical, and other constructs. In addition to ordinary linear ASCII input, Mathematica also supports full 2D mathematical input.
Basic Syntax
f[x,y] function arguments go in square brackets
Exp, Do, ... built-in symbols have names beginning with capital letters
(List ▪ "..." (String ▪ e[[i]] (Part ▪ e[[i;;j]] (Span)
Basic Operations
set a value (=. to clear a value)
test equality, or represent a symbolic equation (!= for unequal)
function etc. definition
, rule for transformations, options, etc. (:> for delayed rule)
replace using a rule ("slash dot")
Mathematics & Operators
+  ▪ -  ▪ *  ▪ /  ▪ ^ (Power ▪ && (And ▪ || (Or ▪ ! (Not ▪ <> (StringJoin)
a b c spaces stand for multiplication
nn*^ee scientific notation
b^^nnnn number in a base
Patterns
any expression ("x blank")
, sequences of arbitrary expressions ("x double blank", ...)
_, __, ___ unnamed patterns
pattern name
pattern default
Pure Functions
a pure function
#, #2, etc. — arguments in a pure function
Short Forms
prefix function application
postfix function application ("slash slash")
/@ (Map — "slash at")  ▪ @@, @@@ (Apply ▪ ~~ (StringExpression ▪ === (SameQ)
Program Syntax
sequence of commands (CompoundExpression)
input a file (>>file, >>>file for outputting to a file)
(* ... *) comment
ccc`nnn symbol in context ccc
Mathematica Session Syntax
% most recent output (%n for output on line n)
information on symbol
TUTORIALS