On 3/1/06, Seth Willits <[EMAIL PROTECTED]> wrote: > On Mar 1, 2006, at 11:20 AM, Charles Yeomans wrote: > > >> Except when it can't. I don't know why, but I had a case where it > >> just completely and utterly failed. I had to make it a structure > >> when 2006 came out. > > > > I'd be interested to know what that case was. I recall that some > > functions take HIRect parameters by value; perhaps you encountered > > one of them? > > That's exactly it. I could have sworn you could pass (oh sorry, this > has nothing to do with memory blocks) fields of a structure in-line > as four parameters (in this case) but it didn't work.
You can, but you also must pass the floating-point values in the GPR registers also. That means that the 4-byte representation of a single must be passed as an Integer in the declare. E.g: dim mb as new MemoryBlock(4) mb.SingleValue(0) = 72.9 CallSomeFunction mb.Long(0) This is a behavior of the PowerPC ABI. However, you could just use structures in 2006r1 where it will just work :) -Jon -- Jonathan Johnson REAL Software, Inc. REAL World 2006, The REALbasic User's Conference <http://www.realsoftware.com/realworld> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
