Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import io;
|
||||
|
||||
template <T>T addAndPrint(T a, T b) {
|
||||
template <T> |T| addAndPrint(|T| a, |T| b) {
|
||||
print(a+b);
|
||||
return a+b;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
|int| main() {
|
||||
addAndPrint<int>(10,12);
|
||||
print("\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user