Xref: utzoo comp.lang.c:20402 comp.sys.mac:35890 comp.sys.mac.programmer:8069 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!gatech!amdcad!pepsi!ching From: ching@pepsi.amd.com (Mike Ching) Newsgroups: comp.lang.c,comp.sys.mac,comp.sys.mac.programmer Subject: Re: Lightspeed "C" 3.02 Neophyte Question / prob. Keywords: LSC, probably simple! Message-ID: <26616@amdcad.AMD.COM> Date: 4 Aug 89 22:02:20 GMT References: <1667@thumper.bellcore.com> <70@steven.COM> Sender: news@amdcad.AMD.COM Reply-To: ching@pepsi.AMD.COM (Mike Ching) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 17 In article <70@steven.COM> paul@steven.COM (paul) writes: =In article <1667@thumper.bellcore.com>, pff@thumper.bellcore.com (Peter Ferris) writes: => Everything runs just fine... TOO fine! I believe it works, but it's toooo => quick! The console window opens, displays "Hello world!" and 'slams' shut => VERY, VERY quickly. Any suggestions? I've run this program on other Macs = =I had this same problem on a 2 Meg Mac+ and had to put a scanf to accept =a carriage return. getchar won't accept a straight carriage return. =It needs something to chew on. I usually use the unix_main routine when porting from the command line environment. Rename your main routine to be _main and include unix_main.c in your project. (It's 'unix main.c' with no underscore.) Programs will then prompt for command line arguments and open a final dialog prompting for a Return or click before exitting. mike ching