Difference between revisions of "Core.Terms.ToString"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | ToString | To convert an expression to a String | Term | OTX Core library | Conversion terms...") |
|||
Line 5: | Line 5: | ||
== Pseudo-Code Syntax == | == Pseudo-Code Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | StringTerm = Conversion.ToString(Term); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 37: | Line 37: | ||
== Examples == | == Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | 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); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:49, 3 February 2015
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);