Mikroelektronika MIKROE-742 데이터 시트
Conversions Library
mikroPascal PRO for AVR Conversions Library provides routines for numerals to strings and
BCD/decimal conversions.
BCD/decimal conversions.
Library Routines
You can get text representation of numerical value by passing it to one of the following routines:
- ByteToStr
- ShortToStr
- WordToStr
- IntToStr
- LongintToStr
- LongWordToStr
- FloatToStr
- ShortToStr
- WordToStr
- IntToStr
- LongintToStr
- LongWordToStr
- FloatToStr
The following functions convert decimal values to BCD and vice versa:
- Dec2Bcd
- Bcd2Dec16
- Dec2Bcd16
- Bcd2Dec16
- Dec2Bcd16
ByteToStr
486
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure ByteToStr(input : word; var output : array[3] of char)
Returns
Nothing.
Description
Converts input byte to a string. The output string is right justified and remaining
positions on the left (if any) are filled with blanks.
positions on the left (if any) are filled with blanks.
Parameters :
-
input
: byte to be converted
-
output
: destination string
Requires
Nothing.
Example
var t : word;
txt :
array[3] of char;
...
t := 24;
ByteToStr(t, txt); // txt is " 24" (one blank here)
ByteToStr(t, txt); // txt is " 24" (one blank here)