visualizzazione risultati di un programma nel hp49G
#1

Salve a tutti, posseggo una calcolatrice HP 49 G e ho un problema che non riesco a risolvere: vorrei creare un programma che faccia la somma e la sottrazione di due numeri. Al dilà della semplicità dell'operazione da eseguire, vorrei porre però l'attenzione al modo di visualizzazione.

Vorrei che una volta lanciato il programma, la calcolatrice mi chieda il valore di a, poi quello di b ed infine mi restituisca c= il valore della somma, d= valore della sottrazione. Riesco a scrivere il programma, però non riesco a fare in modo che i risultati compaiano entrambi sullo schermo, perchè la calcolatrice visualizza solo l'ultima riga (in questo caso il valore della sottrazione). Come devo fare?

In pratica alla fine dell'esecuzione del programma vorrei vedere questo:

----------------------- dammi a: 5 dammi b: 2

la somma è: 7 la sottrazione è: 3 -----------------------

Molte grazie a chi potrà spiegarmi come devo scrivere il programma. Così facendo potrò scriverne altri più complessi con la stessa procedura


Dennis

#2

Hi;

one possible solution is:

« "Input a:" "" INPUT
"Input b:" "" INPUT
-> a b «
"a = " a + " (place a line-feed here)
b = " b + + " (place a line-feed here)
c = " a b + + + " (place a line-feed here)
d = " a b - + +
CLLCD 1 DISP 3 FREEZE » »
You can change the input strigns as you wish, like this:
« "dammi a:" "" INPUT
"dammi b:" "" INPUT
-> a b «
"a = " a + "
b = " b + + "
la somma è: " a b + + + "
la sottrazzione è: " a b - + +
CLLCD 1 DISP 3 FREEZE » »
Note that: -> is the representation of one only character, a righ-arrow, and when you see (place a line-feed here) you should add the line-feed character, a turn-to-left arrow.

Success.

(I did not test the program be cause I'm in a hurry; if it does not work, post a warning and I'll check for it; thank you)

#3

Hi;

I was in a hurry and I forgot to add OBJ-> after INPUT, so the input data can be used as a mnumber. The corrected program is:

« "Input a:" "" INPUT OBJ->
"Input b:" "" INPUT OBJ->
-> a b «
"a = " a + " (place a line-feed here)
b = " b + + " (place a line-feed here)
c = " a b + + + " (place a line-feed here)
d = " a b - + +
CLLCD 1 DISP 3 FREEZE » »
Sorry if I did not see this first.

Best regards.

#4

Ciao Vieira, Luiz C.,
grazie per aver risposto: ieri ho provato il programma, ma va in errore alla riga:

"a = a + "

Non sono pratico con la notazione inversa polacca.
Sapresti dirmi come dovrei scriverlo con la notazione "algebraic"?

Grazie mille per l'aiuto, se riesco a risolvere questo problema potrò fare dei programmi più utili.


Dennis

#5

Hello, Dennis;

Forgive-me if I do not answer you in Italian; as I speak Portuguese, it's not hard to understand the basic of your message, but I have to use a translator for understanding it completely.

About the line you pointed as troubled, I would ask you, please, to check for correct spelling, that is:

"a = " a + 
instead of
"a = a + "
(please, note the ["] character actual position).

I'm sending to your e-mail (today later) a file that you can directly download to your HP49G. I believe it will work fine.

About the algebraic version: would you mind waiting for a bit more, say, tomorrow? I'm gonna have to read some parts of the HP49G's manual to accomplish this request, but there is no trouble at all; I was waiting for a good chance to delve into the HP49's algebraic capabilities.

Thank you and best regards.

#6

This is a better viewing of the program:

«
"Input a:"
""
INPUT
OBJ->
"Input b:"
""
INPUT
OBJ->
-> a b «
"a = "
a +
"(place a line-feed here)b = "
b +
+
"(place a line-feed here)c = "
a b +
+
+
"(place a line-feed here)d = "
a b -
+
+
CLLCD
1 DISP
3 FREEZE
»
»

This way of listing the program will probably allow you to "see" it in a more functional structure.

Best regards.

#7

Ciao, Vieira, Luiz C.,
grazie per avermi risposto. Il programma che hai scritto funziona benissimo, e con un po di sforzo l'ho riscritto in linguaggio "algebraic".
Ora posso finalmente risolvere delle lunghe espressioni per il clacolo di elementi strutturali in calcestruzzo armato.

Cordiali Saluti
Dennis



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP49G+ and HP49G compatibility Les Wright 17 4,234 06-02-2006, 08:23 PM
Last Post: James M. Prange (Michigan)
  HP49G and HP49G+ emualtor Harry 4 1,523 12-05-2004, 09:11 PM
Last Post: Vieira, Luiz C. (Brazil)
  HP49G+ vs. HP49G, pausing F. Casanellas 6 1,841 09-20-2003, 11:35 PM
Last Post: Ed Look

Forum Jump: