Hello everybody, I have a problem and need help. I have declared 6 Unsigned integer variables in my code they store different values and I want to find out which variable contains the maximum value. There can also be an array of 6 integer elements. Quickest response will be appreciated.
No. I am not in a coding class. I know its not that difficult when someone has developed some professional grade applications but still I am running out of RAM in my 89C52, controlling a LAB Equipment by directly interfacing a Touch Screen as a user interface with it. That is why I want to consult experts about SOLID-CODE. By the way, what is this forum for ??? Hope you won't mind. Erik!
well, I would look for sorting routines, that is really what you need. Since you say that the problem is size, a "let the high float up" is probably the least code size hungry. pseudo code loop: if array[index] > array[index+1} interchange entries and loop if index = max-1 done else index = 0 loop anyhow, just look for "sort" the litterature is immense Erik
"By the way, what is this forum for ???" If you don't know that, you shouldn't be posting to it! Before posting to any forum, it is only polite to check that your post is on-topic! Read this: http://www.keil.com/forum/