Commit 6f16577 1 parent 310478c commit 6f16577 Copy full SHA for 6f16577
File tree 2 files changed +19
-10
lines changed
examples/misc/lib/language_tour
2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 1
1
// ignore_for_file: dead_code, unused_local_variable, type_annotate_public_apis
2
2
// ignore_for_file: prefer_single_quotes, prefer_collection_literals
3
- // ignore_for_file: experiment_not_enabled
4
3
5
4
void miscDeclAnalyzedButNotTested () {
6
5
{
@@ -38,15 +37,16 @@ void miscDeclAnalyzedButNotTested() {
38
37
// #enddocregion const-num
39
38
}
40
39
41
- {
42
- // #docregion digit-separators
43
- var n1 = 1_000_000 ;
44
- var n2 = 0.000_000_000_01 ;
45
- var n3 = 0x00_14_22_01_23_45 ; // MAC address
46
- var n4 = 555_123_4567 ; // US Phone number
47
- var n5 = 100__000_000__000_000 ; // one hundred million million!
48
- // #enddocregion digit-separators
49
- }
40
+ // Uncomment when feature is stable:
41
+ // {
42
+ // // #docregion digit-separators
43
+ // var n1 = 1_000_000;
44
+ // var n2 = 0.000_000_000_01;
45
+ // var n3 = 0x00_14_22_01_23_45; // MAC address
46
+ // var n4 = 555_123_4567; // US Phone number
47
+ // var n5 = 100__000_000__000_000; // one hundred million million!
48
+ // // #enddocregion digit-separators
49
+ // }
50
50
51
51
{
52
52
// #docregion quoting
Original file line number Diff line number Diff line change @@ -177,7 +177,11 @@ You can use one or more underscores (`_`) as digit separators
177
177
to make long number literals more readable.
178
178
Multiple digit separators allow for higher level grouping.
179
179
180
+ {% comment %}
181
+ Uncomment when feature is stable:
182
+
180
183
<? code-excerpt "misc/lib/language_tour/built_in_types.dart (digit-separators)"?>
184
+ {% endcomment %}
181
185
``` dart
182
186
var n1 = 1_000_000;
183
187
var n2 = 0.000_000_000_01;
@@ -186,6 +190,10 @@ var n4 = 555_123_4567; // US Phone number
186
190
var n5 = 100__000_000__000_000; // one hundred million million!
187
191
```
188
192
193
+ ::: version-note
194
+ Using digit separators requires a [ language version] [ ] of at least 3.6.0.
195
+ :::
196
+
189
197
## Strings
190
198
191
199
A Dart string (` String ` object) holds a sequence of UTF-16 code units.
@@ -427,3 +435,4 @@ Symbol literals are compile-time constants.
427
435
[ characters API ] : {{site.pub-api}}/characters
428
436
[ characters example ] : {{site.pub-pkg}}/characters/example
429
437
[ `Symbol` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-core/Symbol-class.html
438
+ [ language version ] : /guides/language/evolution#language-versioning
You can’t perform that action at this time.
0 commit comments