Hi everyone
Does anyone know an efficient way of retrieving data from a lookup table like that :
Table 28, (1,1,"k")
Table (2,5,"k")
Table (3,10,"k")
Table (4,50,"k")
Table (5,100,"k")
Table (6,500,"k")
Table (7,1,"M")
Table (8,5,"M")
Table (9,10,"M")
Table (10,50,"M")
Table (11,100,"M")
Table (12,500,"M")
Table 210,(1,1,"k")
Table (2,5,"k")
Table (3,10,"k")
Table (4,50,"k")
Table (5,100,"k")
Table (6,500,"k")
Table (7,1,"M")
Table (8,5,"M")
Table (9,10,"M")
Table (10,50,"M")
Table (11,100,"M")
Table (12,500,"M")
I want to get the value of the first number, the second and the third symbol but the point is the data is inconsistent so for example if I tried getting the first address I will get 1 and 1 and "k" which means 3 bytes but if I tried getting the 500 one it would be 12,500,"M" which means 4 bytes as 500 is stored in two bytes. So does anyone know an efficient way of doing it?
Thanks in advance
Does anyone know an efficient way of retrieving data from a lookup table like that :
Table 28, (1,1,"k")
Table (2,5,"k")
Table (3,10,"k")
Table (4,50,"k")
Table (5,100,"k")
Table (6,500,"k")
Table (7,1,"M")
Table (8,5,"M")
Table (9,10,"M")
Table (10,50,"M")
Table (11,100,"M")
Table (12,500,"M")
Table 210,(1,1,"k")
Table (2,5,"k")
Table (3,10,"k")
Table (4,50,"k")
Table (5,100,"k")
Table (6,500,"k")
Table (7,1,"M")
Table (8,5,"M")
Table (9,10,"M")
Table (10,50,"M")
Table (11,100,"M")
Table (12,500,"M")
I want to get the value of the first number, the second and the third symbol but the point is the data is inconsistent so for example if I tried getting the first address I will get 1 and 1 and "k" which means 3 bytes but if I tried getting the 500 one it would be 12,500,"M" which means 4 bytes as 500 is stored in two bytes. So does anyone know an efficient way of doing it?
Thanks in advance