Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
dcf8e520
Commit
dcf8e520
authored
29 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/builtin/allocate
+2
-10
2 additions, 10 deletions
doc/builtin/allocate
with
2 additions
and
10 deletions
doc/builtin/allocate
+
2
−
10
View file @
dcf8e520
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment