equal
deleted
inserted
replaced
42 |
42 |
43 // adding boilerplate |
43 // adding boilerplate |
44 def compile(prog: String) : String = |
44 def compile(prog: String) : String = |
45 s"""#include <string.h> |
45 s"""#include <string.h> |
46 #include <stdio.h> |
46 #include <stdio.h> |
47 char field[30000]; |
47 int field[30000]; |
48 char *ptr = &field[15000]; |
48 int *ptr = &field[15000]; |
49 int main() { |
49 int main() { |
50 memset(field, '\\0', 30000); |
50 memset(field, '\\0', 30000); |
51 ${instrs2(prog)} |
51 ${instrs2(prog)} |
52 return 0;}""" |
52 return 0;}""" |
53 |
53 |