![Advantech UbiQ User Manual Download Page 71](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809071.webp)
65
UbiQ Scenario Manager User Manual
Chapter 5
Functions
Reference
5.2.9
ftoa
Syntax
int ftoa(double fValue, char* pDest, int nPrecision)
Parameters
FValue: the double value will be converted
pDest: Specifies the Destination array
nPrecision: Specifies the number of digits to be stored after the decimal point.
Description
This function returns the actually length of the converted string.
Example
// The example will convert a double to string and show them
char pDest[20]; // declare pDest as char[20]
dobuble fValue;
int nLen;
setdebug(TRUE);
fValue=23.4567
nLen=ftoa(fValue,pDest,3);
debug(“ftoa(“,fValue,”pDest,3)=”,pDest); It will show “ftoa(23.4567, pDest,
3)=23.457
See Also
itoa, atoi, atof, atoh
5.2.10
GetScenarioReg
Syntax
int GetScenarioReg (int nChanneNol, int nPageNo)
Parameters
nChannelNo: Specifies the index of current scenario items, the value is from 0
to 20.
nPageNo: Specifies a given index of the display page, the value is from 0 to
2.
Description
This function returns the value of the current scenario registry by the given item
and page index.
Example
Int nV;
// Get the current scenario registry for item 1 and page 0
nV=GetScenarioReg(1,0);
See Also
SetScenarioInit
Summary of Contents for UbiQ
Page 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Page 4: ...UbiQ Scenario Manager User Manual iv...
Page 7: ...Chapter 1 1 Introduction...
Page 13: ...Chapter 2 2 Getting Started...
Page 37: ...Chapter 3 3 Tutorials...
Page 47: ...Chapter 4 4 Basic of Smart C Script Language...
Page 62: ...UbiQ Scenario Manager User Manual 56...