Difference between revisions of "Core.Terms.GetBit"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | GetBit | Value a bit at a specified position in the ByteField | Term | OTX Core library | Byte...") |
|||
Line 3: | Line 3: | ||
{{ClassificationActivity | GetBit | Value a bit at a specified position in the ByteField | [[Term]] | [[Core|OTX Core library]] | [[ByteField operations]] | - | - }} | {{ClassificationActivity | GetBit | Value a bit at a specified position in the ByteField | [[Term]] | [[Core|OTX Core library]] | [[ByteField operations]] | - | - }} | ||
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | BooeleanValue = ByteField.GetBit(ByteFieldTerm, IntegerTerm, IntegerTerm); | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 25: | Line 25: | ||
== Examples == | == Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | Boolean result = GetBit(&1234, 1, 1) | + | Boolean result; |
+ | result = ByteField.GetBit(&1234, 1, 1); | ||
//Returns result = false | //Returns result = false | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 06:52, 4 February 2015
Contents
Classification
Name | GetBit |
Short Description | Value a bit at a specified position in the ByteField |
Class | Term |
Extension | OTX Core library |
Group | ByteField operations |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooeleanValue = ByteField.GetBit(ByteFieldTerm, IntegerTerm, IntegerTerm);
Description
GetBit is a term, which returns true as a result, if the bit at the corresponding position in the ByteField has the value 1, otherwise false .
![]() |
Important: Please keep in mind that this TermActivity in the form of an activity exists and no text can be entered. According to the respective ActionNode can further properties are added. |
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | Return of the value of the bits in the operands |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
ByteFieldTerm | ByteField | Term | - | [1] | Source ByteField |
Index | Integer | Term | - | [1] | Zero based index of the byte in the ByteField |
Position | Integer | Term | - | [1] | Zero based index of the bits in the corresponding byte |
Examples
Boolean result;
result = ByteField.GetBit(&1234, 1, 1);
//Returns result = false
See also
BitwiseAnd
BitwiseOr
BitwiseXor
BitwiseNot
ByteFieldGetSize
SubByteField