0

I face a problem on how to store a list or a number into an empty array, below is my code :

    For( i = 1, i <= N Items( S ), i++,
    dt:Family Device << set name( "family device" );
    dt << Select Where(Starts With( dt:family device, S[i] ) ) ;
    baseDT = dt << Subset( output table name( "Subset" ), selected rows( 1 ), selected columns( 0 ), "invisible");  

I plan to store baseDT in the empty array, Anyone has an idea on the store function? I very new to JSL if in python we will use append function to store, then how about jsl?

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
Shi Jie Tio
  • 2,479
  • 5
  • 24
  • 41

1 Answers1

0

Initialize an empty array as

emp_array = {};

Append to array as :

Insert Into(emp_array, baseDT)

Then you can access the elements using index eg:

emp_array[n]
Syamanthaka
  • 1,227
  • 2
  • 15
  • 23