Em 22/7/2010 16:28, alan.b.pearce@stfc.ac.uk escreveu: > Note that the variables declared inside each function are not declared > 'static' so each time the function gets called they are recreated on the > stack, and are unique to that function. So the variables inside OpenSPI1 > are different variables to OpenSPI2, even though they have the same > name. The scope of each name is limited to the code inside that > function. The variables are cleared to all zeros on creation on the > stack if I understand the C standard correctly, but may need correction No, automatic variables are not cleared upon function entry, they may contain garbage. Global variables are cleared to zero at program start, but some tool-chains support a switch to disable this feature. __________________________________________________ Fale com seus amigos de gra=E7a com o novo Yahoo! Messenger = http://br.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist