Datasheet

CONVERSIONS LIBRARY
mikroBasic PRO for AVR Conversions Library provides routines for numerals to strings and
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
The following sub functions convert decimal values to BCD and vice versa:
- Dec2Bcd
- Bcd2Dec16
- Dec2Bcd16
ByteToStr
478
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure ByteToStr(dim input as word, dim byref output as
string[2])
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.
Parameters :
-
input: byte to be converted
- output: destination string
Requires Nothing.
Example
dim t as word
txt as string[2]
...
t = 24
ByteToStr(t, txt) ' txt is " 24" (one blank here)