61
UbiQ Scenario Manager User Manual
Chapter 5
Functions
Reference
5.2
Support Functions
5.2.1
atof
Syntax
double atof(char* pDest) or
double atof(string sDest)
Parameters
pDest: Specifies the Null-ended character array
sDest: Specifies a string variable.
Description
This function returns the converted double value of the string.
Example
// The example will convert a string to a double value and show them
char pChar[20]; // declare pDest as char[20]
double fValue;
setdebug(TRUE);
pChar=”23.4567”;
fValue=atof(pChar);
debug(“atof(“,pChar,)=”,fValue); // It will show “atof(23.4567)=23.4567”
See Also
itoa, ftoa, atoi, atoh
5.2.2
atoh
Syntax
int atoh(char* pDest) or
int atoh(string sDest)
Parameters
pDest: Specifies the Null-ended character array
sDest: Specifies a string variable.
Description
This function returns the converted value of the string based on hexadecimal.
Example
// The example will convert a string to a integer and show them
char pChar[20]; // declare pDest as char[20]
int nI;
setdebug(TRUE);
pChar=”20A”;
nI=atoh(pChar);
debug(“atoh(“,pChar,)=”,nI); // It will show “atoh(20A)=522”
See Also
itoa, ftoa, atof, atoi
Содержание UbiQ
Страница 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Страница 4: ...UbiQ Scenario Manager User Manual iv...
Страница 7: ...Chapter 1 1 Introduction...
Страница 13: ...Chapter 2 2 Getting Started...
Страница 37: ...Chapter 3 3 Tutorials...
Страница 47: ...Chapter 4 4 Basic of Smart C Script Language...
Страница 62: ...UbiQ Scenario Manager User Manual 56...
Страница 63: ...Chapter 5 5 Functions Reference...