CreateArray
Creates an array value. This method returns the current context and calls its CreateArray method.
note
This method is only available in Python and Java.
Please note, that for the
.docbuilderfile theCDocBuilderValue.CreateArraymethod is not used.
Syntax
- Python
- Java
def CreateArray(self, length: int) -> CDocBuilderValue
CDocBuilderValue createArray(int length);
Parameters
- Python
- Java
| Name | Type | Description |
|---|---|---|
| length | int | The array length. |
| Name | Type | Description |
|---|---|---|
| length | int | The array length. |
Example
- Python
- Java
builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
array = api.CreateArray(2)
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
CDocBuilderValue api = global.get("Api");
CDocBuilderValue arrayValue = api.createArray(2);
CDocBuilder.dispose();