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

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
ArneOrtlinghaus
Posts: 384
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

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

Post 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#?
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

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

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply