|
Prev: Error in SOLVEVX
Next: HP-10s?
From: Loucks80 on 7 Dec 2007 10:11 Everyone, Thank you so much for helping me out with this. Here are some inputs and expected output SFPM = 200 IPR = .005 SDIA = .750 EDIA = .375 TRAVEL = 3 RPMLIMIT = 2000 Output in MINUTES = 3.61 I worked on this yesterday and came up with code on my computer that works pretty well. However i would like it the inform box to solve the example like the financial TVM inform box does. Is that possible? I am also having a very difficult time trying to get that program to my calculator from my pc. Any suggestions would be great. Thanks again everyone. %%HP: T(0)A(D)F(.); 0 'MINUTES' STO "LATHE MINUTES" { "SFPM" "IPR" "SDIA" "EDIA" "DCUT" "TRAVEL" "RPMLIMIT" } { 2 0 } { } { } INFORM IF THEN OBJ DROP SFPM IPR SDIA EDIA DCUT TRAVEL RPMLIMIT << WHILE SDIA EDIA REPEAT SDIA .2618 * SFPM SWAP / 'RPM' STO IF RPM RPMLIMIT > THEN RPMLIMIT IPR * 'IPM' STO TRAVEL IPM / 'TIM' STO TIM MINUTES + 'MINUTES' STO DCUT 2 * SDIA SWAP - 'SDIA' STO ELSE RPM IPR * 'IPM' STO TRAVEL IPM / 'TIM' STO TIM MINUTES + 'MINUTES' STO DCUT 2 * SDIA SWAP - 'SDIA' STO END END >> "MINUTES" MINUTES TAG STR MSGBOX ELSE "Operation cancelled" MSGBOX END
From: fbynum2 on 7 Dec 2007 10:32 On Dec 7, 10:11 am, Loucks80 <louck...(a)yahoo.com> wrote: > Everyone, > Thank you so much for helping me out with this. Here are some inputs > and expected output > > SFPM = 200 > IPR = .005 > SDIA = .750 > EDIA = .375 > TRAVEL = 3 > RPMLIMIT = 2000 > > Output in MINUTES = 3.61 > > I worked on this yesterday and came up with code on my computer that > works pretty well. However i would like it the inform box to solve the > example like the financial TVM inform box does. Is that possible? I am > also having a very difficult time trying to get that program to my > calculator from my pc. Any suggestions would be great. Thanks again > everyone. > > %%HP: T(0)A(D)F(.); > > 0 'MINUTES' STO > "LATHE MINUTES" > { > "SFPM" > "IPR" > "SDIA" > "EDIA" > "DCUT" > "TRAVEL" > "RPMLIMIT"} > > { 2 0 } > { } > { } > INFORM > IF > THEN > OBJ DROP SFPM IPR SDIA > EDIA DCUT TRAVEL RPMLIMIT > << > WHILE SDIA EDIA > > REPEAT > SDIA .2618 * SFPM SWAP / > 'RPM' STO > IF > RPM RPMLIMIT > > THEN > RPMLIMIT IPR * > 'IPM' STO > TRAVEL IPM / > 'TIM' STO > TIM MINUTES + > 'MINUTES' STO > DCUT 2 * SDIA SWAP - > 'SDIA' STO > ELSE > RPM IPR * > 'IPM' STO > TRAVEL IPM / > 'TIM' STO > TIM MINUTES + > 'MINUTES' STO > DCUT 2 * SDIA SWAP - > 'SDIA' STO > END > END > > >> > "MINUTES" MINUTES TAG STR MSGBOX > > ELSE "Operation cancelled" > MSGBOX > END What is the input for DCUT ?
From: Loucks80 on 7 Dec 2007 10:52 On Dec 7, 9:32 am, fbyn...(a)nc.rr.com wrote: > On Dec 7, 10:11 am, Loucks80 <louck...(a)yahoo.com> wrote: > > > > > > > Everyone, > > Thank you so much for helping me out with this. Here are some inputs > > and expected output > > > SFPM = 200 > > IPR = .005 > > SDIA = .750 > > EDIA = .375 > > TRAVEL = 3 > > RPMLIMIT = 2000 > > > Output in MINUTES = 3.61 > > > I worked on this yesterday and came up with code on my computer that > > works pretty well. However i would like it the inform box to solve the > > example like the financial TVM inform box does. Is that possible? I am > > also having a very difficult time trying to get that program to my > > calculator from my pc. Any suggestions would be great. Thanks again > > everyone. > > > %%HP: T(0)A(D)F(.); > > > 0 'MINUTES' STO > > "LATHE MINUTES" > > { > > "SFPM" > > "IPR" > > "SDIA" > > "EDIA" > > "DCUT" > > "TRAVEL" > > "RPMLIMIT"} > > > { 2 0 } > > { } > > { } > > INFORM > > IF > > THEN > > OBJ DROP SFPM IPR SDIA > > EDIA DCUT TRAVEL RPMLIMIT > > << > > WHILE SDIA EDIA > > > REPEAT > > SDIA .2618 * SFPM SWAP / > > 'RPM' STO > > IF > > RPM RPMLIMIT > > > THEN > > RPMLIMIT IPR * > > 'IPM' STO > > TRAVEL IPM / > > 'TIM' STO > > TIM MINUTES + > > 'MINUTES' STO > > DCUT 2 * SDIA SWAP - > > 'SDIA' STO > > ELSE > > RPM IPR * > > 'IPM' STO > > TRAVEL IPM / > > 'TIM' STO > > TIM MINUTES + > > 'MINUTES' STO > > DCUT 2 * SDIA SWAP - > > 'SDIA' STO > > END > > END > > > "MINUTES" MINUTES TAG STR MSGBOX > > > ELSE "Operation cancelled" > > MSGBOX > > END > > What is the input for DCUT ?- Hide quoted text - > > - Show quoted text - DCUT = .025
From: fbynum2 on 7 Dec 2007 11:33 On Dec 7, 10:52 am, Loucks80 <louck...(a)yahoo.com> wrote: > On Dec 7, 9:32 am, fbyn...(a)nc.rr.com wrote: > > > > > > > On Dec 7, 10:11 am, Loucks80 <louck...(a)yahoo.com> wrote: > > > > Everyone, > > > Thank you so much for helping me out with this. Here are some inputs > > > and expected output > > > > SFPM = 200 > > > IPR = .005 > > > SDIA = .750 > > > EDIA = .375 > > > TRAVEL = 3 > > > RPMLIMIT = 2000 > > > > Output in MINUTES = 3.61 > > > > I worked on this yesterday and came up with code on my computer that > > > works pretty well. However i would like it the inform box to solve the > > > example like the financial TVM inform box does. Is that possible? I am > > > also having a very difficult time trying to get that program to my > > > calculator from my pc. Any suggestions would be great. Thanks again > > > everyone. > > > > %%HP: T(0)A(D)F(.); > > > > 0 'MINUTES' STO > > > "LATHE MINUTES" > > > { > > > "SFPM" > > > "IPR" > > > "SDIA" > > > "EDIA" > > > "DCUT" > > > "TRAVEL" > > > "RPMLIMIT"} > > > > { 2 0 } > > > { } > > > { } > > > INFORM > > > IF > > > THEN > > > OBJ DROP SFPM IPR SDIA > > > EDIA DCUT TRAVEL RPMLIMIT > > > << > > > WHILE SDIA EDIA > > > > REPEAT > > > SDIA .2618 * SFPM SWAP / > > > 'RPM' STO > > > IF > > > RPM RPMLIMIT > > > > THEN > > > RPMLIMIT IPR * > > > 'IPM' STO > > > TRAVEL IPM / > > > 'TIM' STO > > > TIM MINUTES + > > > 'MINUTES' STO > > > DCUT 2 * SDIA SWAP - > > > 'SDIA' STO > > > ELSE > > > RPM IPR * > > > 'IPM' STO > > > TRAVEL IPM / > > > 'TIM' STO > > > TIM MINUTES + > > > 'MINUTES' STO > > > DCUT 2 * SDIA SWAP - > > > 'SDIA' STO > > > END > > > END > > > > "MINUTES" MINUTES TAG STR MSGBOX > > > > ELSE "Operation cancelled" > > > MSGBOX > > > END > > > What is the input for DCUT ?- Hide quoted text - > > > - Show quoted text - > > DCUT = .025- Hide quoted text - > > - Show quoted text - Thanks, My version checks out okay. Its very simular to your code, except that I used local variables instead of global variables for MINUTES, TIM, RPM and IPM. I also used an IFTE statement instead of a IF..THEN..ELSE..END construct. your code would look like this: RPM RPMLIMIT > RPMLIMIT RPM IFTE IPR * 'IPM' STO TRAVEL IPM / 'TIM' STO TIM MINUTES + 'MINUTES' STO DCUT 2 * SDIA SWAP - 'SDIA' STO There is nothing wrong with how you code though. Whatever you do to keep your mind straight as you program is the correct way AFAIAC.
From: TW on 7 Dec 2007 11:49
> works pretty well. However i would like it the inform box to solve the > example like the financial TVM inform box does. Is that possible? I am Do you mean you want it to solve any item in the form? Or just have it solve in the form and pop up a message with the time? Yes both can be done, but it takes a little more work. TW |