| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | There`s gotta be an easi |
JB> we need details. JB> is the number always in base-10 representation (or is octal or hex JB> OK)? how about E-notation? I don't think you're looking at the correct details. The question I had involved pulling a value out of a cstring (example: "120"), manipulating it mathematically and then putting a representation back into the cstring (example: "12"). JB> Is it safe to assume that a "double" can hold the number ? The number is always an integer: "0" <= x <= "250". JB> NH> I must divide these numbers by 10. JB> NH> I then must place that value back into the cstring JB> NH> (where I originally got it). JB> assuming the number is always in plain base-10 (no hex or octal, or JB> E-notation) and that any fraction-part can be dropped. JB> all you really need to do is chop off (or blank out) the last digit. JB> :) The way it turned out, what must be done is the multiply the number by 8. That is, if the cstring was "135", what needs to be put back in the cstring is "1080". JB> (if decimal fractions are to be retained your code is broken.) I feel my head may be broken. þ CMPQwk 1.42 999 --- Maximus/2 3.01* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000) SEEN-BY: 633/267 270 @PATH: 106/2000 1 379/1 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.