Difference between revisions of "Core.Terms.ToString"
Jump to navigation
Jump to search
m (Hb moved page ToString to Core.Terms.ToString: #3153) |
|||
Line 1: | Line 1: | ||
− | [[Category:Core]] | + | {{DISPLAYTITLE:OTX '''ToString'''}}[[Category:Core]] |
== Classification == | == Classification == | ||
{{ClassificationActivity | ToString | To convert an expression to a String | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} | {{ClassificationActivity | ToString | To convert an expression to a String | [[Term]] | [[Core|OTX Core library]] | [[Conversion terms]] | - | - }} | ||
Line 11: | Line 11: | ||
Term to the convert an expression to a String. | Term to the convert an expression to a String. | ||
− | {{TermReturnValue| [[String]] | Return value of the appropriate type.}} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.String|String]] | Return value of the appropriate type.}} |
== Rules == | == Rules == | ||
Line 25: | Line 25: | ||
*: Returns a copy of the value | *: Returns a copy of the value | ||
* '''List''' | * '''List''' | ||
− | *: Returns the list in the form of a [[ListLiteral]]s , for example: "{1, 2, 3} '. | + | *: Returns the list in the form of a [[Core.Terms.ListLiteral|ListLiteral]]s , for example: "{1, 2, 3} '. |
* '''Map''' | * '''Map''' | ||
− | *: Returns the map in the form of a [[MapLiteral]]s , for example: "{{key1, 1}, {key2, 2}, {key9, 123}}" | + | *: Returns the map in the form of a [[Core.Terms.MapLiteral|MapLiteral]]s , for example: "{{key1, 1}, {key2, 2}, {key9, 123}}" |
== Properties == | == Properties == | ||
Line 49: | Line 49: | ||
== See also == | == See also == | ||
− | [[ToBoolean]] <br/> | + | [[Core.Terms.ToBoolean|ToBoolean]] <br/> |
− | [[ToInteger]] <br/> | + | [[Core.Terms.ToInteger|ToInteger]] <br/> |
− | [[ToFloat]] <br/> | + | [[Core.Terms.ToFloat|ToFloat]] <br/> |
− | [[ToByteField]] | + | [[Core.Terms.ToByteField|ToByteField]] |
Revision as of 03:31, 5 February 2016
Contents
Classification
Name | ToString |
Short Description | To convert an expression to a String |
Class | Term |
Extension | OTX Core library |
Group | Conversion terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
Pseudo-Code Syntax
StringTerm = Conversion.ToString(Term);
Description
Term to the convert an expression to a String.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
String | Return value of the appropriate type. |
Rules
- Boolean
- Returns "true" if true , otherwise "false"
- Integer
- Returns a decimal number as a string
- Float
- Returns the floating-point number as a string with a "." (Point) as the decimal separator.
- ByteField
- Returns an interpretation of the ByteFields to UTF-8
- String
- Returns a copy of the value
- List
- Returns the list in the form of a ListLiterals , for example: "{1, 2, 3} '.
- Map
- Returns the map in the form of a MapLiterals , for example: "{{key1, 1}, {key2, 2}, {key9, 123}}"
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Term | - | Term | - | [1] | The expression to be converted. Rules, see description. |
Examples
String String1;
String String2;
String String3;
String String4;
String1 = Conversion.ToString(true);
String2 = Conversion.ToString("1234");
String3 = Conversion.ToString(123.456);
String4 = Conversion.ToString(&18 00 FF FF);