Subj : Re: Reversing a number To : comp.programming From : Willem Date : Thu Sep 15 2005 05:25 pm Antoon wrote: ) Op 2005-09-15, Willem schreef : )> I disagree. The problem only states what the end-result should be and )> does NOT specify how it should be done. ) ) The statement of the end result implies that is about numerals, ) strings representations of numbers, and not about numbers itself. So what ? That doesn't mean you're suddenly allowed to interpret the problem as if it species how it should be solved. )> It is simpler in the very real sense that no strings are involved. )> ('strings' as defined by the programming language.) )> The only thing that is involved is digits, and base-10 representation. ) ) base-10 representation says it all, this is about the representations ) in a particular base. It is not about the numbers themselves. So what ? Lemme ask you a question: Suppose I have an algorithm that solves the following problem: Return (as a number) the base-10 digits of the input number, repeated twice. (That is: f(123) = 123123, f(15) = 1515, f(100200) = 100200100200) Would you claim that that algorithm involves strings ? )> The algorithm described (it's not my algorithm by the way) extracts )> base-10 digits from one number and injects it into another, one by one. )> That's all it does. No strings. ) ) Extracting base-10 digits is conceptually working with strings. ) That you keep the digits as a number because that works easier ) changes nothing about that. Digits is what numerals in particular ) notations have. Numbers don't have digits. ) ) Yes your algorithm works with numbers, but when you explain what ) it does you are constantly reffering to numeral concepts and ) not to number concepts, thus betraying that conceptually you ) are working with strings. That I'm using the numeral concept 'digit' does not mean that I necessarily have to also use the numeral concept 'string'. Furthermore, even if I had to use strings to explain *why* the algorithm works, that *still* would not mean that the algorithm *uses* strings. By the way, what part of 'it's not my algorithm' did you not understand ? SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .