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

Side by Side Diff: src/site/_includes/language-tour/3-built-in-types/numbers.html

Issue 10700168: massive CL is massive (Closed) Base URL: https://code.google.com/p/dartlang-site/@master
Patch Set: Created 8 years, 5 months 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
1 <p> 1 <p>
2 Dart numbers come in two flavors: 2 Dart numbers come in two flavors:
3 </p> 3 </p>
4 4
5 <dl> 5 <dl>
6 <dt> <a href="http://api.dartlang.org/dart_core/int.html">int</a> </dt> 6 <dt> <a href="http://api.dartlang.org/dart_core/int.html">int</a> </dt>
7 <dd> Integers of arbitrary size </dd> 7 <dd> Integers of arbitrary size </dd>
8 <dt> <a href="http://api.dartlang.org/dart_core/double.html">double</a> </dt> 8 <dt> <a href="http://api.dartlang.org/dart_core/double.html">double</a> </dt>
9 <dd> 64-bit (double-precision) floating-point numbers, 9 <dd> 64-bit (double-precision) floating-point numbers,
10 as specified by the IEEE 754 standard </dd> 10 as specified by the IEEE 754 standard </dd>
(...skipping 16 matching lines...) Expand all
27 Integers are numbers without a decimal point. 27 Integers are numbers without a decimal point.
28 Here are some examples of defining integer literals: 28 Here are some examples of defining integer literals:
29 </p> 29 </p>
30 30
31 {% highlight dart %} 31 {% highlight dart %}
32 var x = 1; 32 var x = 1;
33 var hex = 0xDEADBEEF; 33 var hex = 0xDEADBEEF;
34 var bigInt = 3465346583465243765923847659234765928347659567398475647495873984572 94759347029438709349345687084921634872376394567823642093846734576230495872459687 30458762345720378629347652943652436525486734567056734652734652467345068734567294 57623845623456234650457693475603768922346728346256; 34 var bigInt = 3465346583465243765923847659234765928347659567398475647495873984572 94759347029438709349345687084921634872376394567823642093846734576230495872459687 30458762345720378629347652943652436525486734567056734652734652467345068734567294 57623845623456234650457693475603768922346728346256;
35 {% endhighlight %} 35 {% endhighlight %}
36 36
37 <aside class="note"> 37 <aside>
38 <b>Note:</b> 38 <div class="alert alert-info">
39 Big integers are currently treated differently between Dart and JavaScript. 39 <strong>Tip:</strong>
40 Big integers are currently treated differently between Dart and JavaScript.
41 </div>
40 </aside> 42 </aside>
41 43
42 <p> 44 <p>
43 If a number includes a decimal, 45 If a number includes a decimal,
44 it is a double. 46 it is a double.
45 Here are some examples of defining double literals: 47 Here are some examples of defining double literals:
46 </p> 48 </p>
47 49
48 {% highlight dart %} 50 {% highlight dart %}
49 var y = 1.1; 51 var y = 1.1;
(...skipping 25 matching lines...) Expand all
75 <p> 77 <p>
76 The num interface specifies the traditional bit shift, AND, and OR operators. 78 The num interface specifies the traditional bit shift, AND, and OR operators.
77 For example: 79 For example:
78 </p> 80 </p>
79 81
80 {% highlight dart %} 82 {% highlight dart %}
81 assert((3 < 1) == 6); // 0011 << 1 == 0110 83 assert((3 < 1) == 6); // 0011 << 1 == 0110
82 assert((3 >> 1) == 1); // 0011 >> 1 == 0001 84 assert((3 >> 1) == 1); // 0011 >> 1 == 0001
83 assert((3 | 4) == 7); // 0011 | 0100 == 0111 85 assert((3 | 4) == 7); // 0011 | 0100 == 0111
84 {% endhighlight %} 86 {% endhighlight %}
85 </section>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698