Difference between revisions of "NumericArrayRef"
Jump to navigation
Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by 194.84.116.138) |
m |
||
Line 1: | Line 1: | ||
Used in function input declaration statements to define an input as Passed by Reference Numerical Array with a specified number of dimensions. | Used in function input declaration statements to define an input as Passed by Reference Numerical Array with a specified number of dimensions. | ||
+ | |||
Declaring an input as Passed by Reference enables the function to modify the values of variables passed as the input. | Declaring an input as Passed by Reference enables the function to modify the values of variables passed as the input. | ||
− | + | == Usage == | |
− | <syntaxhighlight>Input:InputName[M1,M2,M3,etc.](NumericArrayRef)</syntaxhighlight> | + | <syntaxhighlight>Input: InputName[M1,M2,M3,etc.](NumericArrayRef)</syntaxhighlight> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | An input will only accept an array with the specified number of dimensions. | + | == Parameters == |
+ | :'''InputName''' - an expression specifying the input name. The name can consist of letters, underscore characters, numbers, and periods. The name ''cannot'' begin with a number or a period and is not case-sensitive. | ||
+ | :'''M''' - an input variable that represents the maximum index value for each dimension of the array passed to the function; a single input variable specifies a one-dimensional array input, two input variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-dimensional (M1 by M2 by M3) array input, etc. | ||
+ | ::An input will only accept an array with the specified number of dimensions. | ||
− | + | == Example == | |
− | Declare | + | Declare Count as a Passed by Reference one-dimensional Numerical Array function input: |
− | <syntaxhighlight>Input:Count[X](NumericArrayRef);</syntaxhighlight> | + | <syntaxhighlight>Input: Count[X](NumericArrayRef);</syntaxhighlight> |
The maximum index value for the array passed to the function will be assigned to input variable X. | The maximum index value for the array passed to the function will be assigned to input variable X. | ||
+ | Declare Table as a Passed by Reference three-dimensional Numerical Array function input: | ||
− | + | <syntaxhighlight>Input: Table[X,Y,Z](NumericArrayRef);</syntaxhighlight> | |
− | |||
− | <syntaxhighlight>Input:Table[X,Y,Z](NumericArrayRef);</syntaxhighlight> | ||
The maximum index value for each dimension of the array passed to the function will be assigned to input variables X, Y, and Z. | The maximum index value for each dimension of the array passed to the function will be assigned to input variables X, Y, and Z. | ||
− | |||
− | |||
[[Category:Declaration]] | [[Category:Declaration]] |
Latest revision as of 05:54, 8 April 2013
Used in function input declaration statements to define an input as Passed by Reference Numerical Array with a specified number of dimensions.
Declaring an input as Passed by Reference enables the function to modify the values of variables passed as the input.
Usage
Input: InputName[M1,M2,M3,etc.](NumericArrayRef)
Parameters
- InputName - an expression specifying the input name. The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not case-sensitive.
- M - an input variable that represents the maximum index value for each dimension of the array passed to the function; a single input variable specifies a one-dimensional array input, two input variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-dimensional (M1 by M2 by M3) array input, etc.
- An input will only accept an array with the specified number of dimensions.
Example
Declare Count as a Passed by Reference one-dimensional Numerical Array function input:
Input: Count[X](NumericArrayRef);
The maximum index value for the array passed to the function will be assigned to input variable X.
Declare Table as a Passed by Reference three-dimensional Numerical Array function input:
Input: Table[X,Y,Z](NumericArrayRef);
The maximum index value for each dimension of the array passed to the function will be assigned to input variables X, Y, and Z.