Boolean can be counted by using the SWITCH function
Example:
boolean b[3];
b[1] = true; b[2] = false; b[3] = true;
integer a;
a = lsum(i = 1 to 3, b[i]);
Error message: Syntax error: Not allowed to use a Boolean expression
Solution:
a = lsum(i=1 to 3,switch(b[i] ? 1 else 0));
Comments
0 comments
Please sign in to leave a comment.