71
UbiQ Scenario Manager User Manual
Chapter 5
Functions
Reference
5.2.19
PlaySound
Syntax
void PlaySound(string sWaveFile)
Parameters
sWaveFile : Specifies the wave filename. This file needs to be a wave format. If
the filename is beginning with “\\”, then the file will be search from
root path. Otherwise, the file will be search from current application
path.
Description
This function will play a sound with specified wave file.
Example
PlaySound(“\\windows\\default.wav”);
See Also
none
5.2.20
printf
Syntax
void printf(char *pFormat,...) or
void printf(string sFormat,...)
Parameters
pFormat : Specifies the Null-end character array format to show on the debug
window or the client of webpages
sFormat: Specifies thestring format to show on the debug window or the client
of webpages
.. : more variant variables to be added into the format string
Description
The function formats and prints a series of characters and values to the debug
window or the client of webpages. If arguments follow the format string, the for-
mat string must contain specifications that determine the output format for the
arguments.
Comments
Format specifications always begin with a percent sign (%) and are read left to
right. When printf encounters the first format specification (if any), it converts the
value of the first argument after format and outputs it accordingly. The second
format specification causes the second argument to be converted and output,
and so on. If there are more arguments than there are format specifications, the
extra arguments are ignored. The results are undefined if there are not enough
arguments for all the format specifications.
A format specification, which consists of optional and required fields, has the
following form:
%[flags] [width] [.precision] type
Each field of the format specification is a single character or a number signifying
a particular format option. The simplest format specification contains only the
percent sign and a type character (for example, %s). If a percent sign is fol-
lowed by a character that has no meaning as a format field, the character is
copied to stdout. For example, to print a percent-sign character, use %%.
Содержание 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...