Quote:
Originally Posted by user_prady
Can You Please give a brief idea what does this statement for
Code:
txdata[txaddr,++txindex[txaddr]]
I guess this is a 2D array but when I print that only it gives me error.
|
Yes, it's a two-dimensional array indexed by the address and an index. The indices themselves are held in a second one-timensional array,
txindex[].
So to cater for your second situation, all you need to do is reset the
txindex[txaddr] counter to 0 each time a new TXADDR is encountered. Similarly you can reset the
rxindex[rxaddr] counter each time an RXADDR is encountered.