Page 1 sur 1

assume(y,expression); y and true; => y and true

Publié : sam. févr. 10, 2018 6:54 pm
par compsystems
I do not find logic, when an identifier is defined as a symbolic expression, it is evaluated to a numeric or Boolean value

Code : Tout sélectionner

f():={
  local y, expr1;
  assume(y,expression);
  expr1:=(y and true);
  print(y and true);   // y Why?
  print(expr1); // y Why?
  return expr1; // y Why?
}:;
f() returns y, Why?

assume(y,expression); y and true; => y and true

Re: assume(y,expression); y and true; => y and true

Publié : sam. févr. 10, 2018 7:26 pm
par parisse
What's the problem?
Testing something and true or something alone is the same test.