BYTE VAR initialization
Archiver
Posts: 46,084
When a BYTE VAR is declared does it need to have a value of 0
assigned to it or are VAR's automatically initialized to 0.
Thanks
Jack
assigned to it or are VAR's automatically initialized to 0.
Thanks
Jack
Comments
jlindsay24@y... writes:
> When a BYTE VAR is declared does it need to have a value of 0
> assigned to it or are VAR's automatically initialized to 0.
> Thanks
>
All variables are 0 when you boot up. They retain their value as long as
power is maintained on the chip.
Sid Weaver
W4EKQ
Port Richey, FL
[noparse][[/noparse]Non-text portions of this message have been removed]
then released), ALL variables are cleared to zero and all IO pins are
made inputs. Initializing a variable to zero just consumes code space.
The only acception to this suggestion is that you may need your program
to return to a code-based initialization section that does indeed reset
some variables to zero.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Jack Lindsay [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=n-iqFWGbpgFmKguFSZWcyZJgYW5FmjKO6xBdNmjUQppqS6XyPOccwbrhrWk0SyZzdhDyzytKoFuT2HOO6iw]jlindsay24@y...[/url
Sent: Tuesday, March 23, 2004 8:37 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] BYTE VAR initialization
When a BYTE VAR is declared does it need to have a value of 0
assigned to it or are VAR's automatically initialized to 0. Thanks Jack