You're missing my point. What is your thought process when reading the number 375,600,987,463 aloud? Here's what you have to go through:
1. Scan 3-7-5. Okay that's three digits, so it's "three hundred seventy-five."
2. But three hundred seventy-five what? Scan ahead to the end of the number to see how many digits (or, with commas, clusters of digits) there are. Conclude and say "billion."
3. The rest is easy, since you know the next group is millions, so "six hundred million," and so forth.
So, yes, you do need to scan twice: once to get the overall magnitude, then again to read out the number.
Reading from right-to-left, you can build up the overall magnitude as you go along. 'No need for a pre-scan.
Comments
You're missing my point. What is your thought process when reading the number 375,600,987,463 aloud? Here's what you have to go through:
1. Scan 3-7-5. Okay that's three digits, so it's "three hundred seventy-five."
2. But three hundred seventy-five what? Scan ahead to the end of the number to see how many digits (or, with commas, clusters of digits) there are. Conclude and say "billion."
3. The rest is easy, since you know the next group is millions, so "six hundred million," and so forth.
So, yes, you do need to scan twice: once to get the overall magnitude, then again to read out the number.
Reading from right-to-left, you can build up the overall magnitude as you go along. 'No need for a pre-scan.
-Phil
Better presentation, education, design, etc... can all help with that.
For example in C you can write: What is the value of y after doing that?
Well, it depends on the endianness of the machine you run it on.
A contrived example perhaps, but code like that has existed for decades, usually when packing and unpacking messages and so on.
It's not just C, the same issue shows up in Spin.
Then there is that whole thing about byte ordering of data flowing over networks.