File: Q.3

package info (click to toggle)
nana 2.1-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,416 kB
  • ctags: 470
  • sloc: ansic: 4,369; sh: 2,271; makefile: 194; cpp: 106; tcl: 48; lisp: 39
file content (36 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.TH Q 3
.SH NAME 
Q - support for Forall, Exists, etc in GNU C and C++
.SH 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 */

.SH 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.

.SH PORTABILITY
These macros require GNU C or GNU C++.
.SH SEE ALSO
nana-clg(1), nana(1), nana(3), I(3), DI(3), L(3), DL(3), Q(3), Qstl(3) and nana.info.

The nana.info page is the primary documentation for this package.
.SH AUTHOR
Phil Maker <pjm@cs.ntu.edu.au>