FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


[byval] attribute

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
Peter Muraya



Nairobi, Kenya
Joined: 05 Dec 2012
Posts: 148

PostPosted: 23 Nov 2016 13:22    Post subject: [byval] attribute Reply with quote

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3124

PostPosted: 24 Nov 2016 12:58    Post subject: Reply with quote

As the language reference states about byVal:
Quote:
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 Wink.

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
Prolog Development Center
Back to top
View user's profile Send private message
Peter Muraya



Nairobi, Kenya
Joined: 05 Dec 2012
Posts: 148

PostPosted: 2 Dec 2016 6:23    Post subject: Reply with quote

Thank you Thomas.
_________________
Mutall Data Management Technical Support
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum