Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Misc > Re: Comparing t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 8 Topic 768 of 811
Post > Topic >>

Re: Comparing to strings

by Alan <alan@[EMAIL PROTECTED] > Dec 10, 2007 at 03:58 AM

Joe wrote:

> Can some one tell me How to compare 2 strings
> 
> var
> s1, s2: string
> 
> s1:= 'John';
> s2:= 'john';
> 
> How could I compare the 2 strings to get a match

if s1 = s2 then
  writeln('strings match');


Of course, in your example the test would fail because the case 
doesn't match.
 




 8 Posts in Topic:
Comparing to strings
Joe <joe@[EMAIL PROTEC  2007-12-09 22:33:06 
Re: Comparing to strings
Alan <alan@[EMAIL PROT  2007-12-10 03:58:00 
Re: Comparing to strings
CBFalconer <cbfalconer  2007-12-10 04:42:22 
Re: Comparing to strings
Joe <joe@[EMAIL PROTEC  2007-12-10 16:56:02 
Re: Comparing to strings
Keith Bowes <keith_bow  2007-12-23 05:00:04 
Re: Comparing to strings
Joe <joe@[EMAIL PROTEC  2007-12-10 10:20:22 
Re: Comparing to strings
Marco van de Voort <ma  2007-12-10 08:47:39 
Re: Comparing to strings
Joe <joe@[EMAIL PROTEC  2007-12-10 16:58:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:51:11 CDT 2008.