Allocate
The Allocate method allocates the specified number of rows and columns. For example, you can use Allocate( ) to allocate a block of uninitialized memory from the system for the grid.
Syntax
object.Allocate( NumRows, NumCols )
Parameter |
Type |
Default |
Description |
NumRows |
Integer |
|
required; This specifies the number of rows to be allocated |
NumCols |
Integer |
|
required; This specifies the number of columns to be allocated |
Remarks
Allocate sets the number of rows and columns in the grid and allocates the necessary memory to store the grid rows. This is equal to NumRows*NumCols*8 bytes.
Example
This example demonstrates how to allocate 50,400 bytes (90 rows * 70 columns * 8 bytes = 50,400 bytes) of memory.
'Define a new grid
Grid = SurferApp.NewGrid
'Allocate the number of rows and columns for the new grid.
Grid.Allocate(NumRows:=90,NumCols:=70)
Used by: Grid object , GridXYZC object