File tree Expand file tree Collapse file tree 6 files changed +272
-68
lines changed
Expand file tree Collapse file tree 6 files changed +272
-68
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ cast:: float(x : int) #inline {
4646cast:: int(x : float) #inline {
4747 return #cast x : int;
4848}
49+ cast:: int64(x : int32) #inline{
50+ return #cast x : int64;
51+ }
4952
5053printint:: (n : int) {
5154 putchar(48+n);
@@ -61,7 +64,9 @@ newline::(){
6164
6265#extern printf::(...);
6366#extern putchar::(c : int);
64- #extern malloc::*int(b : int);
67+ #extern puts::(str : *char);
68+ #extern malloc::*int(b : int64);
69+ #extern free::(p : *int);
6570
6671main :: (){
6772 //printf("Hello World!");
@@ -78,15 +83,18 @@ main :: (){
7883
7984 arr : *int = malloc(8*4);
8085
81- arr[2] = 74 ;
86+ arr[2] = 72 ;
8287
83- //modifyReference(x);
84- //printint(x);
88+ puts("Hello World!");
8589
86- newline();
87- printint(arr[2]);
90+ ////modifyReference(x);
91+ ////printint(x);
92+
93+ //newline();
94+ //putchar(arr[2]);
8895
8996 newline();
97+
9098 //if(1 || 0){
9199 // putchar(72);
92100 //}
@@ -104,7 +112,7 @@ main :: (){
104112 // }
105113 //}
106114
107- newline();
115+ // newline();
108116 //for (i : 0..100){ // for(<range>){} automatically iterates through range type
109117 // printl("%\n", i);
110118 //}
You can’t perform that action at this time.
0 commit comments