1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
NAME 
        allocate - allocate an array 
 
SYNTAX 
        mixed *allocate(int size, [ string type ]); 
 
DESCRIPTION 
        Allocate an array of size elements. Optionally, write what type you 
        want to store in the array in the second argument as a string. 
        Note that the type given in this string should be simple, instead 
        of writing "int ***" just write "array". 
 
EXAMPLES 
        mixed *a=allocate(17); 
        int *b=allocate(17, "int"); 
        int **c=allocate(17, "array"); 
        mapping *c=allocate(17, "mapping"); 
        array (list (int)) c=allocate(17, "list"); 
        array (string) c=allocate(17, "string"); 
 
NOTA BENE 
        Arrays are dynamically allocated there is no need to declare them 
        like int a[10]=allocate(10); (and it isn't possible either) like 
        in C, just int *a=allocate(10); will do. 
 
SEE ALSO 
        sizeof, aggregate, arrayp