From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Question on pointers and arrays Date: Mon, 24 Feb 1997 00:19:20 -0800 Organization: Alcyone Systems Lines: 23 Message-ID: <33114F08.7FB7F03A@alcyone.com> References: <32f92a6c DOT 0 AT ntnews DOT compusmart DOT ab DOT ca> <32FA7146 DOT 3883 AT cam DOT org> <32fa7242 DOT 998097 AT news DOT walrus DOT com> <5dsgcv$5m4 AT star DOT cs DOT vu DOT nl> <3303DF62 DOT 21E0 AT cs DOT com> <5e1f1u$m07 AT star DOT cs DOT vu DOT nl> <33092376 DOT 1E3 AT cs DOT com> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp John M. Aldrich wrote: > No, but apparently this sort of thing is system-specific. When you do > that with DJGPP in DOS, it works fine (although it still is very > unsafe). If you're looking for portability, then you're interested in strict conformance to ANSI C (or draft standard C++). In that case, you'd better not do it. Whether it works on one or more platforms is not a good indication of whether something is good C (or C++) programming practice. After all, some operating systems will let you dereference the null pointer and won't complain, even though that's clearly a naughty thing and something that you would hope (but unfortunately will not always happen) the compiler will detect. -- Erik Max Francis, &tSftDotIotE / email: max AT alcyone DOT com Alcyone Systems / web: http://www.alcyone.com/max/ San Jose, California, United States / icbm: 37 20 07 N 121 53 38 W \ "I am become death, / destroyer of worlds." / J. Robert Oppenheimer (quoting legend)