Use the Author > Variable Domain command or press Ctrl+Alt+D to examine or change the domain declaration of a particular variable or the default domain used for undeclared variables.  This command can turn the name of a user-defined function back into a variable name.  However, it cannot turn the name of one of the Built-in Functions and ConstantsBuilt_in_Functions_and_Constants into a variable name.  For more information see the Significance of Domain DeclarationsSignificance_of_Domain_Declarations.


In the Variable Name field of the commands dialog box, enter a variable name or type default to change the default domain used for undeclared variables.  Declared variable names can be multi-character and of mixed case, no matter what the current Input Settings are (see the Options > Mode Settings > Input command1MJ.MVB).  


After you enter a name, the Domain field of the dialog box displays the current domain declaration of the variable and allows you to change the declaration by clicking on one of the following buttons:

       Click on the Integer button to declare the variable to be an integer.

       Click on the Real button to declare the variable to be a real number.

       Click on the Complex button to declare the variable to be a complex number.

       Click on the Vector button to declare the variable to be a vector (which includes being a matrix).

       Click on the Set button to declare the variable to be a set.

       Click on the Logical button to declare the variable to have a logical truth-value.


If you declare the variable to be an Integer or Real number, the Interval field of the dialog box display the current interval declaration of the variable and allows you to change the declaration by clicking on one of the following buttons:

       Click on the All button to declare the variable to be a number between - and +.

       Click on the Positive button to declare the variable to be a number greater than 0.

       Click on the Negative button to declare the variable to be a number less than 0.

       Click on the Nonnegative button to declare the variable to be a number greater than or equal to 0.

       Click on the Nonpositive button to declare the variable to be a number less than or equal to 0.

       Click on the Open interval button to declare the variable to be a number in the open interval whose endpoints are given in the Bounds field.

       Click on the Closed interval button to declare the variable to be a number in the closed interval whose endpoints are given in the Bounds field.

       Click on the Open-closed interval button to declare the variable to be a number in the open-closed interval whose endpoints are given in the Bounds field.

       Click on the Closed-open interval button to declare the variable to be a number in the closed-open interval whose endpoints are given in the Bounds field.


If you declare the variable to be in a specified interval, the Bounds field of the dialog box displays the current upper and lower bounds declaration of the variable, if any, and allows you to change the declaration by entering new numerical bounds.


When a domain declaration is made to a variable and no interval is specified or the All interval is selected, the Author > Variable Domain command generates an expression of the form

variable :ε domain

where variable is the variable name anddomain is Integer, Real, Complex, Vector, Set, or Logical.  If the Integer or Real domain is selected and an interval other than All is selected, the command generates an expression of the form

variable :ε domain interval

where interval is an interval expressed in standard notation.  Parentheses ( ) denote open intervals, square brackets [ ] denote closed intervals, and a combination denotes half-open intervals.


Domain declarations can also be made on the expression entry line by entering expressions of the above form using upper and lower case exactly as shown.  The epsilon character can be entered by clicking on the :ε character on the math symbol toolbar.  For example, entering

p :ε Real [0, inf)

declares p to be a nonnegative real-valued variable.  Domain declarations simplify to themselves.


Other Author commandsAuthor_commands 

Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation