Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Undefined-values/D/undefined-values.d
Normal file
19
Task/Undefined-values/D/undefined-values.d
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
void main() {
|
||||
// Initialized:
|
||||
int a = 5;
|
||||
double b = 5.0;
|
||||
char c = 'f';
|
||||
int[] d = [1, 2, 3];
|
||||
|
||||
// Default initialized:
|
||||
int aa; // set to 0
|
||||
double bb; // set to double.init, that is a NaN
|
||||
char cc; // set to 0xFF
|
||||
int[] dd; // set to null
|
||||
int[3] ee; // set to [0, 0, 0]
|
||||
|
||||
// Undefined (contain garbage):
|
||||
int aaa = void;
|
||||
double[] bbb = void;
|
||||
int[3] eee = void;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue