After I posted my question I wondered if this is more of a compiler question
than a Palm OS question.  Further checking in a third C book explained
things very clearly.  It said that older versions of C required you to pass
a pointer to a structure. Newer versions of C will let you pass an instance.
I got my code working now, so the impetus for resolving my original question
has diminished.

> -----Original Message-----
> From: Creative Digital Publishing Inc. [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, June 11, 1999 4:34 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: structures as arguments
> 
> >One says I can pass an instance of a structure, the other says I
> >can't and I should pass a pointer instead.
> 
> This is not my strong suit, so caveat emptor. As far as I know, you _can_
> pass a structure, but I believe it gets put on the stack. If it's other
> than tiny, you're courting stack overflow disaster, somehow, somewhere.
> 
> >What rule does Palm OS apply with regard to passing structures in
> functions?
> 
> None as far as I know, at least hadr and fast, but generally, the Palm OS
> functions look for pointers to structures.
> 
> Regards,
> Steve Mann
> 
> -------------------------------------------
> Creative Digital Publishing Inc.
> 1317 Palm Street, San Luis Obispo, CA 93401-3117
> -------------------------------------------
> 805.788.0138              805.593.3811 (fax)
> [EMAIL PROTECTED]       http://www.cdpubs.com
> 
> 

Reply via email to