HP 39gii: CASE Syntax - 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: CASE Syntax (/thread-239316.html) |
HP 39gii: CASE Syntax - Eddie W. Shore - 02-18-2013 I am trying to get a program where the user chooses to calculate the area between three shapes (circle, ring, and ellipse). Here is the sample code:
EXPORT AREAS()
I tried this with a semicolon with the first END, without the semicolon in the first END, but the result is the same: Syntax error. The online help/manual does not help. Any ideas? Thanks.
Re: HP 39gii: CASE Syntax - Thomas Radtke - 02-19-2013 I don't have a 39gii, so excuse my ignorance: Does CHOOSE work with just one option to choose from? Allthough unlikely, I imagine that could be a problem.
Re: HP 39gii: CASE Syntax - Gilles Carpentier - 02-19-2013 Hi Eddy,
The CASE command dont work. It is a bug. You must use imbricated IF THEN ELSE Your syntax seems (in theory) correct
CASE
Note that you can use
PRINT("Area = " + pi*R^2);
Edited: 19 Feb 2013, 2:26 a.m.
Re: HP 39gii: CASE Syntax - Eddie W. Shore - 02-20-2013 Quote:
Thankfully multiple IF THEN END structures work. Thanks.
|