f(String name, {String mode = "w+", String charset = 'utf-16'}) {
print(name);
print(mode);
print(charset);
print("\n");
}
main() {
f('dart');
f('java', mode: 'y+');
f('c', charset: 'windows-1258');
f('c++', charset: 'iso-8859-10', mode: 'v+');
f('python', mode: 'z+', charset: 'utf-8');
}
/*
run:
dart
w+
utf-16
java
y+
utf-16
c
w+
windows-1258
c++
v+
iso-8859-10
python
z+
utf-8
*/