NRCASES returns the number of cases (of a parameter) in an object, Telitab$ or solution
NRCASES("ParAddress$")
Arguments
1 Number of cases
Determining the number of instances of a parameter or object:
NRCASES("") returns the number of cases in the current solution
NRCASES("B") returns the number of cases of parameter B in the current solution. B can be a VALUE, STRING or OBJECT
NRCASES("*B") returns the number of matrix cases of parameter B in the current solution. B can only be a VALUE
NRCASES("PROP.") returns the number of cases in object PROP
If any string parameter is followed by "." or by ".Par" its value is assumed to contain a Telitab set for which the same applies as for objects:
NRCASES("Telitab$.") returns the number of cases in Telitab set being the current case value of Telitab$.
NRCASES("PROP.D") returns the number of cases of parameter D in object PROP
NRCASES("Telitab$.Par") returns the number of cases of parameter Par in Telitab set being the current case value of Telitab$.
NRCASES("PROP.*D)") returns the number of matrix cases of parameter D in object PROP
NRCASES("Telitab$.*Par)") returns the number of matrix cases of parameter Par in Telitab set being the current case value of Telitab$.
Remarks
With matrix cases we mean the number of different cases in the table. For instance, if you have a 3D space description, for each x value you have a table of y,z values. If you put this in a data set, you get columns of x, y and z values like this:
If you ask for the number of matrix cases of x, you get 3 (and not 9), because there are 3 x-coordinates
2 Finding instance or case number of value
Next to determining the number of instances of a parameter or object, it is possible to determine the case/instance number of a parameter with a particular value:
NRCASES("ID$=MainDiesel.2") returns the case number of ID$ with value "MainDiesel.2" in the current solution. Please note, this is case sensitive
NRCASES("Components.ID$=MainDiesel.2") returns the first case number of ID$ in object/Telitab$ Components with value "MainDiesel.2"
NRCASES("Components.ID$=@MAINDIESEL.2") returns the first case number of ID$ in object/Telitab$ Components with value "MainDiesel.2", prefix "@" stands for equal
NRCASES("Components.ID$=&DIESEL") returns the first case number of ID$ in object/Telitab$ Components contains the word "DIESEL", prefix "&" stands for contains
NRCASES("Components.Q=40.8") returns the first case number of which the value of Q in object/Telitab$ Components equals 40.8, the rounded values (as presented in the workbase) are compared, no prefix possible
Quick links: NRCASES