This documentation is out of date.
The new version of the documentation is here: https://cannylogic.com/docs |
Difference between revisions of "ASCII to Integer"
[unchecked revision] | [unchecked revision] |
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
<div style="float:right;margin:5px;"> | <div style="float:right;margin:5px;"> | ||
Line 18: | Line 19: | ||
!colspan="2" style="background-color:#AFEEEE;"|Inputs | !colspan="2" style="background-color:#AFEEEE;"|Inputs | ||
|- | |- | ||
− | |style="padding-left:1em;"| | + | |style="padding-left:1em;"|Characters 1 & 0: |
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[#NotesПримечания|A pair of ASCII characters]] |
|- | |- | ||
|style="padding-left:1em;"|... | |style="padding-left:1em;"|... | ||
|style="padding-left:1em;"|... | |style="padding-left:1em;"|... | ||
|- | |- | ||
− | |style="padding-left:1em;"| | + | |style="padding-left:1em;"|Characters 15 & 14: |
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[#NotesПримечания|A pair of ASCII characters]] |
|- | |- | ||
|style="padding-left:1em;"|Основание: | |style="padding-left:1em;"|Основание: | ||
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[CFD Language#Data|Integer]] |
|- | |- | ||
!colspan="2" style="background-color:#AFEEEE;"|Outputs | !colspan="2" style="background-color:#AFEEEE;"|Outputs | ||
|- | |- | ||
|style="padding-left:1em;"|Number: | |style="padding-left:1em;"|Number: | ||
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[CFD Language#Data|Integer]] |
|- | |- | ||
!colspan="2" style="background-color:#AFEEEE;"|Version [[CANNY Lab]] | !colspan="2" style="background-color:#AFEEEE;"|Version [[CANNY Lab]] | ||
Line 88: | Line 89: | ||
[[Integer to ASCII]] | [[Integer to ASCII]] | ||
− | [[ | + | [[Built-in_Function_Blocks | Built-in Function Blocks]] |
Revision as of 21:57, 19 November 2015
Appearance | |
---|---|
Изображение:5_10_5_2.png | |
Symbol | |
ATOI | |
Group | |
Converters | |
Inputs | |
Characters 1 & 0: | A pair of ASCII characters |
... | ... |
Characters 15 & 14: | A pair of ASCII characters |
Основание: | Integer |
Outputs | |
Number: | Integer |
Version CANNY Lab | |
from 1.8 |
Converts the string representation of a number for a given base 2, 10 or 16 in to a numeric value.
The original string must contain, valid in the selected numeral system, characters on the positions: 0..15, 11..15 or 12..15 for a given bases 2, 10 and 16, respectively.
Features
Symbols, which set outside of these position ranges, discarded.
In case of invalid characters presence on inputs, the value of the output will be set to 0.
In the case of using an invalid base value output value will be set to 0.
Examples
Notes
With the release of CANNY Lab version 1.8 a new data presentation added - "A pair of characters" in which the values are represented by two characters ASCII with the codes given by high and low bytes of displaying 16-bit value .
For example, the decimal number 19778 corresponding hexadecimal 0x4B4E, displayed a pair of characters «KN», having ASCII-code 0x4B, and 0x4E respectively.