Message-ID: <38914D6A.41502DCA@earthlink.net> From: Martin Ambuhl Organization: Nocturnal Aviation X-Mailer: Mozilla 4.7 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp parameter error... References: <20000128010651 DOT 15219 DOT 00000402 AT ng-cd1 DOT aol DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 57 NNTP-Posting-Host: 209.246.84.5 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread1.prod.itd.earthlink.net 949046656 209.246.84.5 (Fri, 28 Jan 2000 00:04:16 PST) NNTP-Posting-Date: Fri, 28 Jan 2000 00:04:16 PST X-ELN-Date: Fri Jan 28 00:04:16 2000 Date: Fri, 28 Jan 2000 08:04:16 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com LarsNicolas wrote: > > Hello, > > When I tried to pass '...' (3 dots) to my program compiled in djgpp, something > like: > > C:\>myprog ... > > Djgpp returns just a single dot in argv[]! When I tried passing 4 dots or 2 > dots, it is working fine...I don't know if this is a bug in my program or if > has something to do with my operating system (Windows 98), but I will really > appreciate if someone wil going to help me with this...Maybe this might be a > bug in djgpp?... > > my code: After turning your code into legal C, it echoes properly. The particular reason for the behavior you report is a mystery to me, but I don't often worry about the behavior of incorrect code. #include /* mha - printf is variadic; prototype required */ int main(int argc, char **argv) { printf("%s\n", argv[1]); /* mha - added \n needed to make this program have defined behavior */ return 0; } /* mha - illegal ';' removed */ > ------------------------ > int main(int argc, char **argv) { > printf("%s", argv[1]); > return 0; > }; > ------------------------ > > Thanks, > Lars -- Martin Ambuhl mambuhl AT earthlink DOT net What one knows is, in youth, of little moment; they know enough who know how to learn. - Henry Adams A thick skin is a gift from God. - Konrad Adenauer __________________________________________________________ Fight spam now! Get your free anti-spam service: http://www.brightmail.com