Parameterized task

Hi Dave,

Let me explain it more.

say this is how my file looks in category 1

1a 2a
1b 2b
1c 2c
1d 2d
1e 2e

My task reads this will look like this

task read_file (input string filename, no_of_args output integer dyn_array);

This task gets the no. of columns as input, i.e no_of_args = 2.

So, my dynamic array will look like :
integer dyn_array[0] =

1a
1b
1c
1d
1e

integer dyn_array[1] =

2a
2b
2c
2d
2e

Similarly, if the no of arguments = 5, then there should be arrays from
dyn_array[0] to dyn_array[4].

To read the file, I can do this

$fscanf(handle, “%h”, data);

But, Dynamic array is always one dimensional, so, I’m not sure how do I specify the
no. of arguments,

and so, I cannot do

integer dyn_array;

dyn_array= new[no_of_args];

In this case, it will be treated as an 4 entries of integer type which I do not want.
Instead, I want N (no_of_args) arrays having no_of_column entries holding integers.

In the above example, I want 2 arrays having 5 columns of integers.

I do not know how do I handle this.

Thanks,
Babu