Re: [cc65] returning structs

From: Groepaz <groepaz1gmx.net>
Date: 2009-08-10 04:51:02
On Montag 10 August 2009, Scott Hutter wrote:
> Well, its not as pretty as returning a struct by value, but here's
> something of what I did:  I created a struct in the main function, then
> sent it into another function by reference (pointer).  Made the changes
> inside the function, which of course then were available back in the main
> function.
>
> Id like to see an example though of what you're refering to though.  If Im
> reading you right, it seems that when you return from the called function,
> the data would be lost since the called function's struct is local to that
> function.

a reference would indeed be nice, since there probably is a way to do what you 
want cleanly without needing to return a struct by value. (i dont think i 
have ever done so in the past 10 years or so =P)

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

If I have not seen as far as others, it is because giants were standing on my 
shoulders. 
<Hal Abelson>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Aug 10 04:50:38 2009

This archive was generated by hypermail 2.1.8 : 2009-08-10 04:50:40 CEST