2014-12-30 01:22:09 -05:00
|
|
|
import io:*;
|
2014-05-20 22:21:07 -04:00
|
|
|
|
|
|
|
|
typedef firstObject {
|
2015-05-09 06:24:56 -04:00
|
|
|
var objectNum: int;
|
|
|
|
|
var other: int;
|
|
|
|
|
fun print(): void {
|
2014-05-20 22:21:07 -04:00
|
|
|
print(other);
|
|
|
|
|
}
|
2015-05-09 06:24:56 -04:00
|
|
|
fun printInd(): void {
|
2014-05-20 22:21:07 -04:00
|
|
|
print();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef Int int;
|
|
|
|
|
|
2015-05-09 06:24:56 -04:00
|
|
|
var aliasNum: Int;
|
2014-05-20 22:21:07 -04:00
|
|
|
|
2015-05-09 06:24:56 -04:00
|
|
|
fun main(): int {
|
|
|
|
|
var wooObject: firstObject;
|
2014-05-20 22:21:07 -04:00
|
|
|
wooObject.objectNum = 7;
|
|
|
|
|
print(wooObject.objectNum);
|
2015-05-09 06:24:56 -04:00
|
|
|
var objPtr: firstObject* = &wooObject;
|
2014-05-20 22:21:07 -04:00
|
|
|
objPtr->objectNum = 42;
|
|
|
|
|
print(objPtr->objectNum);
|
|
|
|
|
print("\n");
|
|
|
|
|
objPtr->other = 1337;
|
|
|
|
|
objPtr->printInd();
|
|
|
|
|
print("\n");
|
|
|
|
|
}
|