extern alien char plm_func (int, char);
char c_func (void)
{
int i;
char c;
for (i = 0; i < 100; i++)
{
c = plm_func (i, c); /* call PL/M func */
}
return (c);
}
alien char c_func (
char a,
int b)
{
return (a * b);
}
Parameters and return values of PL/M-51 functions may be any of the following types: bit, char, unsigned char, int, and unsigned int. Other types, including long, float, and all types of pointers, can be declared in C functions with the alien type specifier. However, you should use these types with care because PL/M-51 does not directly support 32-bit binary integers or floating-point numbers.
Public variables declared in the PL/M-51 module are available to your C programs by declaring them external like you would for any C variable.