Re: K&R 1.5.1 exercise

From: Merrill & Michele (beckjensen_at_comcast.net)
Date: 10/13/04


Date: Wed, 13 Oct 2004 11:45:27 -0500


> >MPJ wrote:
> >Thanks all for replies. Mr. Pop is correct that his shortened version of
my
> >prog does indeed yield -1, but I liked the idea of trying to find the
> >appropriate answer with a while{}. Would Mr. Pop have the same criticism
if
> >one began the loop with Mr. Barts' (I know I got your 's' this time, but
did
> >I get the possessive correct?) INT_MIN suggestion, incremented in the
usual
> >fashion, and it were stipulated that an EOF had indeed been #defined as
an
> >int?
> Dan wrote:
> EOF is guaranteed to have the type int and a negative value. If you start
> at INT_MIN you can't miss it before reaching 0. No undefined behaviour
> in sight.
> What happens *after* you press the Return/Enter key, as I have asked you
> to do?
>
> Answer: you'll a get a 1 or 0 displayed, but you may never have
> a chance to see it, if your IDE automatically closes your console
> window after program termination. If this is the case, indeed, generate
> the EXE file and run it by hand in a standalone console window.
>
> The C beginner using K&R2 is better served by a command line compiler than
> by any kind of IDE. All the examples and exercises have been designed
> with a command line environment in mind.
>
Yeah, I missed it. The IDE was fine; the monkey running it, well .... I
can create the command line and would likely be better served by another
compiler. I'm not single-minded like George Bush in that I have single
thought in my head. I'm single-minded in that I don't change horses or
focus until I have to. MPJ



Relevant Pages

  • Re: Command line compiler when there are images in the project: any suggestion?
    ... Nicholas Paldino ... >>> I have to use the command line compiler and I use the following command>>> line: ... >>> On the other side, if I try to compile it with the VS IDE everything>>> works ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Command Line Compiler Config File
    ... specific settings in the dcc32.cfg file in the project folder. ... I just wanted to make sure that the command line compiler is not ... At one point, a.cfg file was also created by the IDE, ...
    (borland.public.delphi.non-technical)
  • Re: P.S. Why would release static lib be significantly larger then my debug build?
    ... even though the huge library of the first project is included in the ... Is there some place that tells me where the compiler / linker switches ... the project properties dialog to observe the effect of changing some IDE ... command prompt), you'll be able to figure out the mapping. ...
    (microsoft.public.vc.language)
  • Re: Command Line Compiler Config File
    ... I couldn't find anything on the command line compiler ... At one point, a.cfg file was also created by the IDE, ... the command line compiler from using the IDE settings in that file. ... in the IDE and use MSBuild from the command line. ...
    (borland.public.delphi.non-technical)
  • Re: Looking for a free basic compiler for DOS
    ... BC for 7.1 had a lot of compiler switchable options, ... NEVER compile from the ide. ... One trivial example: I have a routine declared as: ... were no manuals, just a readme file. ...
    (comp.lang.basic.misc)