import 'dart:async';
main() async {
Future foo(int a1, int a2) {
print("from foo: $a1 $a2");
return new Future.value();
}
int a = 0;
await foo(a++, a++);
print("after await foo: $a");
a = 0;
foo(a++, a++).then((_) {
print("after foo.then: $a");
});
}
from foo: 0 0
after await foo: 1
from foo: 0 1
after foo.then: 2
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.