string traverse

1. Senior Member
Join Date
Dec 1969
Posts
125

## string traverse

i want to traverse through a string character by character. <BR>how do i do that ?<BR><BR>e.g. i want to subtract a string from another string to get another string. <BR><BR>&#039;11100011&#039; minus <BR>&#039;00110010&#039; will give <BR>&#039;11000001&#039;<BR><BR>thanks

2. Senior Member
Join Date
Dec 1969
Posts
16,931

## Huh?

3. Senior Member
Join Date
Dec 1969
Posts
293

## Is this specifically Binary or

are you going to try to subtract "XYZ" from "ABC" - don&#039;t laugh I saw it done once. Silly thing to do, but then, I haven&#039;t the vagues idea what you ARE trying to do.

4. Senior Member
Join Date
Dec 1969
Posts
125

## RE: Is this specifically Binary or

thanks for yr reply. <BR><BR>i have a string representing *normal* open hours. 1 representing open and 0 representing closed. say &#039;11100011&#039; for first 3 hrs open then 3 hrs closed and then open again for 2 hrs. <BR><BR>i also have another string representing closed hours for that day. say &#039;00110010&#039; for closed 3rd and 4th hr. and then 7th hr closed.<BR><BR>now i want what hrs in effect are open on that day considering NORMAL open hrs and Closed hrs ? <BR><BR>answer is &#039;11000001&#039; <BR><BR>i want to programme it. so i need to traverse the first string and second string simultaneously so that i can compare each 1 and 0 to get resulting string. <BR><BR>hope this is clear.<BR>

5. Senior Member
Join Date
Dec 1969
Posts
2,854

## RE: Is this specifically Binary or

Why would you have two strings for the smae day? surely you cannot be open and Closed at the same time?<BR><BR>Unless the laws of physics have changed while I wasn&#039;t looking?<BR><BR>

6. Senior Member
Join Date
Dec 1969
Posts
16,931

## Maybe...

..the shop exists inside the world of quantum physics.<BR><BR>Then it could be open and closed. Or open. Or closed. Or neither open nor closed... Hell, whether it exists or not is up for debate...<BR><BR>Craig.

7. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: Maybe...

In reality it is only virtual really <BR>I think?

8. Senior Member
Join Date
Dec 1969
Posts
16,931

## Ahh...

...on a slightly related subject, anyone know when the next Matrix films are released over here (UK)?<BR><BR>NM.. I&#039;m bored. www.imdb.com... 23 May and 7 November.<BR><BR>Hey, end of this year could be good - Matrix Revolutions and LoTR3...<BR><BR>Craig.

9. Senior Member
Join Date
Dec 1969
Posts
2,854

## RE: Ahh...

Can&#039;t wait for those matrix films to come out, and two in one year, how they spoil us! :-)<BR><BR>Must admit was a bit disappointed in LoTR2.....<BR><BR>

10. Senior Member
Join Date
Dec 1969
Posts
16,931

## I liked LoTR2

Watched "The Ring" the other weekend.<BR><BR>Now that&#039;s a scary movie.<BR><BR>Craig.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•