| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 66230 | 2006-02-15 20:20:00 | Numbers into Words | Parry (5696) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 430663 | 2006-02-15 20:20:00 | Hi, Im creating a program that turns numbers into words (eg 100 into One Hundred) and I want to make it flexable so I want to include weights and measurements. If I'm using text for $1,000,000,123.43 I would have "One Billion, One Hundred and Twenty-Three Dollars and Forty-Three Cents" but Im unclear how you would describe this for say bytes or other measurements. The page www.unc.edu gives descriptions for SI prefixes. So if I had 1,000,000,123 bytes would I say "One Gigabyte, One Hundred and Twenty-Three Bytes"? Doesnt seem right to me but perhaps it is. Any English teachers out there :-) regards, Graham |
Parry (5696) | ||
| 430664 | 2006-02-15 21:01:00 | Sounds alright to me. Prob just sounds odd because we're less used to numbers with gaps like one million and two. We're prob more used to hearing figures like one million one hundred and twenty-two thousand nine hundred and sixteen. like i deal in mills and part of myself, y'know paid 2.25 for that bit, boat sucked up .8 last year, chopper over 1.5, that sort of thing :D |
mark c (247) | ||
| 430665 | 2006-02-15 21:28:00 | The other problem is that bytes/kilobytes/megabytes/gigabytes aren't in base 10, so 1 gigabyte isn't actually 1000 megabytes, which kinda throws things off a bit. | somebody (208) | ||
| 430666 | 2006-02-15 21:43:00 | You would use one only. Is your program going to put in those anoying ands 114 one hundred and forteen or one hundred forteen 100 and 10 and 4 |
Rob99 (151) | ||
| 430667 | 2006-02-15 22:58:00 | The other problem is that bytes/kilobytes/megabytes/gigabytes aren't in base 10, so 1 gigabyte isn't actually 1000 megabytes, which kinda throws things off a bit. Yes your right so perhaps it's not such a good idea to attempt this due to the wide variance of different measurement types. I just wanted something reasonably generic so you could enter a word and it would prefix this with giga etc if you selected a particular option. So that way you could use it for both gigawatt and gigabyte etc. You would use one only. Is your program going to put in those anoying ands 114 one hundred and forteen or one hundred forteen 100 and 10 and 4 Yes because I have been taught to do it that way but it could be optional to omit the linking "and" |
Parry (5696) | ||
| 430668 | 2006-02-15 23:08:00 | Other than time, and byte measurements, I think everything else is probably in base10 which means that your generic script would work for those purposes. Though how do you deal with centimetres in the mm/m/km scale? |
somebody (208) | ||
| 430669 | 2006-02-16 00:22:00 | Treat centimetres with the contempt they deserve . They are not part of the metric system, and their use causes errors . Dimensions are millimetres, meters, kilometres . Treat so-called "base two" quantities with the contempt and derision they deserve . They are irretrieveably corrupted by their misuse by the ignorant . For 1,000,000,123 say "one thousand million one hundred and twenty three" . For 1,000,000,000,001 say "one thousand thousand million and one" . That way there's no confusion . Or for something which everyone can understand, what about: "one", "two", "many", "lots"? That would add clarity to many arguments here, for a start . |
Graham L (2) | ||
| 430670 | 2006-02-16 02:35:00 | Treat centimetres with the contempt they deserve. They are not part of the metric system, and their use causes errors. Dimensions are millimetres, meters, kilometres. Utterly and totally and enthusiastically agree. Drives me nuts when peeps use centimeters and when they say things like, "two hundred and five millimeters, which is over 20 centimeters" I have to stop myself biffing the remote at the tv. |
mark c (247) | ||
| 430671 | 2006-02-16 10:49:00 | Just for curiosity, I copied and pasted your $1,000,000,123.43 figure into a trial program called 'Read Please' which is a text to speech program. It was read back to me in an American lady's voice as, "One billion one hundred twenty three dollars and forty three cents". Also, as a matter of interest, they have added a bit of humour into the trial program too. You can change the read-back voice to any one of two males or females. If you click on the very small picture of one of the ladies, instead of on the selection space beneath her picture, she says, "Ouch, that hurt. Please don't click on my face. You have clicked on it 'xxx' times already and I don't like it. I have talked it over with the others here and they don't like it either, so please stop doing it. I will not ask you again." If you do click on it again she gives a different sarcastic message. Quite funny I thought. :) |
xxll (5902) | ||
| 430672 | 2006-02-16 20:01:00 | Hi Parry As others have mentioned 1b bytes <> 1 gigabyte so why not refer to 1b bytes as 1 billion bytes? I would be careful about accepting decimals when using bytes - any fraction that is not in a multiple of 1/8th isn't a binary digit (e . g . it's not possible to have 1/16th of a byte or half a binary digit) . BTW are you looking for testers? If so, I'm happy to help out . I wouldn't get too hung up on the use of terms like centimetres - they are a commonly used convention . I suspect GL would happily accept a measure of a hectare but would frown upon a hectometre . More measures here : . wikipedia . org/wiki/Deci" target="_blank">en . wikipedia . org Andrew |
andrew93 (249) | ||
| 1 2 | |||||