Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!pyramid!ctnews!starfish!jerry From: jerry@starfish.Convergent.COM (Gerald Hawkins) Newsgroups: comp.lang.c Subject: turbo c question (ibm pc clone) Keywords: system function call turbo_c pc Message-ID: <806@starfish.Convergent.COM> Date: 12 Nov 88 16:32:00 GMT Organization: Convergent Technologies, San Jose, CA Lines: 43 I've been trying to use the 'system()' function call in my turbo c programs, just as I've always been able to do with Un*x and the cc compiler. After a great deal of pain and suffering, I've found that code such as this: #include #include #include main() { int a; a = system("dir a:"); if (!(a)) printf("\nSystem call successful"); else printf("\nsystem call error"); } does not work within the turbo c integrated environment. However, if I compile the code, exit the integrated environment, and run the code, the result is correct, ie, the directory is listed and the system call successful is displayed. (When running it within tc2.0, the system() call never really seems to happen, but a does get set to zero, indicating a successful call! The System call successful message prints). I havn't contacted Borland yet. Does anybody out there know how to make this work from within the tc environment? Rainy Days and Automatic Weapons Fire Alway Get Me Down. These opinions are mine. Jerry. (jerry@starfish.convergent.COM) -----