??? 06/06/07 15:46 Modified: 06/06/07 15:47 Read: times Msg Score: 0 -1 Answer is Wrong +1 Underrated |
#140321 - Piece of cake Responding to: ???'s previous message |
Salaam Ragunathan,
Converting single digits from string (ASCII) into decimal is as simple as subtracting decimal 48 (0x30) from each digit. Converting four digits into the single value of the 4-digit number is then just a matter of adding D1 + D2*10 + D3*100 + D4*1000. Thus, in pseudocode, for i = 0 - 3 { D_i = string_number_i - 48 value = D_i*10^i } Good luck, Joe |