Re: Multi Dimensional Arrays (MDA)

@Herman

thanks for answering ... but finding anything here at this forum is a bit tricky
... or it take "some" time ..


@all,

take a look at the following thread:

"some looping help needed ......." or try this :



from a post by tomasz
As to your question:
> so tell us how we access via tablename one element of our table ...

This is very easy ...
Desired access to tablename[x][y] can be implemented as follows
using VarSet / VarGet (note that this is only ONE OF MANY possible ways)

function Set2DimTable( tablename, x, y, value )
{
VarSet( tablename + StrFormat("%05.0f%05.0f", x, y ), value );
}

function Get2DimTable( tablename, x, y )
{
return VarGet( tablename + StrFormat("%05.0f%05.0f", x, y ) );
}


Example use:

Set2DimTable( "blabla", 2, 3, High[ 0 ] );

This actually shows how VarSet/VarGet can be used to implement
"equivalent of doubly dimensioned arrays i.e. tables in pure AFL".




Reply via email to