| delorie.com/archives/browse.cgi | search |
| From: | Jon DeMarks <whatfor AT mindspring DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Terminal Programming |
| Date: | Sat, 24 Jul 1999 11:27:28 -0400 |
| Organization: | Tachyeon Systems |
| Lines: | 16 |
| Message-ID: | <3799DB60.E33AD371@mindspring.com> |
| References: | <3798FE1B DOT AE7EEEC AT mindspring DOT com> <3799351D DOT FC119898 AT mindspring DOT com> <7nbebb$3ih$1 AT newssrv DOT otenet DOT gr> |
| NNTP-Posting-Host: | d1.8a.0e.9d |
| Mime-Version: | 1.0 |
| X-Server-Date: | 24 Jul 1999 15:27:07 GMT |
| X-Mailer: | Mozilla 4.04 [en] (Win95; U) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Pavlos wrote:
> > answering my own question here, but it might help somebody out: use:
> >if(strcmp(buf,"sd") { sd(); }
> >instead of: if(buf=="sd") { sd(); }
> >
> It should be
> if(!strcmp(buf, "sd") {sd();}
> because strcmp returns 0 when to strings match.
> Pavlos
That was my bad there, the line should have been:
if(strcmp(buf,"sd")==0) { sd(); }
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |