Shi Jie Tio
Shi Jie Tio

Reputation: 2529

How to store a list or a number into empty array in jsl?

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?

Upvotes: 1

Views: 4401

Answers (1)

Syamanthaka
Syamanthaka

Reputation: 1337

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]

Upvotes: 1

Related Questions