--- Em qui, 23/10/08, Olin Lathrop escreveu: > ... > On the PIC 18 there are separate data and return address > stacks, so this is > not a issue. I didn't realize that all C functions are > allowed to be called > with different number of arguments. Is this really the > case? To me this > seems like a really brain dead choice considering that > fixed number of > ... The problem with C is that the compiler relies only on the function prototy= pes to check for argument types and number. The prototypes are usually kept= in header files ("*.h"), which are source (text) files. If the header file= is changed one can foil the compiler and say the function takes any type a= nd number of arguments he wants. Hi-Tech PICC has an interesting approach: It embeds in the object files a m= agic number (signature) that says what type and number of arguments it take= s and what type it returns. Then the linker catches such errors. Most compilers will allow you to call a function without a protype acceptin= g any arguments you give it, but then it issues a warning. Pascal has a good approach with the Units, that include together the code a= nd the prototypes for everything. Regards, Isaac Novos endere=E7os, o Yahoo! que voc=EA conhece. Crie um email novo co= m a sua cara @ymail.com ou @rocketmail.com. http://br.new.mail.yahoo.com/addresses -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist