Application Development Guide


Language Restrictions for C and C++

The following sections describe the C/C++ language restrictions.

Trigraph Sequences for C and C++

Some characters from the C or C++ character set are not available on all keyboards. These characters can be entered into a C or C++ source program using a sequence of three characters called a trigraph. Trigraphs are not recognized in SQL statements. The precompiler recognizes the following trigraphs within host variable declarations:

Trigraph
Definition

??(
Left bracket '['

??)
Right bracket ']'

??<
Left brace '{'

??>
Right brace '}'

The remaining trigraphs listed below may occur elsewhere in a C or C++ source program:

Trigraph
Definition

??=
Hash mark '#'

??/
Back slash '\'

??'
Caret '^'

??!
Vertical Bar '|'

??-
Tilde '~'

C++ Type Decoration Consideration

When writing a stored procedure or a UDF using C++, you may want to consider declaring the procedure or UDF as:

     extern "C" ...procedure or function declaration...

The extern "C" prevents type decoration of the function name by the C++ compiler. Without this declaration, you have to include all the type decoration for the function name when you call the stored procedure, or issue the CREATE FUNCTION statement.


[ Top of Page | Previous Page | Next Page ]