HP Forums

Full Version: NOT AND INSTRUCTION ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I wonder if NOT AND boolean instruction exist in the HP Prime. I think no, but how can we emule this instruction ?
I try since a moment but without success.

Maybe one can help me ?

Goog day.
I think Gérard meant 'NAND' command.

If logical values are stored in list L1 then something like this could work:

[attachment=7587]

Edit: strikethrough text was reaction to previous advice of another user and that post is now deleted.
Thanks for that suggestion Chromos.
If it is NAND that is wanted I would suggest:
Code:

EXPORT NAND(LST)
BEGIN
 IF SIZE(LST)==1 THEN
  RETURN (LST(1)==0);
 END;
 RETURN NOT (ΠLIST(LST));
END;

That has the advantage of also working with a single input, which the built-in list function does not handle.
Yes it is NAND I was speaking.
Thank you for reply.
Reference URL's