HP Forums
Error in CASE doc in manual - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Error in CASE doc in manual (/thread-8464.html)



Error in CASE doc in manual - KeithB - 06-06-2017 07:40 PM

From the pdf manual:

CASE
IF THEN RETURN "negative"; END;
IF THEN RETURN "small"; END;
DEFAULT RETURN "large";END;

I think you need some tests between the "IF" and the "THEN".


RE: Error in CASE doc in manual - Joe Horn - 06-06-2017 11:07 PM

Which version of the document do you have? My copy (Second Edition, September 2016) has this on page 584:

CASE
IF A<0 THEN RETURN "negative"; END;
IF 0≤A≤1 THEN RETURN "small"; END;
DEFAULT RETURN "large";
END;



RE: Error in CASE doc in manual - Tyann - 06-07-2017 03:34 AM

Bonjour

Je me suis rendu compte que DEFAULT n'est pas obligatoire
( par accident, je l'ai oublié).
Ceci fonctionne.

Hello

I realized that DEFAULT is not mandatory
(By accident, I forgot it).
This works.

Code:
CASE
IF A<0 THEN RETURN "negative"; END;
IF 0≤A≤1 THEN RETURN "small"; END;
RETURN "large";
END;



RE: Error in CASE doc in manual - KeithB - 06-07-2017 03:03 PM

HPPrime-5-user_guide_en_2015_06_17_1

So I guess I need a new one!


RE: Error in CASE doc in manual - toml_12953 - 06-07-2017 04:40 PM

This code works, too:

Code:
CASE
IF A<0 THEN RETURN "negative"; END;
IF 0≤A≤1 THEN RETURN "small"; END;
DEFAULT "large";
END;


Tom L


RE: Error in CASE doc in manual - KeithB - 06-07-2017 08:09 PM

I know what is required, I was just pointing out an error in the manual, which appears to have been corrected.


RE: Error in CASE doc in manual - Marcel - 06-09-2017 10:39 AM

Hi Joe,
I only find July 2015 for the book where do you find the "Second edition September 2016" book?
Thank you.
Marcel

OK... I find it!
Sorry...