Dart教程
-
Dart编程实例-CompareTo方法-Dart实例教程|
Dart编程实例 - CompareTo 方法 void main () { var a = 2.4 ; print ( a . compareTo ( 12 )); print ( a . compareTo ( 2.4 )); print ( a . compareTo ( 0 )); }...
-
Dart编程实例-Ceil方法-Dart实例教程|
Dart编程实例 - Ceil 方法 void main () { var a = 2.4 ; print ( The ceiling value of 2.4 = ${ a . ceil () } ); }...
-
Dart编程实例-Abs方法-Dart实例教程|
Dart编程实例 - Abs 方法 void main () { var a = - 2 ; print ( a . abs ()); }...
-
Dart编程实例-数字isOdd属性-Dart实例教程|
Dart编程实例 - 数字 isOdd 属性 void main () { int posNum = 10 ; print ( posNum . isOdd ); }...
-
Dart编程实例-数字isEven属性-Dart实例教程|
Dart编程实例 - 数字 isEven 属性 void main () { int posNum = 10 ; print ( posNum . isEven ); }...
-
Dart编程实例-数字sign属性-Dart实例教程|
Dart编程实例 - 数字 sign 属性 void main () { int posNum = 10 ; int negNum = - 12 ; int valZero = 0 ; print ( posNum . sign ); print ( negNum . sign ); print ( valZero . sign...
-
Dart编程实例-数字isNegative属性-Dart实例教程|
Dart编程实例 - 数字 isNegative 属性 void main () { int posNum = 10 ; int negNum = - 10 ; print ( posNum . isNegative ); print ( negNum . isNegative ); }...
-
Dart编程实例-数字isInFinite属性-Dart实例教程|
Dart编程实例 - 数字 isInFinite 属性 void main () { int n = 5000 ; print ( n . isInfinite ); }...
-
Dart编程实例-数字isFinite属性-Dart实例教程|
Dart编程实例 - 数字 isFinite 属性 void main () { int n = 5000 ; print ( n . isFinite ); }...
-
Dart编程实例-数字hashcode属性-Dart实例教程|
Dart编程实例 - 数字 hashcode 属性 void main () { int n = 5000 ; print ( n . hashCode ); }...
-
Dart编程实例-parse函数-Dart实例教程|
Dart编程实例 - parse函数 void main () { print ( num . parse ( 12A )); print ( num . parse ( AAAA )); }...
-
Dart编程实例-数字实例-Dart实例教程|
Dart编程实例 - 数字实例 void main () { int num1 = 10 ; // declare an integer double num2 = 10.50 ; // declare a double value print ( num1 ); print ( num2 ); }...
-
Dart编程实例-DartSwitchCase语句-Dart实例教程|
Dart编程实例 - Dart Switch Case 语句 void main () { var grade = A ; switch ( grade ) { case A : { print ( Excellent ); } break ; case B : { print ( Good ); } break ; case C : ...
-
Dart编程实例-elseif-Dart实例教程|
Dart编程实例 - else if void main () { var num = 2 ; if ( num 0 ) { print ( ${ num } is positive ); } else if ( num 0 ) { print ( ${ num } is negative ); } else { print ( ${ num ...
-
Dart编程实例-简单ifelse语句-Dart实例教程|
Dart编程实例 - 简单 if else 语句 void main () { var num = 12 ; if ( num % 2 == 0 ) { print ( Even ); } else { print ( Odd ); } }...
-
Dart编程实例-If语句-Dart实例教程|
Dart编程实例 - If 语句 void main () { var num = 5 ; if ( num 0 ) { print ( number is positive ); } }...
-
Dart编程实例-continue和Label-Dart实例教程|
Dart编程实例 - continue 和 Label void main () { outerloop: // This is the label name for ( var i = 0 ; i 3 ; i ++ ) { print ( Outerloop: ${ i } ); for ( var j = 0 ; j 5 ; j ++ ...
-
Dart编程实例-break和label-Dart实例教程|
Dart编程实例 - break和label void main () { outerloop: // This is the label name for ( var i = 0 ; i 5 ; i ++ ) { print ( Innerloop: ${ i } ); innerloop: for ( var j = 0 ; j 5 ;...
-
Dart编程实例-Continue语句-Dart实例教程|
Dart编程实例 - Continue 语句 void main () { var num = 0 ; var count = 0 ; for ( num = 0 ; num = 20 ; num ++ ) { if ( num % 2 == 0 ) { continue ; } count ++ ; } print ( The cou...
-
Dart编程实例-Break语句-Dart实例教程|
Dart编程实例 - Break 语句 void main () { var i = 1 ; while ( i = 10 ) { if ( i % 5 == 0 ) { print ( The first multiple of 5 between 1 and 10 is : ${ i } ); break ; //exit the ...