Difference between revisions of "Core.Terms.ListCreate"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | ListCreate | Creates a new object of type list at run time | Term | OTX Core library | Creatio...") |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Core]] | + | {{DISPLAYTITLE:OTX '''ListCreate'''}}[[Category:Core]] |
== Classification == | == Classification == | ||
− | {{ClassificationActivity | ListCreate | Creates a new object of type list at run time | [[Term]] | [[Core|OTX Core library]] | [[Creation terms]] | - | [[CoreChk034|Core_Chk034]]<br/>[[CoreChk036|Core_Chk036]]}} | + | {{ClassificationActivity | ListCreate | Creates a new object of type list at run time | [[Term]] | [[Core|OTX Core library]] | [[Creation terms]] | - | [[Core.Validation.CoreChk034|Core_Chk034]]<br/>[[Core.Validation.CoreChk036|Core_Chk036]]}} |
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | ListTerm = ListCreate(DataType, {Term1, Term2, ...}); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 11: | Line 11: | ||
'''ListCreate''' is a term to create a new list at run time. It is produced by passing a set of elements. | '''ListCreate''' is a term to create a new list at run time. It is produced by passing a set of elements. | ||
− | {{TermReturnValue| [[List]] | The newly created list is returned.}} | + | {{TermReturnValue| [[Core.DataTypes.ComplexDataType.ContainerDataType.List|List]] | The newly created list is returned.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| ItemType | | + | {{TableRowPropertie1| ItemType | '''DataType''' | '''Name''' | - | [1] | Data type of the elements}} |
{{TableRowPropertie2| Items | - | [[Term]] | - | [1] | List of one or more elements of the list type. No elements are specified, an empty list is created.}} | {{TableRowPropertie2| Items | - | [[Term]] | - | [1] | List of one or more elements of the list type. No elements are specified, an empty list is created.}} | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | List<String> result = ListCreate(String, "text1", "text2"); | + | List<String> result; |
+ | result = ListCreate(String, {"text1", "text2"}); | ||
//Returns the result = {"text1", "text2"} | //Returns the result = {"text1", "text2"} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[MapCreate]] <br/> | + | [[Core.Terms.MapCreate|MapCreate]] <br/> |
− | [[UserExceptionCreate]] | + | [[Core.Terms.UserExceptionCreate|UserExceptionCreate]] |
Latest revision as of 08:44, 16 February 2016
Contents
Classification
Name | ListCreate |
Short Description | Creates a new object of type list at run time |
Class | Term |
Extension | OTX Core library |
Group | Creation terms |
Exceptions | - |
Checker Rules | Core_Chk034 Core_Chk036 |
Standard Compliant | Yes |
OTL Syntax
ListTerm = ListCreate(DataType, {Term1, Term2, ...});
Description
ListCreate is a term to create a new list at run time. It is produced by passing a set of elements.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
List | The newly created list is returned. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
ItemType | DataType | Name | - | [1] | Data type of the elements |
Items | - | Term | - | [1] | List of one or more elements of the list type. No elements are specified, an empty list is created. |
OTL Examples
List<String> result;
result = ListCreate(String, {"text1", "text2"});
//Returns the result = {"text1", "text2"}