-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.fcp
More file actions
133 lines (101 loc) · 1.71 KB
/
test.fcp
File metadata and controls
133 lines (101 loc) · 1.71 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#define Outer 1
#define Inner 0
#include "test_inc.fc";
#flag 1 IsOwner IsNotOwner
b = F_IsOwner;
if (b.IsOwner?)
c = b.IsNotOwner?;
a = Outer + Inner - OuterInner * Inner:Outer / Outer_Inner;
#accessor 1 seqno int
m = data[seqno];
data[seqno] = 1;
data[seqno] += 1;
#define deftest
#ifdef deftest
deftest is defined
#else
deftest is not defined
#endif
anyway
#undef deftest
#ifdef deftest
deftest is defined
#error This is an error!
#else
deftest is not defined
#endif
#define deftest
#ifdef deftest
#ifndef badtest
#dump
#endif
#endif
#ifeq TestDef 123
good
#endif
#ifneq TestDef 111
good
#endif
#ifeq TestDef abc
bad
#endif
#define Features good,ugly
#ifsub Features good
good feature
#endif
#ifsub Features bad
bad feature
#endif
#ifsub Features ugly
ugly feature
#endif
#mldefine multiline
this
is
multi-line
define
#end
before
multiline;
after
;; addr -> (int8 wc, uint256 addr)
#storage
uint8 a_byte;
cell some_cell;
uint32 seqno;
string symbol;
addr owner;
uint256 owner_key;
dict dictionary;
uint24 unusual_int;
int16 index;
int8 chain_id;
grams amount;
#end
int seqno() method_id {
return storage_load()[seqno];
}
int op = @"NstK";
#storage global
uint8 a_byte;
cell some_cell;
uint32 seqno;
string symbol;
addr owner;
uint256 owner_key;
dict dictionary;
uint24 unusual_int;
int16 index;
int8 chain_id;
grams amount;
#end
#storage local
uint256 owner_key;
addr owner_addr;
uint32 expiry;
cell data;
#end
something[local:expiry] = a + other[local:expiry];
;; Context dependent lookup
some_local[owner_key] = other_local[owner_key];
some_local[owner_key] &= 0;