![background image](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809080.webp)
UbiQ Scenario Manager User Manual
74
Example
// The example will show the messages in the debug window
char pChar[20]; // declare pChar as char[20]
double f1; // declare f1 as double
int nI;
string aStr;
char pBuf[30];
f1=2.789;
nI=120;
pBuf=”Test Printf”;
aStr=”Test printf 2”;
setdebug(TRUE);
printf(“The f1=%f, nI=%d, pBuf=%s, aStr=%s”,f1,nI,pBuf,aStr);
See Also
sprintf, debug, setdebug, getenv
e, E
The precision specifies the num-
ber of digits to be printed after the
decimal point. The last printed
digit is rounded.
Default precision is 6; if precision is 0
or the period (.) appears without a
number following it, no decimal point
is printed.
f
The precision value specifies the
number of digits after the decimal
point. If a decimal point appears,
at least one digit appears before
it. The value is rounded to the
appropriate number of digits.
Default precision is 6; if precision is 0,
or if the period (.) appears without a
number following it, no decimal point
is printed.
g, G.
The precision specifies the maxi-
mum number of significant digits
printed.
Six significant digits are printed, with
any trailing zeros truncated
s, S
The precision specifies the maxi-
mum number of characters to be
printed. Characters in excess of
precision are not printed.
Characters are printed until a null
character is encountered.
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...