Shop OBEX P1 Docs P2 Docs Learn Events
C: Solution Needed - Page 2 — Parallax Forums

C: Solution Needed

2»

Comments

  • Heater.Heater. Posts: 21,230
    edited 2015-04-09 09:30
    Is there any benefit to a memcpy?
    Oh yes. One can pass structs into functions as parameters. You can return structs from functions in return values. Just like any char, int, etc value.
    my_struct_t func (my_struct_t a, my_struct_t b)
    {
        // Bla bla
        
        my_struct_t result = whatever....
        return result;
    }
    
    That's OK until the structs get big, then there is a lot of copying into parameters and results getting compiled in there. Shall we say slow.

    Hence we normally pass pointers to structs. Hence we can end up using memcpy.

    But not always. Why not: *aPtr = *bPtr for example.
  • idbruceidbruce Posts: 6,197
    edited 2015-04-09 09:43
    Okay, I will try to get by on what was discussed here, but be forewarned, if I get warnings or errors, I'll be back :)
  • GenetixGenetix Posts: 1,754
    edited 2015-04-09 10:17
    idbruce wrote: »
    Post deleted. Might as well delete the whole thread..... Everytime I recommend something... Someone always shoots the idea down... I don't know why I waste my thoughts

    Some people are in your face about things but you take criticism too personally.
    Sometimes you are wrong about things, don't understand them correctly, or too narrowly focused on what you consider to be the ideal solution.

    That's the way you are and most people try to be helpful but you can be a pain about it.
    You do some interesting stuff so we tolerate it.

    Others are equal opportunity button-pressers. :P
  • idbruceidbruce Posts: 6,197
    edited 2015-04-09 10:37
    Genetix
    Some people are in your face about things but you take criticism too personally.
    Sometimes you are wrong about things, don't understand them correctly, or too narrowly focused on what you consider to be the ideal solution.

    That's the way you are and most people try to be helpful but you can be a pain about it.

    GUILTY
    You do some interesting stuff so we tolerate it.

    Yea, I think I do some interesting stuff, so thank you. I am also fairly tolerant of others. Gettting better with age :) Just imagine if I ever intended to be annoying, like some folks :)
    Others are equal opportunity button-pressers.

    In all the years that I have been here, I have MAYBE reported five posts. I never really cared for snitches or brownies.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-04-09 11:42
    I could live off brownies

    BLood-Orange-Brownies-photo-courtesy-of-gourmet.com-rs_juneweb_brownies608image.jpg
  • Dave HeinDave Hein Posts: 6,347
    edited 2015-04-09 11:49
    Bruce, I guess you're not a fan of quidditch either.
    Golden_Snitch.gif
  • idbruceidbruce Posts: 6,197
    edited 2015-04-09 12:24
    Dave and Dave

    Okay, those brownies look good....

    Are you referring to the broom flying sport? If so, that's a bit to risky for me. I will remain a spectator.
  • GenetixGenetix Posts: 1,754
    edited 2015-04-09 12:30
    Bruce, surprisingly Heater has been well behaved lately.

    Dave, Ni Ni Ni and What's the airspeed velocity of an un-laden (stupid spell check) swallow?
Sign In or Register to comment.