Discussions related to Visual Prolog
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

[byval] attribute

Unread post by Peter Muraya »

Hi Thomas,
I understand what the [in] and [out] attributes do in predicate arguments, but not [byval]. What does it mean and how would I use it?
Mutall Data Management Technical Support
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

As the language reference states about byVal:
An argument is transferred directly on the stack rather than using a pointer.
If that doesn't mean anything to you, then you shouldn't use it ;-).

It is not intended for normal programming.

It is only intended for interfacing to foreign code (like the Windows API), and has to do with confirming to such foreign codes calling conventions. You will notice that it can only be used in combination with foreign calling conventions stdcall, apicall and c.
Regards Thomas Linder Puls
PDC
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Unread post by Peter Muraya »

Thank you Thomas.
Mutall Data Management Technical Support
Post Reply