Hello World : Command line
void main() {
print("Hello, World!");
// Ref: http://www.dart-tutorials.co.uk/#Tutorials/Getting-Started
String a = "Hellow World 1";
String b = 'Hello World 2';
var c = "Hello World 3";
print('$a');
print('$b');
print('$c');
String a2 = "1";
String c2 = "1";
int b2 = 1;
print(stringToInt(a2)==b2);
print(a2==b2);
print(a2==c2);
}
int stringToInt(String value) {
return value.codeUnitAt(0)-48;
}
沒有留言:
張貼留言