| delorie.com/archives/browse.cgi | search |
| From: | "Pavlos" <trash24379 AT usa DOT net> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Terminal Programming |
| Date: | Sat, 24 Jul 1999 07:09:03 +0300 |
| Organization: | An OTEnet S.A. customer |
| Lines: | 13 |
| Message-ID: | <7nbebb$3ih$1@newssrv.otenet.gr> |
| References: | <3798FE1B DOT AE7EEEC AT mindspring DOT com> <3799351D DOT FC119898 AT mindspring DOT com> |
| NNTP-Posting-Host: | dram-a09.otenet.gr |
| X-Trace: | newssrv.otenet.gr 932789419 3665 195.167.113.232 (24 Jul 1999 04:10:19 GMT) |
| X-Complaints-To: | abuse AT otenet DOT gr |
| NNTP-Posting-Date: | 24 Jul 1999 04:10:19 GMT |
| X-Newsreader: | Microsoft Outlook Express 4.72.3110.1 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
> 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |