Message-Id: Date: Thu, 16 Oct 97 21:17 MET DST To: djgpp AT delorie DOT com References: <3 DOT 0 DOT 16 DOT 19971016132047 DOT 34a756c4 AT hem1 DOT passagen DOT se> Subject: Re: sprintf() string length? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk Peter Palotas schrieb: > >The "fprintf" command will return the number of characters output, > >and you should fopen DOS's "NULL" file to send the output to. > >"NULL" is a "black hole" which will swallow and ignore anything you > >send to it. Although "NULL" never appears in a directory, it > >exists everywhere. (I think the UNIX equivalent is "/dev/nul", > >but I've never used UNIX.) > > Does anyone know if this works, and how compatible it is? > Writing to a NULL pointer doesn't sound too good to me! > -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- NUL (yes, with one L) is neither a file nor a pointer, it's a DOS device driver (like CON, PRN, AUX and $CLOCK) but it can be used like a file. Its only task is to do nothing... sounds strange! I don't know if a similar thing exists in other OSs.