The following statement declares the external function TEMP in PocketBuilder. This function returns an integer and expects an integer argument to be passed by reference:
FUNCTION int TEMP(ref int degree) LIBRARY "LibName.DLL"
The same statement in C would be:
int _stdcall TEMP(int * degree)
Since the argument is passed by reference, the function can
change the contents of the argument, and changes made to the argument
within the function will directly affect the value of the original
variable in PocketBuilder. For example, the C statement *degree = 75
would
change the argument named degree to 75 and return 75 to PocketBuilder.
The following statement declares the external function TEMP2 in PocketBuilder. This function returns an integer and expects an integer argument to be passed by value:
FUNCTION int TEMP2(int degree) LIBRARY "LibName.DLL"
The same statement in C would be:
int _stdcall TEMP2(int degree)
Since the argument is passed by value, the function can change the contents of the argument. All changes are made to the local copy of the argument; the variable in PocketBuilder is not affected.