You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 536d1ba
Browse filesBrowse the repository at this point in the historyBrowse files
pin in bool in##[128:personality] = 1 "input pins, up to personality-1";
3
+
pin out bool out "output pin; the AND of all inputs";
4
+
5
+
description """
6
+
The *out* pin is set to *TRUE* if all the inputs are all *TRUE*; or *FALSE* if one or more are *FALSE*.
7
+
8
+
The value for a unconnected pin is TRUE; so it is fine to leave a pin unconnected.
9
+
10
+
Set the number of pins via personality. The default value is a single *AND* with 8 inputs; so personality=8. The maximum number of inputs is 128 (hardcoded). If there are no inputs specified (personality=0); then the output value
11
+
is TRUE.
12
+
""";
13
+
14
+
function _ "Logical AND";
15
+
16
+
see_also """
17
+
*or*(9),
18
+
and2(9)
19
+
and
20
+
or2(9).
21
+
""";
22
+
23
+
option period no;
24
+
option default_personality 8;
25
+
option default_count 1;
26
+
27
+
license "ASLv2";
28
+
author "Dirk-Willem van Gulik <dirkx(at)webweaving(punto)org";
29
+
;;
30
+
FUNCTION(_) {
31
+
bool tmp = 1;
32
+
// we prefer constant time; so do not return 0 on the first 0.
0 commit comments