![Advantech UbiQ User Manual Download Page 68](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809068.webp)
UbiQ Scenario Manager User Manual
62
5.2.3
atoi
Syntax
int atoi(char* pDest) or
int atoi(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.
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=”2310”;
nI=atoi(pChar);
debug(“atoi(“,pChar,)=”,nI); // It will show “atoi(2310)=2310”
See Also
itoa, ftoa, atof, atoh
5.2.4
close
Syntax
void close(int hFile)
Parameters
hFile: Specifies the handle referring to open file
Description
This function closes the file associated with handle.
Example
int hFile;
hFile=open(“\\Flash Storage\\template.txt”, FILE_CREATE_RW);
setdebug(TRUE);
if (hFile==0) {
debug(“Open file failed!”);
}
else {
// process the file
close(hFile); // close the file
}
See Also
open, read, write, seek, readln, writeln, filecopy, eof
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...