Skip to content
Snippets Groups Projects
Commit dcf8e520 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

no more compact arrays

Rev: doc/builtin/allocate:1.4
parent a638a418
No related branches found
No related tags found
No related merge requests found
...@@ -2,21 +2,13 @@ NAME ...@@ -2,21 +2,13 @@ NAME
allocate - allocate an array allocate - allocate an array
SYNTAX SYNTAX
mixed *allocate(int size, [ string type ]); mixed *allocate(int size);
DESCRIPTION DESCRIPTION
Allocate an array of size elements. Optionally, write what type you Allocate an array of size elements and initialize them to zero.
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 EXAMPLES
mixed *a=allocate(17); 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 NOTA BENE
Arrays are dynamically allocated there is no need to declare them Arrays are dynamically allocated there is no need to declare them
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment