Temperature conversion problem. Please help!
|
08-10-2017, 05:29 AM
Post: #1
|
|||
|
|||
Temperature conversion problem. Please help!
Can one of you please help me figure out how to modify some code so I can do a temperature conversion?
I started this project by adding units to epp's excellent CNV program. I am using this as an educational exercise for myself. http://www.hpmuseum.org/forum/thread-5018.html Everything is working except the temperature conversion. The problem is that if the first unit selected is Fahrenheit or Celsius, line 38 fails because those units contain a degree symbol ' ° ' ... So, at line 38, I have: x = 25 uFr = 1_°F (or 1_°C) x := x * uFr; (25 * 1_°F) which gives Error: Invalid input If I leave out the degree symbol, I am getting "Error: Inconsistent Units" which I believe is because the calculator uses the degree symbol for Fahrenheit or Celsius units internally. I have added the modified code below which only has the temperature conversion for review convenience. Thanks for the help! I am really trying to learn some basic Prime programming. Code: #pragma mode(separator(.,;) integer(h32)) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Temperature conversion problem. Please help! - Skyblues - 08-10-2017 05:29 AM
RE: Temperature conversion problem. Please help! - StephenG1CMZ - 08-10-2017, 07:27 AM
RE: Temperature conversion problem. Please help! - Didier Lachieze - 08-10-2017, 07:35 AM
RE: Temperature conversion problem. Please help! - Skyblues - 08-12-2017, 01:10 AM
|
User(s) browsing this thread: 1 Guest(s)