Глава 4 закончена
This commit is contained in:
parent
141dd624b1
commit
e57718386b
26 changed files with 442 additions and 2 deletions
|
@ -0,0 +1,15 @@
|
|||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
auto arr = [ 5, 10, 20, 30 ];
|
||||
auto p = arr.ptr;
|
||||
assert(*p == 5);
|
||||
++p;
|
||||
assert(*p == 10);
|
||||
++*p;
|
||||
assert(*p == 11);
|
||||
p += 2;
|
||||
assert(*p == 30);
|
||||
assert(p - arr.ptr == 3);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue