Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
import io;
|
||||
|
||||
typedef FirstObject {
|
||||
int objectNum;
|
||||
void PrintSelf(int a) {
|
||||
|int| objectNum;
|
||||
|void| PrintSelf(|int| a) {
|
||||
print(objectNum);
|
||||
print(a);
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
FirstObject wooObject;
|
||||
|int| main() {
|
||||
|FirstObject| wooObject;
|
||||
wooObject.objectNum = 5;
|
||||
wooObject.PrintSelf(7);
|
||||
print("\n");
|
||||
|
||||
Reference in New Issue
Block a user