HP Forums
HP 39gii Tutorials Parts 1 and 2 up - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP 39gii Tutorials Parts 1 and 2 up (/thread-240306.html)



HP 39gii Tutorials Parts 1 and 2 up - Eddie W. Shore - 03-09-2013

Part 1: PRINT, INPUT, string


Part 2: IF/THEN/ELSE/END, MSGBOX, CHOOSE


Re: HP 39gii Tutorials Parts 1 and 2 up - Gilles Carpentier - 03-10-2013

Well done !

About PRINT command, as far I know it is not explain in the user guide, but you can use PRINT without any parameter to clear the screen. There is no CLS or CLEAR command, PRINT do the job

Another trick not explain is that you can easily create new global variables with just the syntax (in a program):

EXPORT NewGlobal ;

For example

EXPORT L10:={};

create a new global list in addition of the existing L0..L9

There is no need of 'string' command in such things as :

EXPORT AREA1()
BEGIN
INPUT(R, "Radius");
PRINT("THE AREA IS " + string(Pi*R²) + ".");
END;

PRINT("THE AREA IS " + Pi*R² + ".");
is OK

To evaluate in expresion in a string, the command is expr
expr("2+3") returns 5. If the variable X has the value 90, then expr("X+10") returns 100.

I also notice that the 39GII knows some physics contants (Math - PHYS ) but I don't know if wecan use them in program. It would simplify your program KEPLER (with a powerfull unit management in addition)


Edited: 10 Mar 2013, 5:19 a.m.


Re: HP 39gii Tutorials Parts 1 and 2 up - Herman T - 03-11-2013

Nice, thank you.
Herman


Re: HP 39gii Tutorials Parts 1 and 2 up - Eddie W. Shore - 03-11-2013

Quote:
Well done !

About PRINT command, as far I know it is not explain in the user guide, but you can use PRINT without any parameter to clear the screen. There is no CLS or CLEAR command, PRINT do the job

Another trick not explain is that you can easily create new global variables with just the syntax (in a program):

EXPORT NewGlobal ;

For example

EXPORT L10:={};

create a new global list in addition of the existing L0..L9

There is no need of 'string' command in such things as :

EXPORT AREA1()
BEGIN
INPUT(R, "Radius");
PRINT("THE AREA IS " + string(Pi*R²) + ".");
END;

PRINT("THE AREA IS " + Pi*R² + ".");
is OK

To evaluate in expresion in a string, the command is expr
expr("2+3") returns 5. If the variable X has the value 90, then expr("X+10") returns 100.

I also notice that the 39GII knows some physics contants (Math - PHYS ) but I don't know if wecan use them in program. It would simplify your program KEPLER (with a powerfull unit management in addition)



Thanks!

I note that string is not necessary. However, what if the expression has addition in it (a+b for example)? Staying on the safe side - I think.

Units in programs would help - not sure if I can use them. I was not able to use units in the Solver app.