annotate samples/logical.tp @ 375:f8d80c16abbd

Add epoll module and a basic epoll sample
author Michael Pavone <pavone@retrodev.com>
date Fri, 14 Aug 2015 23:08:54 -0700
parents 59a94f3ad56f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
97
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #{
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 foo <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 print: "foo\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 bar <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 print: "bar\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 false
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 baz <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 print: "baz\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 qux <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 print: "shouldn't be printed\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24 main <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
25 foo && bar || (baz || qux)
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
26 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
27
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
28 }