Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation  / Mathematica  / Tour  /

Mathematica as a Programming Language

Mathematica is an unprecedentedly flexible and intuitive programming language.

Mathematica includes advanced programming methods from modern computer science--as well as adding a host of new ideas of its own.

Mathematica incorporates a range of programming paradigms--so you can write every program in its most natural way.

Procedural programming

List-based programming

Many operations are automatically threaded over lists.

This flattens out sublists.

This partitions into sublists of length 2.

Functional programming

The is a "pure function". The argument is inserted into the # slot.

Rule-based programming

The _ stands for a single expression; __ stands for any sequence of expressions.

Object-oriented programming

Here are three definitions to be associated with the object h.

This uses the definitions made for h.

String-based programming

Mixed programming paradigms

Many of Mathematica's most powerful functions mix different programming paradigms.

A dozen definitions of the factorial function.

Mathematica gives you the flexibility to write programs in many different styles.

After you have finished with definitions for f, you must clear them.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: