TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: AUKE REITSMA
date: 1998-04-04 22:33:00
subject: Reading Input From Stdin

Hi Darin,
On 02 Apr 98, 18:45, you wrote to David Van Hoose
 DM> int main()
 DM> {
 DM>     char blank1[10] = {0}; /* all nuls */
 DM>     char buffer[10] = {0}; /* all nuls */
 DM>     char blank2[10] = {0}; /* all nuls */
...
 DM> What I found interesting is the fact that it went BACK... I was
 DM> expecting blank2 to be overwritten.
Did you _really_ expect blank2 to be overwritten? I'd expect that for static 
variables. Not for auto variables!
I suspect that the compiler's code generator is a bit simpler if it handles 
subsequent auto variable definitions similar to stack pushes.
Greetings from
 _____
 /_|__|  Auke Reitsma, Delft, The Netherlands.
/  | \  --------------------------------------
--- GEcho 1.00
---------------
* Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.