---
name: "Q"
section: "3"
platform: "linux"
package: "nana"
version: "2.5-12+deb7u1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/Q"
---

# Q(3)

support for Forall, Exists, etc in GNU C and C++

## NAME

Q - support for Forall, Exists, etc in GNU C and C++

## SYNOPSIS

\#include \<Q.h\>

bool A(init,cond,next,exprn) /\* Forall \*/

bool E(init,cond,next,exprn) /\* Exists \*/

bool E1(init,cond,next,exprn) /\* Exists a single \*/

bool C(init,cond,next,exprn) /\* Count \*/

## DESCRIPTION

This is a simple minded implementation of predicate calculus in C. The first three arguments are the same as those of the for loop  in C and C++.  For example to verify that all values in an array  are positive you could use:

A(int i = 0, i \< 100, i++, a\[i\] \>= 0)

Note that the macros can be nested or used in any context that  requires boolean values.

See nana.info for more details.

## PORTABILITY

These macros require GNU C or GNU C++.

## SEE ALSO

[nana-clg(1)](/nana-clg/1.md), [nana(1)](/nana/1.md), [nana(3)](/nana/3.md), [I(3)](/I/3.md), [DI(3)](/DI/3.md), [L(3)](/L/3.md), [DL(3)](/DL/3.md), [Q(3)](/Q/3.md), [Qstl(3)](/Qstl/3.md) and nana.info.

The nana.info page is the primary documentation for this package.

## AUTHOR

Phil Maker \<pjm@gnu.org\>
