Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!mailrus!uflorida!usfvax2!jc3b21!fgd3
From: fgd3@jc3b21.UUCP (Fabbian G. Dufoe)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Lattice C 4.0 bugs
Summary: Some help.
Message-ID: <446@jc3b21.UUCP>
Date: 12 Aug 88 05:48:13 GMT
References: <6627@bloom-beacon.MIT.EDU>
Organization: St. Petersburg Jr. College, FL
Lines: 33

In article <6627@bloom-beacon.MIT.EDU>, rlcarr@athena.mit.edu (Rich Carreiro) writes:
> So, can anyone explain how
> to use the damn -B option?

I don't find a -B option for LC.  However, I do find a -b option.  That's
probably what went wrong here.  When you talked to the Lattice Tech Support
folks did you specify you were using a capital B?

> #include 
> main()
> {
>   int i;
>   puts("Enter any number to continue:\n");
>   scanf("%d",&i);
> }
> 
> When I run it, the "Enter..." message IS NOT PRINTED until I enter a
> number and hit .  Then the message is printed and the program
> ends.  

I believe puts() simply writes characters to a buffer.  It may be
implemented as a macro.  Consequently, whey you use puts() for a short
prompt string you don't see anything until the buffer is flushed.  The
reason you see it when you press  is that your program terminates and
all the buffers are flushed.  If you want to flush the buffers before that
try flushall() or fflush() (described on page F-62).

--Fabbian Dufoe
  350 Ling-A-Mor Terrace South
  St. Petersburg, Florida  33705
  813-823-2350

UUCP: ...gatech!codas!usfvax2!jc3b21!fgd3 
      ...uunet!pdn!jc3b21!fgd3