Product Information > JADE Encyclopaedia of Classes – Volume 1 > Chapter 1 - System Classes > getSegmentCount

getSegmentCount

getSegmentCount(): Integer;

The getSegmentCount method of the JadeBytes class returns the number of virtual segments allocated to the receiver for storage.

The following example shows the use of the getSegmentCount method.

vars
    bytes : JadeBytes;
begin
    create bytes;
    bytes.allocate(1000000);
    write bytes.getSegmentCount; // Writes 4
epilog
    delete bytes;
end;