xsharp.eu • Differences between strict and pascal in "Visual objects" dialect?
Page 1 of 1

Differences between strict and pascal in "Visual objects" dialect?

Posted: Thu Mar 21, 2019 9:37 am
by ArneOrtlinghaus
Hi, we currently try to move from the Vulcan transporter to the XPorter.
Are there any differences between the attributes "strict" introduced in Vulcan as a substitution of the attribute "pascal" in VO in comparison to the attribute "pascal" in X#?

Differences between strict and pascal in "Visual objects" dialect?

Posted: Thu Mar 21, 2019 1:36 pm
by robert
Arne,
There is no real difference as far as I know. We simply support both at the parser level but we only actually generate code for the calling convention when you use _DLL FUNC or _DLL Procedure, so for Win32 API Calls. When calling managed code we do nothing with the calling convention.
In Win32 the difference is which function/method is responsible for cleaning up the stack.
If I remember correctly the STRICT calling convention, aka the C calling convention means that the caller clears the stack. This allows for a variable list of arguments. With the PASCAL calling convention the callee (the function being called) clears the stack. This works best with a fixed number of parameters.

Robert