![Advantech UbiQ User Manual Download Page 49](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809049.webp)
43
UbiQ Scenario Manager User Manual
Chapter 4
B
asic of
Smart-C
S
cript
Language
The interpreter also supports single-line comments preceded by two forward slashes
(//). Comments beginning with two forward slashes (//) are terminated by the next
newline character that is not preceded by an escape character.
printf( "Hello\n" ); // Comments can go here
4.1.3
Keywords
“Keywords” are words that have special meaning to the C interpreter. An identifier
cannot have the same spelling and case as a C keyword. The Smart-C language
uses the following keywords:
You cannot redefine keywords.
4.1.4
Constants
A “constant” is a number, character, or character string that can be used as a value in
a program. Use constants to represent floating-point, integer, enumeration, or char-
acter values that cannot be modified.
Syntax
constant :
floating-point-constant
integer-constant
character-constant
Constants are characterized by having a value and a type.
4.1.5
Hex-decimal Integer Constant
Syntax
Hex-decimal-constant:
0xHex-Integer Opt or
0XHex-Integer Opt
4.1.6
String literals
A “string litera” is a sequence of characters from the source character set enclosed in
double quotation marks (" ") or single quotation marks (°Æ°Ø). String literals are
used to represent a sequence of characters which, taken together, form a null-termi-
nated string.
Syntax
string-literal :
"char-sequence opt" or
‘char-sequence opt’
The backslash (\) must be followed with a second backslash (\\) when it appears
within a string.
4.1.7
Punctuation and special characters
The punctuation and special characters in the C character set have various uses,
from organizing program text to defining the tasks that program carries out. They do
not specify an operation to be performed.
break
char
continue
do
double
else
if
for
int
return
string
variant
while
void
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...