| ??? 05/07/03 06:10 Read: times |
#44962 - RE: multivariables comparison - Sampah Responding to: ???'s previous message |
The way it was proceeding, I knew that much more is yet to come!
Anyway I can think of one method as below. -Initialize 32 Flags ( FLG_01 to FLG_32 to zero. -Have 32 comparisons like the one I had given earlier to cover all cases. At the end of First comparison Set FLG_01 if Var_02 is greater than Var_01 else leave it cleared. -Carry out the above for all 32 cases. -At the end of it all, you will have a 4 Byte value that is made up of all the flags. -Use a look up table and transfer the required result to your SAME variable. I am sure once this first level algorithm is put in place, you yourself can come up with ideas to optimize the code further. Raghu |



