1. more on wrapping c routines ( call by value )

hello yet again everyone,

im still working on leftsock and ive come to a problem that i am unsure about.
it involes wrapping "C" routines that have a parameter that is "call by value".
how should i handle this in Euphoria? after i:

c_func( name_, { pass_by_value, pass_by_ref } )

does the value of "pass_by_value" just change or what? i know there was a long
thread about call by value on this list just a short time ago but i did not
read any of it.... perhaps i should check the archive? was anything of this
nature disgust already?

any help would be appreciated.

i know it seems im asking so many stupid question about wrapping stuff but
this is my first attempt at wrapping any routines whatsoever.

--
cense
a member of the
ak-software development team
http://www.ak-software.com/

contract work for
Web Velocity IT inc.
http://www.webvelocity.ca/

new topic     » topic index » view message » categorize

2. Re: more on wrapping c routines ( call by value )

On Sat, 19 Aug 2000 23:15:54 -0600, cense <cense at MAIL.RU> wrote:

>hello yet again everyone,
>
>im still working on leftsock and ive come to a problem that i am unsure
about.
>it involes wrapping "C" routines that have a parameter that is "call by
value".
>how should i handle this in Euphoria? after i:

>
>c_func( name_, { pass_by_value, pass_by_ref } )
>

   cense:

   Don't try to make things too complicated for yourself.

   pass_by_value just means to pass a value ( or a number )

   pass_by_ref just means to pass the address ( a pointer ) of some memory

   location of data ( which has been allocated ) that is need by the C

   function.

   In other words you are passing the actual VALUE ( by_value )

   or a POINTER ( by_ref ) to some allocated data.


  Bernie

new topic     » goto parent     » topic index » view message » categorize

3. Re: more on wrapping c routines ( call by value )

On Sun, 20 Aug 2000, Bernie wrote:
>    cense:
>
>    Don't try to make things too complicated for yourself.
>
>    pass_by_value just means to pass a value ( or a number )
>
>    pass_by_ref just means to pass the address ( a pointer ) of some memory
>
>    location of data ( which has been allocated ) that is need by the C
>
>    function.
>
>    In other words you are passing the actual VALUE ( by_value )
>
>    or a POINTER ( by_ref ) to some allocated data.
>
>
>   Bernie

Ya, i know. i was *VERY* confused about C/C++ programming when i wrote that
message. Ive been programming in C/C++ for 3 years and i mixed up all that call
by value and call by reference stuff. shit. i should really pull out the old
C++ book and get some things strait in my head again.

sorry about all that confusion. Thanks for straitening my out Bernie and Wolf!

--
cense
a member of the
ak-software development team
http://ak-software.virtualave.net/

contract work for
Web Velocity IT inc.
http://www.webvelocity.ca/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu