MYNARR

Variable that can store and return an array of numeric values that you specify. You can use multiple MyNArr variables in a template by giving them different names.

Syntax

This sets the value for one index of a MyNArr variable.

The "mynarr_name" is not case sensitive, so MYNARR "Name1" is the same as MYNARR "name1". You can substitute an SVar or a MySVar for "mynarr_name".

Index_number can be any integer from -2,147,483,648 to 2,147,483,647, including the number 0. If you specify a fractional value (such as 0.7 or -13.6) for the index_number, it will be rounded to the nearest whole number (such as 1 or -14). If you specify a MYNVAR for the index_number, that variable should be surrounded by parentheses.

This returns the numeric value of the specified index of a MyNArr variable.

Return value

This command returns the numeric value of the specified MyNArr index.

If the specified MyNArr index has not been set, this command returns the number 0.

Notes

You can set up to 4,294,967,296 indexes for one MyNArr. Also, there is no limit to the number of MyNArrs that can be used within a template.

To clear a MyNArr index, set it to the number 0. To clear all values in a MyNArr, use the ARRAY_OPT command. To clear all variables, including MyNArrs, use the INITVARS command.

All variables, including MyNArrs, keep their assigned value until they are cleared or until you exit the GainSeeker module that was running the template. This allows a variable to be set by one template and then used by a subsequent template.

When you save a stored session, all variables – including MyNArrs – are saved with the stored sessions. When you open this stored session, the values of these saved variables are retrieved.

See also: MYSARR, MYNVAR, MYSVAR, NVAR, SVAR

Examples

FREAD 1 :
MYNARR "DATA1", 1 = COL_N 4 :
MYNARR "DATA1", 2 = COL_N 6 :
MYNARR "DATA1", 3 = COL_N 10

This formula reads a line from a text file and uses three indexes of the "Data1" variable to hold numbers from separate columns.

MYNARR "DATA1", 2

This formula returns the value of the index number 2 from the MyNArr named "Data1".

MYSARR "DATA1", NVAR 99 = [K1].

This formula uses NV at 99 to determine which index of the "Data1" variable will be used to hold the current value of cell [K1].

MYNARR "DATA1", (MYNVAR "Counter") = [K1]

This formula uses MyNVar "Counter" to determine which index of the "Data1" variable will be used to hold the current value of cell [K1].