colgm/test/assign.colgm

25 lines
459 B
Rust

use libc::puts;
pub struct A {
a: i64,
b: i8*,
c: i8*
}
pub func main() -> i64 {
var a = A::__alloc__();
var b = nil;
a->a = 0;
a->a += 1;
a->a -= 2;
a->a *= 3;
a->a /= 4;
a->a %= 5;
a->b = "[assign.colgm] hello world!";
puts(a->b);
a->c = "[assign.colgm] another line test.";
puts(a->c);
if (b == nil)
puts("[assign.colgm] b is null pointer.");
return 0;
}