Message-Id: <199905062054.PAA15797@darwin.sfbr.org> Date: Thu, 6 May 1999 15:54:44 -0500 (CDT) From: Jeff Williams Subject: OT: skip remainder of input line following `#' ? To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: OVp6SBnvcEft/uAcwut7lw== X-Mailer: dtmail 1.2.0 CDE Version 1.2 SunOS 5.6 sun4m sparc Reply-To: djgpp AT delorie DOT com -: Warning: fflush() doesn't flush input streams, nor should it. -: Perhaps you want scanf("%*[^\n]\n") instead ? The recent exchange regarding fflush(stdin) got me wondering if there is an equally clever way (i.e., using the scanf format specifications) to skip the remainder of an input record if a # symbol is encountered (e.g., so that comments could be appended to the end of fixed (except for white space) format data records). TIA, jeff