Post Reply 
Lists and tests
12-19-2015, 11:40 AM (This post was last modified: 12-19-2015 11:43 AM by Didier Lachieze.)
Post: #1
Lists and tests
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?
Find all posts by this user
Quote this message in a reply
12-19-2015, 01:06 PM (This post was last modified: 12-19-2015 01:08 PM by Tim Wessman.)
Post: #2
RE: Lists and tests
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.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
12-19-2015, 04:31 PM
Post: #3
RE: Lists and tests
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

∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)