HP Forums
Lists and tests - 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: Lists and tests (/thread-5363.html)



Lists and tests - Didier Lachieze - 12-19-2015 11:40 AM

This may be a question for Cyrille or Tim. I've noticed something strange using lists in test conditions.
Let do in Home :

A:=8
B:=2
C:=2
L1:={"A","B" "C"}

EXPR(L1) returns {8,2,2} => fine
{8,2,2}+1 returns {9,3,3} => good
EXPR(L1)+1 returns {9,3,3} => so far so good

3<{8,2,2} returns {1,0,0} => ok
3<EXPR(L1) returns {1,0,0} => still good

{8,2,2}>3 returns {1,0,0} => ok, but:
EXPR(L1)>3 returns an error message "Bad argument type"

So it seems that a list as a result of EXPR() works when it is the second argument of a test condition but not when it is the first argument. Why?


RE: Lists and tests - Tim Wessman - 12-19-2015 01:06 PM

This was noticed a while back and mentioned here as well I think. I believe it functions with no issue in the ios app (not 100% sure on that). We are now in an interesting (for us at least) situation where the app is leading the hardware. Just kind of a new experience on our end.

One other list related thing, there is a new EQ command that does the same as ==, except for lists it will only return 1/0 based on an exact match of the whole list.


RE: Lists and tests - salvomic - 12-19-2015 04:31 PM

hi,
in the Prime with EXPR(L1)>3 I got "Bad argument type" both CAS and Home;
in the iPhone I got "Bad argument type" in Home, but
EXPR(8,2,2)>3
is returned in CAS

NHY!

Salvo