Mikroelektronika MIKROE-442 데이터 시트

다운로드
페이지 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
669
LongWordToHex
Prototype
sub  procedure  LongWordToHex(dim  input  as  longword,  dim  byref  output  as 
string[8])
Description Converts input number to a string containing the number’s hexadecimal representation. The output 
string is right justified and remaining positions on the left (if any) are filled with zeros.
Parameters 
input
: double word number to be converted  
output
: destination string 
Returns
Nothing.
Example
dim input as longword 
    txt as string[8]
input = 65535
LongWordToHex(input, txt)    ‘ txt is “0000FFFF”
Notes
None.
LongIntToHex
Prototype
sub  procedure  LongIntToHex(dim  input  as  longint,  dim  byref  output  as 
string[8])
Description Converts input number to a string containing the number’s hexadecimal representation. The output 
string is right justified and remaining positions on the left (if any) are filled with zeros.
Parameters 
input
: longint number to be converted 
output
: destination string 
Returns
Nothing.
Requires
Nothing.
Example
dim input as longint 
    txt as string[8]
input = -2147483648
LongIntToHex(input, txt)    ‘ txt is “80000000”
Notes
None.