Previous | Contents | Index |
Time Manipulation Functions
double difftime(time_t time1, time_t time0);
time_t mktime(struct tm *timeptr);
This section summarizes the syntax of the C language, using the syntax of the ANSI C Standard. Syntactic categories are indicated with bold type, and literal words or characters are indicated with monospaced, nonitalicized type. A colon following a syntactic category introduces its definition. Alternative definitions are listed on separate lines, or are prefaced by the words "one of." An optional element is indicated by the subscript opt. For example, the following line indicates an optional expression enclosed in braces:
{ expressionopt } |
The section numbers shown in parentheses refer to the section of the American National Standard for Information Systems-Programming Language C (document number: X3.159-1989) that discusses that part of the language.
A.1.1 Lexical Grammar
A.1.1.1 Tokens
token: (§3.1)
|
preprocessing-token: (§3.1)
|
A.1.1.2 Keywords
keyword: (§3.1.1) one of
|
auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while |
A.1.1.3 Identifiers
identifier: (§3.1.2)
|
nondigit: §3.1.2 one of
|
a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ |
digit: (§3.1.2) one of
|
0 1 2 3 4 5 6 7 8 9 |
A.1.1.4 Constants
constant: (§3.1.3)
|
floating-constant: (§3.1.3.1)
|
fractional-constant: (§3.1.3.1)
|
exponent-part: (§3.1.3.1)
|
sign: (§3.1.3.1) one of
|
digit-sequence: (§3.1.3.1)
|
floating-suffix: (§3.1.3.1) one of
|
integer-constant: (§3.1.3.2)
|
decimal-constant: (§3.1.3.2)
|
octal-constant: (§3.1.3.2)
|
hexadecimal-constant: (§3.1.3.2)
|
nonzero-digit: (§3.1.3.2) one of
|
1 2 3 4 5 6 7 8 9 |
octal-digit: (§3.1.3.2) one of
|
0 1 2 3 4 5 6 7 |
hexadecimal-digit: (§3.1.3.2) one of
|
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F |
integer-suffix: (§3.1.3.2)
|
unsigned-suffix: (§3.1.3.2) one of
|
long-suffix: (§3.1.3.2) one of
|
enumeration-constant: (§3.1.3.3)
|
character-constant: (§3.1.3.4)
|
c-char-sequence: (§3.1.3.4)
|
c-char: (§3.1.3.4)
|
escape-sequence: (§3.1.3.4)
|
simple-escape-sequence: (§3.1.3.4) one of
|
\' \" \? \\ \a \b \f \n \r \t \v |
octal-escape-sequence: (§3.1.3.4)
|
hexadecimal-escape-sequence:(§3.1.3.4)
|
A.1.1.5 String Literals
string-literal: (§3.1.4)
|
s-char-sequence: (§3.1.4)
|
s-char: (§3.1.4)
|
A.1.1.6 Operators
operator: (§3.1.5) one of
|
[ ] ( ) . -> ++ -- & * + - ~ ! sizeof / % << >> < > <= >= == != ^ | && || ? : = *= /= %= += -= <<= >>= &= ^= |= , # ## |
A.1.1.7 Punctuators
punctuator: (§3.1.6) one of
|
[ ] ( ) { } * , : = ; ... # |
A.1.1.8 Header Names
header-name: (§3.1.7)
|
h-char-sequence: (§3.1.7)
|
h-char: (§3.1.7)
|
q-char-sequence: (§3.1.7)
|
q-char: (§3.1.7)
|
A.1.1.9 Preprocessing Numbers
pp-number: (§3.1.8)
|
A.1.2 Phrase Structure Grammar
A.1.2.1 Expressions
primary-expression: (§3.3.1)
|
postfix-expression: (§3.3.2)
|
argument-expression-list: (§3.3.2)
|
unary-expression: (§3.3.3)
|
unary-operator: (§3.3.3) one of
|
& * + - ~ ! |
cast-expression: (§3.3.4)
|
multiplicative-expression: (§3.3.5)
|
additive-expression: (§3.3.6)
|
shift-expression: (§3.3.7)
|
relational-expression: (§3.3.8)
|
equality-expression: (§3.3.9)
|
AND-expression: (§3.3.10)
|
exclusive-OR-expression: (§3.3.11)
|
inclusive-OR-expression: (§3.3.12)
|
logical-AND-expression: (§3.3.13)
|
logical-OR-expression: (§3.3.14)
|
conditional-expression: (§3.3.15)
|
assignment-expression: (§3.3.16)
|
assignment-operator: (§3.3.16) one of
|
= *= /= %= += -= <<= >>= &= ^= |= |
expression: (§3.3.17)
|
constant-expression: (§3.4)
|
A.1.2.2 Declarations
declaration: (§3.5)
|
declaration-specifiers: (§3.5)
|
init-declarator-list: (§3.5)
|
init-declarator: (§3.5)
|
storage-class-specifier: (§3.5.1)
|
type-specifier: (§3.5.2)
|
|
struct-or-union-specifier: (§3.5.2.1)
|
struct-or-union: (§3.5.2.1)
|
struct-declaration-list: (§3.5.2.1)
|
struct-declaration: (§3.5.2.1)
|
specifier-qualifier-list: (§3.5.2.1)
|
Previous | Next | Contents | Index |