Differences in Linkage Specification

The figures in this section illustrate differences in linkage specification in ILE C and ILE C++. The same function is performed in the source code found in Figure 1, Figure 2, and Figure 3.

Figure 1. Example of ILE C Source Code Using the extern Linkage Specification
Module1.c

extern void foo (int *i, char **s)
{
    *s = *i ? "Not Zero" : "Zero";
}
C language only
Figure 2. Example of ILE C Source Code Using the #pragma argument Linkage Specification
Module2.c

extern void foo (int, char *);

#pragma argument (foo, VREF)

int main()

{
    char *s;
    foo (1, s);
}
C++ language only
Figure 3. Example of ILE C++ Source Code Using the extern Linkage Specification
Module3.C

extern "VREF" void foo (int i, char *s)
{
    s = i ? "Not Zero" : "Zero";
}

int main()
{
    char *s;
    foo (1, s);
}