0 Members and 2 Guests are viewing this topic.
Actually technically a pound is a measure of mass and a pound-force is the measurement of force. Both are just abbreviated lb (or can be; mass is technically lb, lbm, lbm and force is lb, lbf, or lbf).
To convert from lbm to kg all you do is multiply by 0.45359237 kg. Then to turn lbf into N you just multiply by both 0.45359237 kg and 9.80665 m/s2. So one lbf equals about 4.44822 N.
Edit: What you could do is differentiate between the two by making the user type in either lbm or lbf and then have the two separate conversions.
Why don't you just simply NOT make a distinction between mass and weight. Just make all conversions that do happen to go between a mass and a weight use earth gravity 9.81 m/s^2 for the acceleration automatically implied in the conversion.
Because they technically aren't the same thing. Force already has gravity in it while mass doesn't. Unless you are talking about like when it displays you have the mass displayed and then it also shows the acceleration of gravity? I'm not entirely sure what you are asking but ya...I don't know
Well another thing you could do is when it comes to pounds (force or mass) you can test what the output is being put into (either N or kg or whatever) and have it calculate accordingly. I don't know how practical that is though.
Well I don't think there is a real abbreviation for slugs but ya I'm sure "slg" would work. Glad to hear you got the pound issue fixed. What did you end up doing?
looks niceyou're right, though, the speed is painfulalso, i would suggest not clearing the homescreen after a unit conversion, and not having parentheses for prefixes (though i don't know how possible that is)
I like how you also included Google's little "answer to life/universe/everything)
edit: do you think you need parentheses at all? i can't really see why they need to be there for clarity ( i mean, (7 (in))=17.78((c)m))) is kind of sillyand i can't think of why they'd be needed for coding purposes...although i may be wrong about thatedit2 didnt read your whole first post. so, parentheses ARE needed...damn
edit3 lol i'm a little "submit button" happy today...
what if you ran another routine that's kind of like a "find and delete" to kill parentheses? although it might make the program even slower...and also tightening the user's syntax to allow for spaces to be cushions over parentheses might be viable...
Also, it's a pain that variables can't be stored in-program... although the only way for that to be allowed would be with ASM..sigh..guess you can't have everything
Quote from: squidgetx on June 08, 2010, 05:05:48 pmlooks niceyou're right, though, the speed is painfulalso, i would suggest not clearing the homescreen after a unit conversion, and not having parentheses for prefixes (though i don't know how possible that is)I have to clear the homescreen because I use Output( to display the answer, and there's no way to tell what line I'm on except with *sigh* ASM.Guess I could use Disp, but then textwrapping would be a nightmare. Quote from: squidgetx on June 08, 2010, 05:05:48 pmI like how you also included Google's little "answer to life/universe/everything) Had to add that. I found that answer, anyway. Quote from: squidgetx on June 08, 2010, 05:05:48 pmedit: do you think you need parentheses at all? i can't really see why they need to be there for clarity ( i mean, (7 (in))=17.78((c)m))) is kind of sillyand i can't think of why they'd be needed for coding purposes...although i may be wrong about thatedit2 didnt read your whole first post. so, parentheses ARE needed...damnParentheses actually makes life easier for the program. It's kind of hard to explain now, but basically, if there were no parentheses, I would have to add a lot more duplicate coding, making the size approximately double. Though it would make the program a little faster, I guess...Quote from: squidgetx on June 08, 2010, 05:05:48 pmedit3 lol i'm a little "submit button" happy today...I do that all the time. Quote from: squidgetx on June 08, 2010, 05:05:48 pmwhat if you ran another routine that's kind of like a "find and delete" to kill parentheses? although it might make the program even slower...and also tightening the user's syntax to allow for spaces to be cushions over parentheses might be viable... What do you mean by "cushions"?The way spaces are implemented now, they're pretty much ignored. I'm actually taking advantage of the fact that the program adds so many unnecessary parentheses here; because of this, the user can add as many spaces as he wants and they would all be counted as implicit multiplication.Quote from: squidgetx on June 08, 2010, 05:05:48 pmAlso, it's a pain that variables can't be stored in-program... although the only way for that to be allowed would be with ASM..sigh..guess you can't have everything Yeah...but what kind of "variables" would you want to store? If you think it's a good idea to store the answer or the original expression, it'd be pretty easy to add that in at the end.EDIT: Whoa... I just realized I had a habit of making REALLY LONG POSTS.
I was looking through the program, and I thought, hmm... wouldn't it be easier if you knew all the variables calculator can accept? Like, you can implement scrollable menu that shows what unit you want to put in, and what output unit you want, something like itouch menu.I think that will lessen the user making syntax error that the calculator doesn't recognize and lessen the frustration, them going like, 15 In into m instead of 15 in into m.
If you did do something that would make it faster but you'd have repeditive code you could always make either a sub-program that is recalled or put a Lbl at the top of the program with the code.
If 1ThenIf 1ThenWhile 1If getKey=105Goto AIf getKey=21Goto BEndEndEndLbl AEndEndEndDisp "No memory leak!ReturnLbl BDisp "Memory leak!