Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!src.honeywell.com!msi.umn.edu!cs.umn.edu!thornley From: thornley@cs.umn.edu (David H. Thornley) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C scanf() bug? Message-ID: <1991Mar21.181332.11841@cs.umn.edu> Date: 21 Mar 91 18:13:32 GMT References: <1991Mar17.230413.1917@leland.Stanford.EDU> <3165@charon.cwi.nl> Organization: University of Minnesota, Minneapolis, CSci dept. Lines: 28 In article <3165@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >noa@leland.Stanford.EDU (Noa More) writes: > >>3. I very much miss both i/o redirection (<<,>>) > >There used to be a main program which you could compile and link with >your program (renaming your own main to _main), which prompted for >arguments and also understood < and > redirection. It is a little >primitive, but may help you get used to the new environment. I >suppose it is still provided. > No, they changed it somewhere between 2.11 and 4.0. In 4.0, what you have to do is use the "ccommand" function documented in the console part of the Standard Libraries Reference. This allows you to do stdin and stdout redirection and command-line arguments. IMHO, they could have made it easier to find, considering how important this is for compatibility and the fact that this is the standard way to print your output rather than take notes as it scrolls past, but it's there and it works (once you dig through most of the documentation looking for it). BTW, the scanf() bug also affects strtod() and atof(), which call it. I got my update from the Symantec bulletin board at (408)- 973-9598, it's available in compactor format (compactor is also available). It uses ?modem formats and maybe a few others. DHT