Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: src/site/articles/using-future-based-apis/code/example1.dart

Issue 99503002: appropriating Shailen's excellent Futures intro into tutorial (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 import 'dart:io';
2
3 void printDailyNewsDigest() {
4 File file = new File("dailyNewsDigest.txt");
5 print(file.readAsStringSync());
6 }
7
8 void main() {
9 printDailyNewsDigest();
10 printWinningLotteryNumbers();
11 printWeatherForecast();
12 printBaseballScore();
13 }
14
15 printWinningLotteryNumbers() {
16 print('Winning lotto numbers: [23, 63, 87, 26, 2]');
17 }
18
19 printWeatherForecast() {
20 print('Tomorrow\'s forecast: 70F, sunny.');
21 }
22
23 printBaseballScore() {
24 print('Baseball score: Red Sox 10, Yankees 0');
25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698