Hi all,
I am developing a dll in PowerBasic, that is intended to be used by PB apps (of course), but also by every thinkable programming language that can call a 32 bits dll.
Most of the functions parameters, exported by that dll, are LONG variables, some are dynamic strings.
This is simular to my HIME.dll where most of the function input parameters are LONG variables, passed BYREF.
If new customers of mine (non PB programmers) need support getting started with HIME, most of the time it is because they are 'struggling' with the fact that the function parameters are passed BYREF.
The design decision to pass the parameters byref was made years ago and I even can't remember exactly why I chose it. Possibly because it was the PB default way and it seemed more efficient to me.
But with this new dll I am working on, I can make that decision again: BYREF or BYVAL. It seems that, for most other programming languages other than PB, passing function parameters BYVAL seems 'easier' to do. Or atleast, those programmers seem more comfortable with it than with passing parameters byref.
When calling such a dll from PB it hardly makes a difference at all so let's keep that aside.
Do you have an opinion about this ? Either as a PB programmer writing dll's to be used by other programming languages or either as a programmer that (occasionally) programs in other languages besides PB.
What would you prefer ? BYREF or BYVAL .
Kind regards
I am developing a dll in PowerBasic, that is intended to be used by PB apps (of course), but also by every thinkable programming language that can call a 32 bits dll.
Most of the functions parameters, exported by that dll, are LONG variables, some are dynamic strings.
This is simular to my HIME.dll where most of the function input parameters are LONG variables, passed BYREF.
If new customers of mine (non PB programmers) need support getting started with HIME, most of the time it is because they are 'struggling' with the fact that the function parameters are passed BYREF.
The design decision to pass the parameters byref was made years ago and I even can't remember exactly why I chose it. Possibly because it was the PB default way and it seemed more efficient to me.
But with this new dll I am working on, I can make that decision again: BYREF or BYVAL. It seems that, for most other programming languages other than PB, passing function parameters BYVAL seems 'easier' to do. Or atleast, those programmers seem more comfortable with it than with passing parameters byref.
When calling such a dll from PB it hardly makes a difference at all so let's keep that aside.
Do you have an opinion about this ? Either as a PB programmer writing dll's to be used by other programming languages or either as a programmer that (occasionally) programs in other languages besides PB.
What would you prefer ? BYREF or BYVAL .
Kind regards
Comment