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

 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 */
 AR> ...
 DM> What I found interesting is the fact that it went BACK... I was
 DM> expecting blank2 to be overwritten.
 AR> Did you _really_ expect blank2 to be overwritten? I'd 
 AR> expect that for static variables. Not for auto 
 AR> variables!
Perhaps I didn't follow the code generation properly.  No matter - I had put 
the blanks on both sides "just in case".  :-)
 AR> I suspect that the compiler's code generator is a bit 
 AR> simpler if it handles subsequent auto variable 
 AR> definitions similar to stack pushes.
Although we won't guarantee this behaviour... ;-)
---
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

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™.