1.

What Does A Function Declared As Pascal Do Differently?

Answer»

In C, when some function is called, the parameters are put at the top of the stack. Now the order in which they are put is the order in which the parameters are parsed. Normally, the order is right to left. That is, the right most is parsed FIRST and the left most parameter is parsed at last.
If you want to alter this PARADIGM, then you have to define the function with PASCAL as FOLLOWING:
int PASCAL pascal_func(int, CHAR*, long);
Here, the left most parameter(int) will be parsed first, then char* and then long.

In C, when some function is called, the parameters are put at the top of the stack. Now the order in which they are put is the order in which the parameters are parsed. Normally, the order is right to left. That is, the right most is parsed first and the left most parameter is parsed at last.
If you want to alter this paradigm, then you have to define the function with PASCAL as following:
int PASCAL pascal_func(int, char*, long);
Here, the left most parameter(int) will be parsed first, then char* and then long.



Discussion

No Comment Found