$ cc/object=zz sys$input
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <descrip.h>

void testi1(int i)
{
   printf("i=%d\n",i);
   return;
}

void testi2(int *i)
{
   printf("i=%d\n",*i);
   return;
}

int globi;

void testi3()
{
   printf("i=%d\n",globi);
   return;
}

void testx1(float x)
{
   printf("x=%f\n",x);
   return;
}

void testx2(float *x)
{
   printf("x=%f\n",*x);
   return;
}

float globx;

void testx3()
{
   printf("x=%f\n",globx);
   return;
}

void tests1(char *s)
{
   printf("s=%s\n",s);
   return;
}

void tests2(struct dsc$descriptor *s)
{
   int l;
   char *tmp;
   l = s->dsc$w_length;
   tmp = malloc(l+1);
   memcpy(tmp,s->dsc$a_pointer,l);
   tmp[l] = '\0';
   printf("s=%s\n",tmp);
   free(tmp);
   return;
}

$
$ pascal/object=z sys$input
program z(input,output);

[external] procedure testi1(%IMMED i:integer); external;
[external] procedure testi2(%REF i:integer); external;
[external] procedure testi3; external;
[external] procedure testx1(%IMMED x:real); external;
[external] procedure testx2(%REF x:real); external;
[external] procedure testx3; external;
[external] procedure tests1(%REF s:packed array [i1..i2:integer] of char);external;
[external] procedure tests2(%STDESCR s:packed array [i3..i4:integer] of char);external;

var
   i : [COMMON(globi)] integer;
   x : [COMMON(globx)] real;

begin
   testi1(123);
   testi2(123);
   i:=123;
   testi3;
   testx1(123.456);
   testx2(123.456);
   x:=123.456;
   testx3;
   tests1('Hello'+chr(0));
   tests2('Hello');
end.
$
$ if f$getsyi("HW_MODEL") .lt. 1024
$ then
$ link z+zz+sys$input/opt
sys$share:vaxcrtl/share
$
$ else
$ link z+zz
$ endif
$ run z
$ exit
