Entering content frame

 Syntax of the Declare Section 

This syntax list shows you the syntax of the declaration section. The syntax notation used is BNF.

<arrdim> ::=
  <identifier>
| <unsigned_integer>

 

<chardecspec> ::=
  <storclspec>
| <chartype>
| <chardecspec> [<storclspec>]
| <chardecspec> <typespec>

 

<chartype> ::=
  char
| VARCHAR
| varchar

 

<constant> ::=
  <identifier>
| <unsigned_integer>

 

<decimaldef> ::=
  DECIMAL [<decimaltag>] [(<decimalscale>)]

 

<decimaldigits> ::=
  <identifier>
| <unsigned_integer>

 

<decimalfract> ::=
  <identifier>
| <unsigned_integer>

 

<decimalref> ::=
  DECIMAL <identifier>

 

<decimalscale> ::=
  decimaldigits
| decimaldigits,decimalfract

 

<decimaltag> ::=
  <identifier>

 

<decimaltype> ::=
  <decimaldef>
| <decimalref>

 

<declaration> ::=
  <decspec> <declist>;

 

<declarator> ::=
  <identifier>
| * <identifier>
| <declarator>
[ <arrdim> ]

 

<declist> ::=
  <possinitdec>
| <declist>,<possinitdec>

 

<decspec> ::=
  <typespec>
| <chardecspec>
| <intdecspec>
| <filedecspec>
| <floatdecspec>
| decimaltype
| <decspec> [<storclspec>]
| <decspec> <typespec>
| <longdescdecspec>

 

<expression> ::=
  <basexpr>
| <basexpr> (<expression>) <basexpr>

 

<fieldlist> ::=
  <typespec> <declist>;
| <fieldlist> <typespec> <declist>;

 

<filedecspec> ::=
  <storclspec>
| <filetype>
| <chardecspec> [<storclspec>]
| <filedecspec> <typespec>

 

<filetype> ::=
  SQLFILE
| sqlfile

 

<floatdecspec> ::=
  <storclspec>
| <floattype>
| <chardecspec> [<storclspec>]
| <floatdecspec> <typespec>

 

<floattype> ::=
  float
| long
| double

 

<initializer> ::=
  <expression>
| {<initlist>}

 

<initlist> ::=
  <initializer>
| <initlist>,<initializer>

 

<intdecspec> ::=
  <storclspec>
| <inttype>
| <chardecspec> [<storclspec>]
| <intdecspec> <typespec>

 

<inttype> ::=
  short
| long
| int
| unsigned

 

<longdescdecspec> ::=
  <storclspec>
| <longdesctype>
| <longdescdecspec> [<storclspec>]
| <longdescdecspec> <typespec>

 

<longdesctype> ::=
  SQLLongDesc
| sqllongdesc

 

<possinitdec> ::=
  <declarator>
| <declarator> = <initializer>

 

<prepcomline> ::=
  #define <identifier_constant>

 

<statement> ::=
  <prepcomline>
| <declaration>

 

<storclspec> ::=
  external
| static
| auto
| typedef

 

<structdef> ::=
  struct [<structag>] {<fieldlist>}

 

<structref> ::=
  struct <identifier>

 

<structag> ::=
  <identifier>

 

<structype> ::=
  <structdef>
| <structref>

 

<typespec> ::=
  <inttype>
| <floatptye>
| <chartype>
| <floattype>
| <decimaltype>
| <longdesctype>
| <structype>
| <identifier>
| const
| volatile

 

<unichardecspec> ::=
  <storclspec>
| <unichartype>
| <unichardecspec> [<storclspec>]
| <unichardecspec> <typespec>

 

<unichartype> ::=
  SQLUCS2
| SQLUTF16
| TCHAR
(only available for use with Unicode applications)

 

Leaving content frame