2015-03-24 18:29:21 -04:00
|
|
|
import c_passthrough_diff
|
|
|
|
|
|
|
|
|
|
|
2015-04-10 00:37:31 -04:00
|
|
|
__if_comp__ __C__ simple_passthrough """
|
2015-03-24 18:29:21 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
int same = 5;
|
|
|
|
|
"""
|
|
|
|
|
|
2015-05-09 06:24:56 -04:00
|
|
|
fun main(): int {
|
2015-03-24 18:29:21 -04:00
|
|
|
|
2015-04-10 00:37:31 -04:00
|
|
|
__if_comp__ __C__ simple_passthrough """
|
2015-03-24 18:29:21 -04:00
|
|
|
printf("same_file: %d\n", same);
|
|
|
|
|
"""
|
2015-04-10 00:37:31 -04:00
|
|
|
|
|
|
|
|
c_passthrough_diff::print_it();
|
2015-05-09 06:24:56 -04:00
|
|
|
var i: int = 7;
|
|
|
|
|
var j: int = 6;
|
2015-04-10 00:37:31 -04:00
|
|
|
__if_comp__ __C__ simple_passthrough(i = i, j = j : j = j:) """
|
|
|
|
|
j = i + j;
|
|
|
|
|
"""
|
|
|
|
|
c_passthrough_diff::print_it(j)
|
2015-06-19 13:28:02 -04:00
|
|
|
|
|
|
|
|
// test new shorthand for same name assignments
|
|
|
|
|
var r: int = 1000;
|
|
|
|
|
var s: int = 337;
|
|
|
|
|
__if_comp__ __C__ simple_passthrough(r, s : s:) """
|
|
|
|
|
s = r + s;
|
|
|
|
|
"""
|
|
|
|
|
c_passthrough_diff::print_it(s)
|
2015-03-24 18:29:21 -04:00
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|