> Sorry for asking a basic programming question on this forum but it is
> relevant that I ask fellow Palm programmers. I have two "C" books with
> conflicting information regarding passing a structure as an argument in a
> function. One says I can pass an instance of a structure, the other says I
> can't and I should pass a pointer instead. I'm having problems with some
> code I am writing that involves structures so I would like to get this
> clarified before I go much further.
>
I'd have to look it up in K&R for sure, but I'm pretty sure structs
would be passed by value on the stack, which would be a bad thing if the
structure were very large. I'd pass a pointer to the struct instead, unless
it was imperative that it was passed by value.
--
Dan Rowley
Innovative Computer Solutions
Developers of fine software for Newton, Windows CE, Palm Computing Platform,
Windows, and MacOS