-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFBP.cpp
49 lines (33 loc) · 857 Bytes
/
FBP.cpp
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
#include "Functions.h"
int main() {
// Setup (required)
setup_the_memory();
// Setup
// THE CODE GOES HERE
using namespace FBP;
int a = newVariable(1);
int z = newVariable(3);
loop();
printC('T');
ifTrue(EQUAL(a,z));
lastLoop();
endIf();
addN(a,1);
endLoop();
deleteVariable(a);
deleteVariable(z);
// THE CODE GOES HERE
// Debug
// shows number of memory leaks that are not free(); ed
analyse();
// Debug
return 0;
}
/* TO DO
make #isZero array to contain the zero values and prevent [-]
use a consistent format in naming functions
dont delete the memory for print and reuse it, make freeStrings() at end
make freeEverything() to free everything instead of deleting one by one
subN is absent in the documentation
add NOT_ZERO
*/