GET TUTORING NEAR ME!

By providing your phone number, you consent to receive text messages from Club Z! for purposes related to our services. Message frequency may vary. Message and Data Rates may apply. Reply HELP for help or STOP to unsubscribe. See our Privacy Policy and our Terms and Conditions page

    Home / Get Math Help

    Module

    Usage

    Module[{x, y, ...}, expr] specifies that occurrences of the symbols x, y, ... in expr should be treated as local. Module[{x=x0, ...}, expr] defines initial values for x, ....

    Basic example

    In[1]:=f[x0_]:= Module[{x=x0}, While[x>0, x=Log[x]]; x ] In[2]:=f[2.] Out[2]=-0.366513

    Attributes

    HoldAll | Protected

    Relationships with other entities

    With | Block | DynamicModule | Unique | GeneratedParameters

    Typical ranks of usage in programs

    74th most common (1 in 1330 symbols)

    44th most common (1 in 451 symbols)

    100th most common (1 in 1180 symbols)

    History

    introduced in Version 2 (January 1991)

    Timeline