Bug with strcmp?
#9

It's a very strange behaving function lol, most languages that have string or if you like character array manipulation simply return true or false 1 or 0, there was either a match, or not one.

But my primary language is Object Pascal and you don't use a function to compare a string, it's simply:

Код:
If (myStr1 = myStr2)
Begin
  MessageBox(0, "Success",  "They match", MB_OK);
End;
@leong124: I'm using something very similar, except overriding strcmp (checking if null first), and it's working great.

IS that generally faster than strcmp?
Reply


Messages In This Thread
Bug with strcmp? - by GrimR - 29.09.2011, 02:36
Re: Bug with strcmp? - by Lorenc_ - 29.09.2011, 03:58
Re: Bug with strcmp? - by GrimR - 29.09.2011, 04:17
Re: Bug with strcmp? - by $India$ - 29.09.2011, 04:55
Re: Bug with strcmp? - by Lorenc_ - 29.09.2011, 05:05
Re: Bug with strcmp? - by $India$ - 29.09.2011, 05:13
Re: Bug with strcmp? - by GrimR - 29.09.2011, 08:39
Re: Bug with strcmp? - by leong124 - 29.09.2011, 08:56
Re: Bug with strcmp? - by GrimR - 29.09.2011, 10:35
Re: Bug with strcmp? - by Jochemd - 29.09.2011, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)