Prolog: +integer C: long int x;
The C long int is converted to a 32-bit Prolog integer, which is passed to the Prolog call. If the C integer contains garbage when it is passed, Prolog will receive that garbage as an integer.
Prolog: -integer C: long int *x;
A pointer to a C long int is passed to the foreign interface. When Prolog returns a solution, a Prolog integer is expected in the corresponding argument of the call. The foreign interface converts that integer into a C long int and writes it at the location supplied. The previous contents of the location are destroyed. If the Prolog call does not return an integer in the appropriate position, a type error is raised and the contents of the location is unchanged.