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?
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?