This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Programming / Scoping /

With

FilledSmallSquare With[x = , y = , ... , expr] specifies that in expr occurrences of the symbols x, y, ... should be replaced by , , ... .

FilledSmallSquare With allows you to define local constants.

FilledSmallSquare With replaces symbols in expr only when they do not occur as local variables inside scoping constructs.

FilledSmallSquare You can use With[vars, body /; cond] as the right-hand side of a transformation rule with a condition attached.

FilledSmallSquare With has attribute HoldAll.

FilledSmallSquare With is a scoping construct (see Section A.3.8).

FilledSmallSquare With constructs can be nested in any way.

FilledSmallSquare With implements read-only lexical variables.

FilledSmallSquare See Section 2.7.2.

FilledSmallSquare See also: Module, Block, ReplaceAll.

FilledSmallSquare New in Version 2.

Further Examples