05-02-2013 08:53 AM
hi,
In sub seq, i have created the contianer (under parameter) and the continer has array of numbers and array of strings.....
My question is
Similar to parameter can i call these container in main seq and can pass the values through these arrays?
How to find no of elements of array of string or number which is delcared under contianer?
Pls let me know
thanks,
chethan
05-02-2013 09:41 AM
When you create a variable or container in the parameter group of a sequence you will have to provide this variable from you calling sequence. So if you call the sequence from your mainsequence you'll have to set a variable as parameter.
You can use the expression "GetNumElements(array)" to get the number of elements in the given array.
05-02-2013 10:00 AM
Thanks for your reply..
I didn't understand......
Currently I have declared as follows
SubSeq1
parameter -->. my contianer -->. Arr1[] (integer type),Arr2[] (string type)
In Main Seq
I have created as follows
locals -->. my contianer -- > Arr1[](integer type), Arr2[](string type)
Is this correct way of declaring?
To extract no of elements i used
getnumofelements(parameter.mycontianer.arr1) .....is this correct way of decalring to get no of elements fform arr1 or arr2
05-02-2013 11:20 AM
Yes that's the correct way, but I would advice you to create a custom type of your container. If you decide to expand the container you only have to do this once.
Your statement to retrieve the number of elements is correct
05-02-2013 11:42 AM
Pls let me know how to create custom type for my requriement
05-03-2013 01:32 AM
See attached example.
Press ctrl+T to bring up the types window (or select Types from the View menu)
05-03-2013 02:14 AM
I made a small mistake in the previous example, the subsequence calls itself instead of calling it from the mainsequence, please use the attached example.
05-08-2013 01:51 PM
I am not able to open this file since I am using Teststand 4.2.3 version (2010 ver)
05-09-2013 04:40 AM
Try this one, I saved it for TestStand 4.2.x