[ create a new paste ] login | about

Link: http://codepad.org/Mq4esIuC    [ raw code | output | fork ]

GiM - D, pasted on May 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* D - ArraySeq - size, capacity, length
 */
import tango.util.collection.ArraySeq;
import tango.io.Stdout;

alias ArraySeq!(int) blurp;

void main()
{
  blurp xx = new blurp;
  
  xx.capacity = 100;
  xx.append(10);
  xx.append(20);
  xx.append(30);

  Stdout.formatln ("capacity {} size {} length {}", xx.capacity, xx.size, xx.length);
}


Output:
1
capacity 100 size 3 length 3


Create a new paste based on this one


Comments: